@deephaven/jsapi-bootstrap 1.7.2-beta.1 → 1.7.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,7 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
3
3
  import { createContext, useEffect, useState } from 'react';
4
4
  import { LoadingOverlay, Modal, ModalBody, ModalHeader } from '@deephaven/components';
5
5
  import Log from '@deephaven/log';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
7
  var log = Log.module('@deephaven/jsapi-bootstrap.ApiBootstrap');
9
8
  export var ApiContext = /*#__PURE__*/createContext(null);
10
9
  ApiContext.displayName = 'ApiContext';
@@ -30,7 +29,7 @@ export function ApiBootstrap(_ref) {
30
29
  var dh =
31
30
  // Ignore the warning about dynamic import in both Vite and Webpack.
32
31
  // We use Vite, but some clients may use Webpack.
33
- (yield import( /* @vite-ignore */ /* webpackIgnore: true */apiUrl)).default;
32
+ (yield import(/* @vite-ignore */ /* webpackIgnore: true */apiUrl)).default;
34
33
  log.info('API bootstrapped from', apiUrl);
35
34
  setApi(dh);
36
35
  if (setGlobally) {
@@ -1 +1 @@
1
- {"version":3,"file":"ApiBootstrap.js","names":["createContext","useEffect","useState","LoadingOverlay","Modal","ModalBody","ModalHeader","Log","jsx","_jsx","jsxs","_jsxs","log","module","ApiContext","displayName","ApiBootstrap","_ref","apiUrl","children","failureElement","setGlobally","isLoading","setIsLoading","api","setApi","loadApi","_loadApi","apply","arguments","_asyncToGenerator","dh","default","info","debug","globalThis","e","error","isOpen","className","closeButton","Provider","value"],"sources":["../src/ApiBootstrap.tsx"],"sourcesContent":["import { createContext, type ReactNode, useEffect, useState } from 'react';\nimport {\n LoadingOverlay,\n Modal,\n ModalBody,\n ModalHeader,\n} from '@deephaven/components';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('@deephaven/jsapi-bootstrap.ApiBootstrap');\n\nexport const ApiContext = createContext<typeof DhType | null>(null);\nApiContext.displayName = 'ApiContext';\n\nexport type ApiBootstrapProps = {\n /** URL of the API to load */\n apiUrl: string;\n\n /** Children to render when the API has loaded */\n children: ReactNode;\n\n /** Element to display if there is a failure loading the API */\n failureElement?: JSX.Element;\n\n /** Whether to set the API globally on window.dh when it has loaded */\n setGlobally?: boolean;\n};\n\n/**\n * ApiBootstrap loads the API from the provided URL, rendering the children once loaded.\n */\nexport function ApiBootstrap({\n apiUrl,\n children,\n failureElement,\n setGlobally = false,\n}: ApiBootstrapProps): JSX.Element {\n const [isLoading, setIsLoading] = useState(true);\n const [api, setApi] = useState<typeof DhType>();\n useEffect(() => {\n async function loadApi(): Promise<void> {\n try {\n const dh: typeof DhType =\n // Ignore the warning about dynamic import in both Vite and Webpack.\n // We use Vite, but some clients may use Webpack.\n (await import(/* @vite-ignore */ /* webpackIgnore: true */ apiUrl))\n .default;\n log.info('API bootstrapped from', apiUrl);\n setApi(dh);\n if (setGlobally) {\n log.debug('API set globally');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (globalThis as any).dh = dh;\n }\n } catch (e) {\n log.error('Unable to bootstrap API', e);\n }\n setIsLoading(false);\n }\n loadApi();\n }, [apiUrl, setGlobally]);\n\n if (isLoading) {\n return <LoadingOverlay data-testid=\"api-bootstrap-loading\" />;\n }\n if (api == null) {\n return (\n failureElement ?? (\n <Modal isOpen className=\"modal-dialog-centered\">\n <ModalHeader closeButton={false}>\n Error: Unable to load API\n </ModalHeader>\n <ModalBody>\n <p className=\"text-break\">\n Ensure the server is running and you are able to reach {apiUrl},\n then refresh the page.\n </p>\n </ModalBody>\n </Modal>\n )\n );\n }\n return <ApiContext.Provider value={api}>{children}</ApiContext.Provider>;\n}\n\nexport default ApiBootstrap;\n"],"mappings":";;AAAA,SAASA,aAAa,EAAkBC,SAAS,EA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EAAED,CAAC,CAAC;QACzC;QACAb,YAAY,CAAC,KAAK,CAAC;MACrB,CAAC;MAAA,OAAAI,QAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IACDH,OAAO,CAAC,CAAC;EACX,CAAC,EAAE,CAACR,MAAM,EAAEG,WAAW,CAAC,CAAC;EAEzB,IAAIC,SAAS,EAAE;IACb,oBAAOb,IAAA,CAACN,cAAc;MAAC,eAAY;IAAuB,CAAE,CAAC;EAC/D;EACA,IAAIqB,GAAG,IAAI,IAAI,EAAE;IACf,OACEJ,cAAc,aAAdA,cAAc,cAAdA,cAAc,gBACZT,KAAA,CAACP,KAAK;MAACkC,MAAM;MAACC,SAAS,EAAC,uBAAuB;MAAApB,QAAA,gBAC7CV,IAAA,CAACH,WAAW;QAACkC,WAAW,EAAE,KAAM;QAAArB,QAAA,EAAC;MAEjC,CAAa,CAAC,eACdV,IAAA,CAACJ,SAAS;QAAAc,QAAA,eACRR,KAAA;UAAG4B,SAAS,EAAC,YAAY;UAAApB,QAAA,GAAC,yDAC+B,EAACD,MAAM,EAAC,0BAEjE;QAAA,CAAG;MAAC,CACK,CAAC;IAAA,CACP,CAAC;EAGd;EACA,oBAAOT,IAAA,CAACK,UAAU,CAAC2B,QAAQ;IAACC,KAAK,EAAElB,GAAI;IAAAL,QAAA,EAAEA;EAAQ,CAAsB,CAAC;AAC1E;AAEA,eAAeH,YAAY"}
1
+ {"version":3,"file":"ApiBootstrap.js","names":["createContext","useEffect","useState","LoadingOverlay","Modal","ModalBody","ModalHeader","Log","jsx","_jsx","jsxs","_jsxs","log","module","ApiContext","displayName","ApiBootstrap","_ref","apiUrl","children","failureElement","setGlobally","isLoading","setIsLoading","api","setApi","loadApi","_loadApi","apply","arguments","_asyncToGenerator","dh","default","info","debug","globalThis","e","error","isOpen","className","closeButton","Provider","value"],"sources":["../src/ApiBootstrap.tsx"],"sourcesContent":["import { createContext, type ReactNode, useEffect, useState } from 'react';\nimport {\n LoadingOverlay,\n Modal,\n ModalBody,\n ModalHeader,\n} from '@deephaven/components';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('@deephaven/jsapi-bootstrap.ApiBootstrap');\n\nexport const ApiContext = createContext<typeof DhType | null>(null);\nApiContext.displayName = 'ApiContext';\n\nexport type ApiBootstrapProps = {\n /** URL of the API to load */\n apiUrl: string;\n\n /** Children to render when the API has loaded */\n children: ReactNode;\n\n /** Element to display if there is a failure loading the API */\n failureElement?: JSX.Element;\n\n /** Whether to set the API globally on window.dh when it has loaded */\n setGlobally?: boolean;\n};\n\n/**\n * ApiBootstrap loads the API from the provided URL, rendering the children once loaded.\n */\nexport function ApiBootstrap({\n apiUrl,\n children,\n failureElement,\n setGlobally = false,\n}: ApiBootstrapProps): JSX.Element {\n const [isLoading, setIsLoading] = useState(true);\n const [api, setApi] = useState<typeof DhType>();\n useEffect(() => {\n async function loadApi(): Promise<void> {\n try {\n const dh: typeof DhType =\n // Ignore the warning about dynamic import in both Vite and Webpack.\n // We use Vite, but some clients may use Webpack.\n (await import(/* @vite-ignore */ /* webpackIgnore: true */ apiUrl))\n .default;\n log.info('API bootstrapped from', apiUrl);\n setApi(dh);\n if (setGlobally) {\n log.debug('API set globally');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (globalThis as any).dh = dh;\n }\n } catch (e) {\n log.error('Unable to bootstrap API', e);\n }\n setIsLoading(false);\n }\n loadApi();\n }, [apiUrl, setGlobally]);\n\n if (isLoading) {\n return <LoadingOverlay data-testid=\"api-bootstrap-loading\" />;\n }\n if (api == null) {\n return (\n failureElement ?? (\n <Modal isOpen className=\"modal-dialog-centered\">\n <ModalHeader closeButton={false}>\n Error: Unable to load API\n </ModalHeader>\n <ModalBody>\n <p className=\"text-break\">\n Ensure the server is running and you are able to reach {apiUrl},\n then refresh the page.\n </p>\n </ModalBody>\n </Modal>\n )\n );\n }\n return <ApiContext.Provider value={api}>{children}</ApiContext.Provider>;\n}\n\nexport default ApiB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,EAAE;UACVxB,GAAG,CAACyB,KAAK,CAAC,yBAAyB,EAAED,CAAC,CAAC;QACzC;QACAb,YAAY,CAAC,KAAK,CAAC;MACrB,CAAC;MAAA,OAAAI,QAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IACDH,OAAO,CAAC,CAAC;EACX,CAAC,EAAE,CAACR,MAAM,EAAEG,WAAW,CAAC,CAAC;EAEzB,IAAIC,SAAS,EAAE;IACb,oBAAOb,IAAA,CAACN,cAAc;MAAC,eAAY;IAAuB,CAAE,CAAC;EAC/D;EACA,IAAIqB,GAAG,IAAI,IAAI,EAAE;IACf,OACEJ,cAAc,aAAdA,cAAc,cAAdA,cAAc,gBACZT,KAAA,CAACP,KAAK;MAACkC,MAAM;MAACC,SAAS,EAAC,uBAAuB;MAAApB,QAAA,gBAC7CV,IAAA,CAACH,WAAW;QAACkC,WAAW,EAAE,KAAM;QAAArB,QAAA,EAAC;MAEjC,CAAa,CAAC,eACdV,IAAA,CAACJ,SAAS;QAAAc,QAAA,eACRR,KAAA;UAAG4B,SAAS,EAAC,YAAY;UAAApB,QAAA,GAAC,yDAC+B,EAACD,MAAM,EAAC,0BAEjE;QAAA,CAAG;MAAC,CACK,CAAC;IAAA,CACP,CAAC;EAGd;EACA,oBAAOT,IAAA,CAACK,UAAU,CAAC2B,QAAQ;IAACC,KAAK,EAAElB,GAAI;IAAAL,QAAA,EAAEA;EAAQ,CAAsB,CAAC;AAC1E;AAEA,eAAeH,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ClientBootstrap.js","names":["React","createContext","useCreateClient","jsx","_jsx","ClientContext","displayName","ClientBootstrap","_ref","serverUrl","options","children","client","Provider","value"],"sources":["../src/ClientBootstrap.tsx"],"sourcesContent":["import React, { createContext } from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport useCreateClient from './useCreateClient';\n\nexport const ClientContext = createContext<dh.CoreClient | null>(null);\nClientContext.displayName = 'ClientContext';\n\nexport type ClientBootstrapProps = {\n /** URL of the server to connect to */\n serverUrl: string;\n\n /** Connection options to pass to CoreClient when connecting */\n options?: dh.ConnectOptions;\n\n /**\n * The children to render wrapped with the ClientContext.\n * Will not render children until the client is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ClientBootstrap component. Handles creating the client.\n */\nexport function ClientBootstrap({\n serverUrl,\n options,\n children,\n}: ClientBootstrapProps): JSX.Element {\n const client = useCreateClient(serverUrl, options);\n return (\n <ClientContext.Provider value={client}>{children}</ClientContext.Provider>\n );\n}\n\nexport default ClientBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAAC,OAEtCC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEtB,OAAO,IAAMC,aAAa,gBAAGJ,aAAa,CAAuB,IAAI,CAAC;AACtEI,aAAa,CAACC,WAAW,GAAG,eAAe;AAgB3C;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAAC,IAAA,EAIO;EAAA,IAJN;IAC9BC,SAAS;IACTC,OAAO;IACPC;EACoB,CAAC,GAAAH,IAAA;EACrB,IAAMI,MAAM,GAAGV,eAAe,CAACO,SAAS,EAAEC,OAAO,CAAC;EAClD,oBACEN,IAAA,CAACC,aAAa,CAACQ,QAAQ;IAACC,KAAK,EAAEF,MAAO;IAAAD,QAAA,EAAEA;EAAQ,CAAyB,CAAC;AAE9E;AAEA,eAAeJ,eAAe"}
1
+ {"version":3,"file":"ClientBootstrap.js","names":["React","createContext","useCreateClient","jsx","_jsx","ClientContext","displayName","ClientBootstrap","_ref","serverUrl","options","children","client","Provider","value"],"sources":["../src/ClientBootstrap.tsx"],"sourcesContent":["import React, { createContext } from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport useCreateClient from './useCreateClient';\n\nexport const ClientContext = createContext<dh.CoreClient | null>(null);\nClientContext.displayName = 'ClientContext';\n\nexport type ClientBootstrapProps = {\n /** URL of the server to connect to */\n serverUrl: string;\n\n /** Connection options to pass to CoreClient when connecting */\n options?: dh.ConnectOptions;\n\n /**\n * The children to render wrapped with the ClientContext.\n * Will not render children until the client is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ClientBootstrap component. Handles creating the client.\n */\nexport function ClientBootstrap({\n serverUrl,\n options,\n children,\n}: ClientBootstrapProps): JSX.Element {\n const client = useCreateClient(serverUrl, options);\n return (\n <ClientContext.Provider value={client}>{children}</ClientContext.Provider>\n );\n}\n\nexport default ClientBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAAC,OAEtCC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEtB,OAAO,IAAMC,aAAa,gBAAGJ,aAAa,CAAuB,IAAI,CAAC;AACtEI,aAAa,CAACC,WAAW,GAAG,eAAe;AAgB3C;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAAC,IAAA,EAIO;EAAA,IAJN;IAC9BC,SAAS;IACTC,OAAO;IACPC;EACoB,CAAC,GAAAH,IAAA;EACrB,IAAMI,MAAM,GAAGV,eAAe,CAACO,SAAS,EAAEC,OAAO,CAAC;EAClD,oBACEN,IAAA,CAACC,aAAa,CAACQ,QAAQ;IAACC,KAAK,EAAEF,MAAO;IAAAD,QAAA,EAAEA;EAAQ,CAAyB,CAAC;AAE9E;AAEA,eAAeJ,eAAe","ignoreList":[]}
@@ -13,7 +13,7 @@ export var DeferredApiBootstrap = /*#__PURE__*/React.memo(_ref => {
13
13
  } = _ref;
14
14
  var [api, apiError] = useDeferredApi(widget);
15
15
  if (apiError != null) {
16
- onError === null || onError === void 0 ? void 0 : onError(apiError);
16
+ onError === null || onError === void 0 || onError(apiError);
17
17
  return null;
18
18
  }
19
19
  if (api == null) {
@@ -1 +1 @@
1
- {"version":3,"file":"DeferredApiBootstrap.js","names":["React","useDeferredApi","ApiContext","jsx","_jsx","DeferredApiBootstrap","memo","_ref","children","onError","widget","api","apiError","Provider","value","displayName"],"sources":["../src/DeferredApiBootstrap.tsx"],"sourcesContent":["import React from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport useDeferredApi from './useDeferredApi';\nimport { ApiContext } from './ApiBootstrap';\n\ntype DeferredApiBootstrapProps = React.PropsWithChildren<{\n onError?: (error: unknown) => void;\n /**\n * Descriptor for the widget to load. Passed into an `ObjectFetcher` to load the widget.\n * The descriptor may be extended to include session information or other data required to identify the widget.\n * The surrounding `ObjectFetcherContext` will then be able to use that information to correctly load the widget.\n */\n widget: dh.ide.VariableDescriptor;\n}>;\n\n/**\n * Does not render children until the deferred API is resolved.\n */\nexport const DeferredApiBootstrap = React.memo(\n ({\n children,\n onError,\n widget,\n }: DeferredApiBootstrapProps): JSX.Element | null => {\n const [api, apiError] = useDeferredApi(widget);\n if (apiError != null) {\n onError?.(apiError);\n return null;\n }\n if (api == null) {\n // Still waiting for the API to load\n return null;\n }\n return <ApiContext.Provider value={api}>{children}</ApiContext.Provider>;\n }\n);\n\nDeferredApiBootstrap.displayName = 'DeferredApiBootstrap';\n\nexport default DeferredApiBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,OAEnBC,cAAc;AAAA,SACZC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAYnB;AACA;AACA;AACA,OAAO,IAAMC,oBAAoB,gBAAGL,KAAK,CAACM,IAAI,CAC5CC,IAAA,IAIqD;EAAA,IAJpD;IACCC,QAAQ;IACRC,OAAO;IACPC;EACyB,CAAC,GAAAH,IAAA;EAC1B,IAAM,CAACI,GAAG,EAAEC,QAAQ,CAAC,GAAGX,cAAc,CAACS,MAAM,CAAC;EAC9C,IAAIE,QAAQ,IAAI,IAAI,EAAE;IACpBH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGG,QAAQ,CAAC;IACnB,OAAO,IAAI;EACb;EACA,IAAID,GAAG,IAAI,IAAI,EAAE;IACf;IACA,OAAO,IAAI;EACb;EACA,oBAAOP,IAAA,CAACF,UAAU,CAACW,QAAQ;IAACC,KAAK,EAAEH,GAAI;IAAAH,QAAA,EAAEA;EAAQ,CAAsB,CAAC;AAC1E,CACF,CAAC;AAEDH,oBAAoB,CAACU,WAAW,GAAG,sBAAsB;AAEzD,eAAeV,oBAAoB"}
1
+ {"version":3,"file":"DeferredApiBootstrap.js","names":["React","useDeferredApi","ApiContext","jsx","_jsx","DeferredApiBootstrap","memo","_ref","children","onError","widget","api","apiError","Provider","value","displayName"],"sources":["../src/DeferredApiBootstrap.tsx"],"sourcesContent":["import React from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport useDeferredApi from './useDeferredApi';\nimport { ApiContext } from './ApiBootstrap';\n\ntype DeferredApiBootstrapProps = React.PropsWithChildren<{\n onError?: (error: unknown) => void;\n /**\n * Descriptor for the widget to load. Passed into an `ObjectFetcher` to load the widget.\n * The descriptor may be extended to include session information or other data required to identify the widget.\n * The surrounding `ObjectFetcherContext` will then be able to use that information to correctly load the widget.\n */\n widget: dh.ide.VariableDescriptor;\n}>;\n\n/**\n * Does not render children until the deferred API is resolved.\n */\nexport const DeferredApiBootstrap = React.memo(\n ({\n children,\n onError,\n widget,\n }: DeferredApiBootstrapProps): JSX.Element | null => {\n const [api, apiError] = useDeferredApi(widget);\n if (apiError != null) {\n onError?.(apiError);\n return null;\n }\n if (api == null) {\n // Still waiting for the API to load\n return null;\n }\n return <ApiContext.Provider value={api}>{children}</ApiContext.Provider>;\n }\n);\n\nDeferredApiBootstrap.displayName = 'DeferredApiBootstrap';\n\nexport default DeferredApiBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,OAEnBC,cAAc;AAAA,SACZC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAYnB;AACA;AACA;AACA,OAAO,IAAMC,oBAAoB,gBAAGL,KAAK,CAACM,IAAI,CAC5CC,IAAA,IAIqD;EAAA,IAJpD;IACCC,QAAQ;IACRC,OAAO;IACPC;EACyB,CAAC,GAAAH,IAAA;EAC1B,IAAM,CAACI,GAAG,EAAEC,QAAQ,CAAC,GAAGX,cAAc,CAACS,MAAM,CAAC;EAC9C,IAAIE,QAAQ,IAAI,IAAI,EAAE;IACpBH,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAGG,QAAQ,CAAC;IACnB,OAAO,IAAI;EACb;EACA,IAAID,GAAG,IAAI,IAAI,EAAE;IACf;IACA,OAAO,IAAI;EACb;EACA,oBAAOP,IAAA,CAACF,UAAU,CAACW,QAAQ;IAACC,KAAK,EAAEH,GAAI;IAAAH,QAAA,EAAEA;EAAQ,CAAsB,CAAC;AAC1E,CACF,CAAC;AAEDH,oBAAoB,CAACU,WAAW,GAAG,sBAAsB;AAEzD,eAAeV,oBAAoB","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './ApiBootstrap';\nexport * from './ClientBootstrap';\nexport * from './DeferredApiBootstrap';\nexport * from './useApi';\nexport * from './useClient';\nexport * from './useDeferredApi';\nexport * from './useObjectFetch';\nexport * from './useObjectFetcher';\nexport * from './useWidget';\n"],"mappings":""}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './ApiBootstrap';\nexport * from './ClientBootstrap';\nexport * from './DeferredApiBootstrap';\nexport * from './useApi';\nexport * from './useClient';\nexport * from './useDeferredApi';\nexport * from './useObjectFetch';\nexport * from './useObjectFetcher';\nexport * from './useWidget';\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useApi.js","names":["useContextOrThrow","ApiContext","useApi"],"sources":["../src/useApi.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ApiContext } from './ApiBootstrap';\n\n/**\n * Retrieve the API for the current context.\n * @returns The API instance from the nearest ApiContext.Provider, or throws if none is set\n */\nexport function useApi(): typeof dh {\n return useContextOrThrow(\n ApiContext,\n 'No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?'\n );\n}\n\nexport default useApi;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,UAAU;AAEnB;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAAA,EAAc;EAClC,OAAOF,iBAAiB,CACtBC,UAAU,EACV,sFACF,CAAC;AACH;AAEA,eAAeC,MAAM"}
1
+ {"version":3,"file":"useApi.js","names":["useContextOrThrow","ApiContext","useApi"],"sources":["../src/useApi.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ApiContext } from './ApiBootstrap';\n\n/**\n * Retrieve the API for the current context.\n * @returns The API instance from the nearest ApiContext.Provider, or throws if none is set\n */\nexport function useApi(): typeof dh {\n return useContextOrThrow(\n ApiContext,\n 'No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?'\n );\n}\n\nexport default useApi;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,UAAU;AAEnB;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAAA,EAAc;EAClC,OAAOF,iBAAiB,CACtBC,UAAU,EACV,sFACF,CAAC;AACH;AAEA,eAAeC,MAAM","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useClient.js","names":["useContextOrThrow","ClientContext","useClient"],"sources":["../src/useClient.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ClientContext } from './ClientBootstrap';\n\nexport function useClient(): dh.CoreClient {\n return useContextOrThrow(\n ClientContext,\n 'No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?'\n );\n}\n\nexport default useClient;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,aAAa;AAEtB,OAAO,SAASC,SAASA,CAAA,EAAkB;EACzC,OAAOF,iBAAiB,CACtBC,aAAa,EACb,kGACF,CAAC;AACH;AAEA,eAAeC,SAAS"}
1
+ {"version":3,"file":"useClient.js","names":["useContextOrThrow","ClientContext","useClient"],"sources":["../src/useClient.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ClientContext } from './ClientBootstrap';\n\nexport function useClient(): dh.CoreClient {\n return useContextOrThrow(\n ClientContext,\n 'No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?'\n );\n}\n\nexport default useClient;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,aAAa;AAEtB,OAAO,SAASC,SAASA,CAAA,EAAkB;EACzC,OAAOF,iBAAiB,CACtBC,aAAa,EACb,kGACF,CAAC;AACH;AAEA,eAAeC,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateClient.js","names":["useEffect","useMemo","useApi","useCreateClient","serverUrl","options","api","client","CoreClient","disconnect"],"sources":["../src/useCreateClient.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useEffect, useMemo } from 'react';\nimport useApi from './useApi';\n\nexport function useCreateClient(\n serverUrl: string,\n options?: dh.ConnectOptions\n): dh.CoreClient {\n const api = useApi();\n const client = useMemo(\n () => new api.CoreClient(serverUrl, options),\n [api, serverUrl, options]\n );\n useEffect(\n () => () => {\n client.disconnect();\n },\n [client]\n );\n return client;\n}\n\nexport default useCreateClient;\n"],"mappings":"AACA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAAC,OACpCC,MAAM;AAEb,OAAO,SAASC,eAAeA,CAC7BC,SAAiB,EACjBC,OAA2B,EACZ;EACf,IAAMC,GAAG,GAAGJ,MAAM,CAAC,CAAC;EACpB,IAAMK,MAAM,GAAGN,OAAO,CACpB,MAAM,IAAIK,GAAG,CAACE,UAAU,CAACJ,SAAS,EAAEC,OAAO,CAAC,EAC5C,CAACC,GAAG,EAAEF,SAAS,EAAEC,OAAO,CAC1B,CAAC;EACDL,SAAS,CACP,MAAM,MAAM;IACVO,MAAM,CAACE,UAAU,CAAC,CAAC;EACrB,CAAC,EACD,CAACF,MAAM,CACT,CAAC;EACD,OAAOA,MAAM;AACf;AAEA,eAAeJ,eAAe"}
1
+ {"version":3,"file":"useCreateClient.js","names":["useEffect","useMemo","useApi","useCreateClient","serverUrl","options","api","client","CoreClient","disconnect"],"sources":["../src/useCreateClient.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useEffect, useMemo } from 'react';\nimport useApi from './useApi';\n\nexport function useCreateClient(\n serverUrl: string,\n options?: dh.ConnectOptions\n): dh.CoreClient {\n const api = useApi();\n const client = useMemo(\n () => new api.CoreClient(serverUrl, options),\n [api, serverUrl, options]\n );\n useEffect(\n () => () => {\n client.disconnect();\n },\n [client]\n );\n return client;\n}\n\nexport default useCreateClient;\n"],"mappings":"AACA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAAC,OACpCC,MAAM;AAEb,OAAO,SAASC,eAAeA,CAC7BC,SAAiB,EACjBC,OAA2B,EACZ;EACf,IAAMC,GAAG,GAAGJ,MAAM,CAAC,CAAC;EACpB,IAAMK,MAAM,GAAGN,OAAO,CACpB,MAAM,IAAIK,GAAG,CAACE,UAAU,CAACJ,SAAS,EAAEC,OAAO,CAAC,EAC5C,CAACC,GAAG,EAAEF,SAAS,EAAEC,OAAO,CAC1B,CAAC;EACDL,SAAS,CACP,MAAM,MAAM;IACVO,MAAM,CAACE,UAAU,CAAC,CAAC;EACrB,CAAC,EACD,CAACF,MAAM,CACT,CAAC;EACD,OAAOA,MAAM;AACf;AAEA,eAAeJ,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useDeferredApi.js","names":["createContext","useContext","useEffect","useState","ApiContext","DeferredApiContext","displayName","useDeferredApi","widget","api","setApi","error","setError","deferredApi","contextApi","Error","isCancelled","loadApi","_loadApi","apply","arguments","_asyncToGenerator","newApi","e"],"sources":["../src/useDeferredApi.ts"],"sourcesContent":["import { createContext, useContext, useEffect, useState } from 'react';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport { ApiContext } from './ApiBootstrap';\nimport { type UriVariableDescriptor } from './useObjectFetcher';\n\n/**\n * Function to fetch an API based on a provided descriptor object.\n * Depending on the context there may be more properties on the descriptor,\n * providing more information about the object, such as a session ID.\n * @param descriptor Descriptor object or URI to fetch the API from.\n * @returns A promise that resolves to the API instance for the provided variable descriptor.\n */\nexport type DeferredApiFetcher = (\n descriptor: DhType.ide.VariableDescriptor | UriVariableDescriptor\n) => Promise<typeof DhType>;\n\nexport const DeferredApiContext = createContext<\n typeof DhType | DeferredApiFetcher | null\n>(null);\nDeferredApiContext.displayName = 'DeferredApiContext';\n\n/**\n * Retrieve the API for the current context, given the widget provided.\n * The API may need to be loaded, and will return `null` until it is ready.\n * @param widget The widget descriptor or URI to use to fetch the API\n * @returns A tuple with the API instance, and an error if one occurred.\n */\nexport function useDeferredApi(\n widget: DhType.ide.VariableDescriptor | UriVariableDescriptor | null\n): [dh: typeof DhType | null, error: NonNullable<unknown> | null] {\n const [api, setApi] = useState<typeof DhType | null>(null);\n const [error, setError] = useState<NonNullable<unknown> | null>(null);\n const deferredApi = useContext(DeferredApiContext);\n const contextApi = useContext(ApiContext);\n\n useEffect(() => {\n if (deferredApi == null) {\n if (contextApi != null) {\n setApi(contextApi);\n setError(null);\n return;\n }\n setApi(null);\n setError(\n new Error(\n 'No API available in useDeferredApi. Was code wrapped in ApiBootstrap or DeferredApiContext.Provider?'\n )\n );\n return;\n }\n let isCancelled = false;\n\n async function loadApi() {\n if (widget == null) {\n if (!isCancelled) {\n setApi(null);\n setError(new Error('No widget provided to useDeferredApi'));\n }\n } else if (typeof deferredApi === 'function') {\n try {\n const newApi = await deferredApi(widget);\n if (!isCancelled) {\n setApi(newApi);\n setError(null);\n }\n } catch (e) {\n if (!isCancelled) {\n setApi(null);\n setError(e ?? new Error('Null error'));\n }\n }\n } else {\n setApi(deferredApi);\n }\n }\n\n loadApi();\n\n return () => {\n isCancelled = true;\n };\n }, [contextApi, deferredApi, widget]);\n\n return [api, error];\n}\n\nexport default useDeferredApi;\n"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAE9DC,UAAU;AAGnB;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,OAAO,IAAMC,kBAAkB,gBAAGL,aAAa,CAE7C,IAAI,CAAC;AACPK,kBAAkB,CAACC,WAAW,GAAG,oBAAoB;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAC5BC,MAAoE,EACJ;EAChE,IAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAGP,QAAQ,CAAuB,IAAI,CAAC;EAC1D,IAAM,CAACQ,KAAK,EAAEC,QAAQ,CAAC,GAAGT,QAAQ,CAA8B,IAAI,CAAC;EACrE,IAAMU,WAAW,GAAGZ,UAAU,CAACI,kBAAkB,CAAC;EAClD,IAAMS,UAAU,GAAGb,UAAU,CAACG,UAAU,CAAC;EAEzCF,SAAS,CAAC,MAAM;IACd,IAAIW,WAAW,IAAI,IAAI,EAAE;MACvB,IAAIC,UAAU,IAAI,IAAI,EAAE;QACtBJ,MAAM,CAACI,UAAU,CAAC;QAClBF,QAAQ,CAAC,IAAI,CAAC;QACd;MACF;MACAF,MAAM,CAAC,IAAI,CAAC;MACZE,QAAQ,CACN,IAAIG,KAAK,CACP,sGACF,CACF,CAAC;MACD;IACF;IACA,IAAIC,WAAW,GAAG,KAAK;IAAC,SAETC,OAAOA,CAAA;MAAA,OAAAC,QAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IAAA,SAAAF,SAAA;MAAAA,QAAA,GAAAG,iBAAA,CAAtB,aAAyB;QACvB,IAAIb,MAAM,IAAI,IAAI,EAAE;UAClB,IAAI,CAACQ,WAAW,EAAE;YAChBN,MAAM,CAAC,IAAI,CAAC;YACZE,QAAQ,CAAC,IAAIG,KAAK,CAAC,sCAAsC,CAAC,CAAC;UAC7D;QACF,CAAC,MAAM,IAAI,OAAOF,WAAW,KAAK,UAAU,EAAE;UAC5C,IAAI;YACF,IAAMS,MAAM,SAAST,WAAW,CAACL,MAAM,CAAC;YACxC,IAAI,CAACQ,WAAW,EAAE;cAChBN,MAAM,CAACY,MAAM,CAAC;cACdV,QAAQ,CAAC,IAAI,CAAC;YAChB;UACF,CAAC,CAAC,OAAOW,CAAC,EAAE;YACV,IAAI,CAACP,WAAW,EAAE;cAChBN,MAAM,CAAC,IAAI,CAAC;cACZE,QAAQ,CAACW,CAAC,aAADA,CAAC,cAADA,CAAC,GAAI,IAAIR,KAAK,CAAC,YAAY,CAAC,CAAC;YACxC;UACF;QACF,CAAC,MAAM;UACLL,MAAM,CAACG,WAAW,CAAC;QACrB;MACF,CAAC;MAAA,OAAAK,QAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IAEDH,OAAO,CAAC,CAAC;IAET,OAAO,MAAM;MACXD,WAAW,GAAG,IAAI;IACpB,CAAC;EACH,CAAC,EAAE,CAACF,UAAU,EAAED,WAAW,EAAEL,MAAM,CAAC,CAAC;EAErC,OAAO,CAACC,GAAG,EAAEE,KAAK,CAAC;AACrB;AAEA,eAAeJ,cAAc"}
1
+ {"version":3,"file":"useDeferredApi.js","names":["createContext","useContext","useEffect","useState","ApiContext","DeferredApiContext","displayName","useDeferredApi","widget","api","setApi","error","setError","deferredApi","contextApi","Error","isCancelled","loadApi","_loadApi","apply","arguments","_asyncToGenerator","newApi","e"],"sources":["../src/useDeferredApi.ts"],"sourcesContent":["import { createContext, useContext, useEffect, useState } from 'react';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport { ApiContext } from './ApiBootstrap';\nimport { type UriVariableDescriptor } from './useObjectFetcher';\n\n/**\n * Function to fetch an API based on a provided descriptor object.\n * Depending on the context there may be more properties on the descriptor,\n * providing more information about the object, such as a session ID.\n * @param descriptor Descriptor object or URI to fetch the API from.\n * @returns A promise that resolves to the API instance for the provided variable descriptor.\n */\nexport type DeferredApiFetcher = (\n descriptor: DhType.ide.VariableDescriptor | UriVariableDescriptor\n) => Promise<typeof DhType>;\n\nexport const DeferredApiContext = createContext<\n typeof DhType | DeferredApiFetcher | null\n>(null);\nDeferredApiContext.displayName = 'DeferredApiContext';\n\n/**\n * Retrieve the API for the current context, given the widget provided.\n * The API may need to be loaded, and will return `null` until it is ready.\n * @param widget The widget descriptor or URI to use to fetch the API\n * @returns A tuple with the API instance, and an error if one occurred.\n */\nexport function useDeferredApi(\n widget: DhType.ide.VariableDescriptor | UriVariableDescriptor | null\n): [dh: typeof DhType | null, error: NonNullable<unknown> | null] {\n const [api, setApi] = useState<typeof DhType | null>(null);\n const [error, setError] = useState<NonNullable<unknown> | null>(null);\n const deferredApi = useContext(DeferredApiContext);\n const contextApi = useContext(ApiContext);\n\n useEffect(() => {\n if (deferredApi == null) {\n if (contextApi != null) {\n setApi(contextApi);\n setError(null);\n return;\n }\n setApi(null);\n setError(\n new Error(\n 'No API available in useDeferredApi. Was code wrapped in ApiBootstrap or DeferredApiContext.Provider?'\n )\n );\n return;\n }\n let isCancelled = false;\n\n async function loadApi() {\n if (widget == null) {\n if (!isCancelled) {\n setApi(null);\n setError(new Error('No widget provided to useDeferredApi'));\n }\n } else if (typeof deferredApi === 'function') {\n try {\n const newApi = await deferredApi(widget);\n if (!isCancelled) {\n setApi(newApi);\n setError(null);\n }\n } catch (e) {\n if (!isCancelled) {\n setApi(null);\n setError(e ?? new Error('Null error'));\n }\n }\n } else {\n setApi(deferredApi);\n }\n }\n\n loadApi();\n\n return () => {\n isCancelled = true;\n };\n }, [contextApi, deferredApi, widget]);\n\n return [api, error];\n}\n\nexport default useDeferredApi;\n"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AA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WAAW,EAAE;cAChBN,MAAM,CAACY,MAAM,CAAC;cACdV,QAAQ,CAAC,IAAI,CAAC;YAChB;UACF,CAAC,CAAC,OAAOW,CAAC,EAAE;YACV,IAAI,CAACP,WAAW,EAAE;cAChBN,MAAM,CAAC,IAAI,CAAC;cACZE,QAAQ,CAACW,CAAC,aAADA,CAAC,cAADA,CAAC,GAAI,IAAIR,KAAK,CAAC,YAAY,CAAC,CAAC;YACxC;UACF;QACF,CAAC,MAAM;UACLL,MAAM,CAACG,WAAW,CAAC;QACrB;MACF,CAAC;MAAA,OAAAK,QAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IAEDH,OAAO,CAAC,CAAC;IAET,OAAO,MAAM;MACXD,WAAW,GAAG,IAAI;IACpB,CAAC;EACH,CAAC,EAAE,CAACF,UAAU,EAAED,WAAW,EAAEL,MAAM,CAAC,CAAC;EAErC,OAAO,CAACC,GAAG,EAAEE,KAAK,CAAC;AACrB;AAEA,eAAeJ,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useObjectFetch.js","names":["createContext","useContext","useEffect","useState","ObjectFetchManagerContext","displayName","useObjectFetch","descriptor","currentUpdate","setCurrentUpdate","status","objectFetchManager","error","Error","oldUpdate","subscribe"],"sources":["../src/useObjectFetch.ts"],"sourcesContent":["import { createContext, useContext, useEffect, useState } from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport { type UriVariableDescriptor } from './useObjectFetcher';\n\n/** Function for unsubscribing from a given subscription */\nexport type UnsubscribeFunction = () => void;\n\n/** Update when the ObjectFetch is still loading */\nexport type ObjectFetchLoading = {\n status: 'loading';\n};\n\n/** Update when the ObjectFetch has errored */\nexport type ObjectFetchError = {\n error: NonNullable<unknown>;\n status: 'error';\n};\n\n/** Update when the object is ready */\nexport type ObjectFetchReady<T> = {\n fetch: () => Promise<T>;\n status: 'ready';\n};\n\n/**\n * Update with the current `fetch` function and status of the object.\n * - If both `fetch` and `error` are `null`, it is still loading the fetcher\n * - If `fetch` is not `null`, the object is ready to be fetched\n * - If `error` is not `null`, there was an error loading the object\n */\nexport type ObjectFetchUpdate<T = unknown> =\n | ObjectFetchLoading\n | ObjectFetchError\n | ObjectFetchReady<T>;\n\nexport type ObjectFetchUpdateCallback<T = unknown> = (\n update: ObjectFetchUpdate<T>\n) => void;\n\n/** ObjectFetchManager for managing a subscription to an object using a VariableDescriptor */\nexport type ObjectFetchManager = {\n /**\n * Subscribe to the fetch function for an object using a variable descriptor.\n * It's possible that the fetch function changes over time, due to disconnection/reconnection, starting/stopping of applications that the object may be associated with, etc.\n *\n * @param descriptor Descriptor object or URI of the object to fetch. Can be extended by a specific implementation to include more details necessary for the ObjectManager.\n * @param onUpdate Callback function to be called when the object is updated.\n * @returns An unsubscribe function to stop listening for fetch updates and clean up the object.\n */\n subscribe: <T = unknown>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor,\n onUpdate: ObjectFetchUpdateCallback<T>\n ) => UnsubscribeFunction;\n};\n\n/** Context for tracking an implementation of the ObjectFetchManager. */\nexport const ObjectFetchManagerContext =\n createContext<ObjectFetchManager | null>(null);\nObjectFetchManagerContext.displayName = 'ObjectFetchManagerContext';\n\n/**\n * Retrieve a `fetch` function for the given variable descriptor.\n *\n * @param descriptor Descriptor or URI to get the `fetch` function for\n * @returns An object with the current `fetch` function, OR an error status set if there was an issue fetching the object.\n * Retrying is left up to the ObjectManager implementation used from this context.\n */\nexport function useObjectFetch<T = unknown>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor\n): ObjectFetchUpdate<T> {\n const [currentUpdate, setCurrentUpdate] = useState<ObjectFetchUpdate<T>>({\n status: 'loading',\n });\n\n const objectFetchManager = useContext(ObjectFetchManagerContext);\n\n useEffect(() => {\n if (objectFetchManager == null) {\n setCurrentUpdate({\n error: new Error('No ObjectFetchManager available in context'),\n status: 'error',\n });\n return;\n }\n // Update to signal we're still loading, if we're not already in a loading state.\n setCurrentUpdate(oldUpdate =>\n oldUpdate.status === 'loading' ? oldUpdate : { status: 'loading' }\n );\n return objectFetchManager.subscribe(descriptor, setCurrentUpdate);\n }, [descriptor, objectFetchManager]);\n\n return currentUpdate;\n}\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;;AAItE;;AAGA;;AAKA;;AAMA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAUA;;AAgBA;AACA,OAAO,IAAMC,yBAAyB,gBACpCJ,aAAa,CAA4B,IAAI,CAAC;AAChDI,yBAAyB,CAACC,WAAW,GAAG,2BAA2B;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAC5BC,UAA6D,EACvC;EACtB,IAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGN,QAAQ,CAAuB;IACvEO,MAAM,EAAE;EACV,CAAC,CAAC;EAEF,IAAMC,kBAAkB,GAAGV,UAAU,CAACG,yBAAyB,CAAC;EAEhEF,SAAS,CAAC,MAAM;IACd,IAAIS,kBAAkB,IAAI,IAAI,EAAE;MAC9BF,gBAAgB,CAAC;QACfG,KAAK,EAAE,IAAIC,KAAK,CAAC,4CAA4C,CAAC;QAC9DH,MAAM,EAAE;MACV,CAAC,CAAC;MACF;IACF;IACA;IACAD,gBAAgB,CAACK,SAAS,IACxBA,SAAS,CAACJ,MAAM,KAAK,SAAS,GAAGI,SAAS,GAAG;MAAEJ,MAAM,EAAE;IAAU,CACnE,CAAC;IACD,OAAOC,kBAAkB,CAACI,SAAS,CAACR,UAAU,EAAEE,gBAAgB,CAAC;EACnE,CAAC,EAAE,CAACF,UAAU,EAAEI,kBAAkB,CAAC,CAAC;EAEpC,OAAOH,aAAa;AACtB"}
1
+ {"version":3,"file":"useObjectFetch.js","names":["createContext","useContext","useEffect","useState","ObjectFetchManagerContext","displayName","useObjectFetch","descriptor","currentUpdate","setCurrentUpdate","status","objectFetchManager","error","Error","oldUpdate","subscribe"],"sources":["../src/useObjectFetch.ts"],"sourcesContent":["import { createContext, useContext, useEffect, useState } from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\nimport { type UriVariableDescriptor } from './useObjectFetcher';\n\n/** Function for unsubscribing from a given subscription */\nexport type UnsubscribeFunction = () => void;\n\n/** Update when the ObjectFetch is still loading */\nexport type ObjectFetchLoading = {\n status: 'loading';\n};\n\n/** Update when the ObjectFetch has errored */\nexport type ObjectFetchError = {\n error: NonNullable<unknown>;\n status: 'error';\n};\n\n/** Update when the object is ready */\nexport type ObjectFetchReady<T> = {\n fetch: () => Promise<T>;\n status: 'ready';\n};\n\n/**\n * Update with the current `fetch` function and status of the object.\n * - If both `fetch` and `error` are `null`, it is still loading the fetcher\n * - If `fetch` is not `null`, the object is ready to be fetched\n * - If `error` is not `null`, there was an error loading the object\n */\nexport type ObjectFetchUpdate<T = unknown> =\n | ObjectFetchLoading\n | ObjectFetchError\n | ObjectFetchReady<T>;\n\nexport type ObjectFetchUpdateCallback<T = unknown> = (\n update: ObjectFetchUpdate<T>\n) => void;\n\n/** ObjectFetchManager for managing a subscription to an object using a VariableDescriptor */\nexport type ObjectFetchManager = {\n /**\n * Subscribe to the fetch function for an object using a variable descriptor.\n * It's possible that the fetch function changes over time, due to disconnection/reconnection, starting/stopping of applications that the object may be associated with, etc.\n *\n * @param descriptor Descriptor object or URI of the object to fetch. Can be extended by a specific implementation to include more details necessary for the ObjectManager.\n * @param onUpdate Callback function to be called when the object is updated.\n * @returns An unsubscribe function to stop listening for fetch updates and clean up the object.\n */\n subscribe: <T = unknown>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor,\n onUpdate: ObjectFetchUpdateCallback<T>\n ) => UnsubscribeFunction;\n};\n\n/** Context for tracking an implementation of the ObjectFetchManager. */\nexport const ObjectFetchManagerContext =\n createContext<ObjectFetchManager | null>(null);\nObjectFetchManagerContext.displayName = 'ObjectFetchManagerContext';\n\n/**\n * Retrieve a `fetch` function for the given variable descriptor.\n *\n * @param descriptor Descriptor or URI to get the `fetch` function for\n * @returns An object with the current `fetch` function, OR an error status set if there was an issue fetching the object.\n * Retrying is left up to the ObjectManager implementation used from this context.\n */\nexport function useObjectFetch<T = unknown>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor\n): ObjectFetchUpdate<T> {\n const [currentUpdate, setCurrentUpdate] = useState<ObjectFetchUpdate<T>>({\n status: 'loading',\n });\n\n const objectFetchManager = useContext(ObjectFetchManagerContext);\n\n useEffect(() => {\n if (objectFetchManager == null) {\n setCurrentUpdate({\n error: new Error('No ObjectFetchManager available in context'),\n status: 'error',\n });\n return;\n }\n // Update to signal we're still loading, if we're not already in a loading state.\n setCurrentUpdate(oldUpdate =>\n oldUpdate.status === 'loading' ? oldUpdate : { status: 'loading' }\n );\n return objectFetchManager.subscribe(descriptor, setCurrentUpdate);\n }, [descriptor, objectFetchManager]);\n\n return currentUpdate;\n}\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;;AAItE;;AAGA;;AAKA;;AAMA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAUA;;AAgBA;AACA,OAAO,IAAMC,yBAAyB,gBACpCJ,aAAa,CAA4B,IAAI,CAAC;AAChDI,yBAAyB,CAACC,WAAW,GAAG,2BAA2B;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAC5BC,UAA6D,EACvC;EACtB,IAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGN,QAAQ,CAAuB;IACvEO,MAAM,EAAE;EACV,CAAC,CAAC;EAEF,IAAMC,kBAAkB,GAAGV,UAAU,CAACG,yBAAyB,CAAC;EAEhEF,SAAS,CAAC,MAAM;IACd,IAAIS,kBAAkB,IAAI,IAAI,EAAE;MAC9BF,gBAAgB,CAAC;QACfG,KAAK,EAAE,IAAIC,KAAK,CAAC,4CAA4C,CAAC;QAC9DH,MAAM,EAAE;MACV,CAAC,CAAC;MACF;IACF;IACA;IACAD,gBAAgB,CAACK,SAAS,IACxBA,SAAS,CAACJ,MAAM,KAAK,SAAS,GAAGI,SAAS,GAAG;MAAEJ,MAAM,EAAE;IAAU,CACnE,CAAC;IACD,OAAOC,kBAAkB,CAACI,SAAS,CAACR,UAAU,EAAEE,gBAAgB,CAAC;EACnE,CAAC,EAAE,CAACF,UAAU,EAAEI,kBAAkB,CAAC,CAAC;EAEpC,OAAOH,aAAa;AACtB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useObjectFetcher.js","names":["useContextOrThrow","createContext","isNameVariableDescriptor","value","type","name","isIdVariableDescriptor","id","isVariableDescriptor","ObjectFetcherContext","displayName","sanitizeVariableDescriptor","descriptor","_descriptor$name","Error","concat","getVariableDescriptor","definition","_definition$type","_definition$title","title","useObjectFetcher"],"sources":["../src/useObjectFetcher.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { createContext } from 'react';\n\n/**\n * Descriptor for a variable by name. Used when needed to fetch an object.\n */\nexport type NameVariableDescriptor = {\n /** Type of the variable */\n type: string;\n /** Name of the variable */\n name: string;\n};\n\n/**\n * Descriptor for a variable by id. Used when needed to fetch an object.\n */\nexport type IdVariableDescriptor = {\n /** Type of the variable */\n type: string;\n /** Id of the variable */\n id: string;\n};\n\nexport type UriVariableDescriptor = string;\n\nexport function isNameVariableDescriptor(\n value: unknown\n): value is NameVariableDescriptor {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as NameVariableDescriptor).type === 'string' &&\n (value as NameVariableDescriptor).name != null\n );\n}\n\nexport function isIdVariableDescriptor(\n value: unknown\n): value is IdVariableDescriptor {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as IdVariableDescriptor).type === 'string' &&\n (value as IdVariableDescriptor).id != null\n );\n}\n\nexport function isVariableDescriptor(\n value: unknown\n): value is dh.ide.VariableDescriptor {\n return isNameVariableDescriptor(value) || isIdVariableDescriptor(value);\n}\n\n/**\n * Function to fetch an object based on a provided descriptor object.\n * @param descriptor Descriptor object or URI to fetch the object from. Can be extended by a specific implementation to\n * include additional fields (such as a session ID) to uniquely identify an object.\n */\nexport type ObjectFetcher = <T = unknown>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor\n) => Promise<T>;\n\nexport const ObjectFetcherContext = createContext<ObjectFetcher | null>(null);\nObjectFetcherContext.displayName = 'ObjectFetcherContext';\n\n/**\n * Gets a descriptor that only has the ID or name set, but not both.\n * API will throw an error if both are set when fetching from the connection.\n * @param descriptor Variable descriptor to sanitize\n * @returns Descriptor object that has either the ID or name set, but not both.\n */\nexport function sanitizeVariableDescriptor(\n descriptor: Partial<dh.ide.VariableDescriptor>\n): NameVariableDescriptor | IdVariableDescriptor {\n // Can't use a spread operator because of how the GWT compiled code defines properties on the object: https://github.com/gwtproject/gwt/issues/9913\n if (isIdVariableDescriptor(descriptor)) {\n return {\n id: descriptor.id,\n type: descriptor.type,\n };\n }\n if (isNameVariableDescriptor(descriptor)) {\n return {\n name: descriptor.name ?? '',\n type: descriptor.type,\n };\n }\n throw new Error(`Invalid descriptor: ${descriptor}`);\n}\n\n/**\n * Get the variable descriptor for a definition.\n * @param definition Definition to get the variable descriptor from\n * @returns Serializable VariableDescriptor object\n */\nexport function getVariableDescriptor(\n definition: dh.ide.VariableDescriptor & { title?: string }\n): dh.ide.VariableDescriptor {\n return {\n type: definition.type ?? '',\n name: definition.title ?? definition.name,\n id: definition.id,\n };\n}\n\n/**\n * Use a function to fetch an object based on provided metadata\n * @returns Function to asynchronously fetch an object based on provided metadata\n */\nexport function useObjectFetcher(): ObjectFetcher {\n return useContextOrThrow(\n ObjectFetcherContext,\n 'No ObjectFetcher available in useObjectFetcher. Was code wrapped in ObjectFetcherContext.Provider?'\n );\n}\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,aAAa,QAAQ,OAAO;;AAErC;AACA;AACA;;A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A,OAAO,SAASI,qBAAqBA,CACnCC,UAA0D,EAC/B;EAAA,IAAAC,gBAAA,EAAAC,iBAAA;EAC3B,OAAO;IACLf,IAAI,GAAAc,gBAAA,GAAED,UAAU,CAACb,IAAI,cAAAc,gBAAA,cAAAA,gBAAA,GAAI,EAAE;IAC3Bb,IAAI,GAAAc,iBAAA,GAAEF,UAAU,CAACG,KAAK,cAAAD,iBAAA,cAAAA,iBAAA,GAAIF,UAAU,CAACZ,IAAI;IACzCE,EAAE,EAAEU,UAAU,CAACV;EACjB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASc,gBAAgBA,CAAA,EAAkB;EAChD,OAAOrB,iBAAiB,CACtBS,oBAAoB,EACpB,oGACF,CAAC;AACH"}
1
+ {"version":3,"file":"useObjectFetcher.js","names":["useContextOrThrow","createContext","isNameVariableDescriptor","value","type","name","isIdVariableDescriptor","id","isVariableDescriptor","ObjectFetcherContext","displayName","sanitizeVariableDescriptor","descriptor","_descriptor$name","Error","concat","getVariableDescriptor","definition","_definition$type","_definition$title","title","useObjectFetcher"],"sources":["../src/useObjectFetcher.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { createContext } from 'react';\n\n/**\n * Descriptor for a variable by name. Used when needed to fetch an object.\n */\nexport type NameVariableDescriptor = {\n /** Type of the variable */\n type: string;\n /** Name of the variable */\n name: string;\n};\n\n/**\n * Descriptor for a variable by id. Used when needed to fetch an object.\n */\nexport type IdVariableDescriptor = {\n /** Type of the variable */\n type: string;\n /** Id of the variable */\n id: string;\n};\n\nexport type UriVariableDescriptor = string;\n\nexport function isNameVariableDescriptor(\n value: unknown\n): value is NameVariableDescriptor {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as NameVariableDescriptor).type === 'string' &&\n (value as NameVariableDescriptor).name != null\n );\n}\n\nexport function isIdVariableDescriptor(\n value: unknown\n): value is IdVariableDescriptor {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as IdVariableDescriptor).type === 'string' &&\n (value as IdVariableDescriptor).id != null\n );\n}\n\nexport function isVariableDescriptor(\n value: unknown\n): value is dh.ide.VariableDescriptor {\n return isNameVariableDescriptor(value) || isIdVariableDescriptor(value);\n}\n\n/**\n * Function to fetch an object based on a provided descriptor object.\n * @param descriptor Descriptor object or URI to fetch the object from. Can be extended by a specific implementation to\n * include additional fields (such as a session ID) to uniquely identify an object.\n */\nexport type ObjectFetcher = <T = unknown>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor\n) => Promise<T>;\n\nexport const ObjectFetcherContext = createContext<ObjectFetcher | null>(null);\nObjectFetcherContext.displayName = 'ObjectFetcherContext';\n\n/**\n * Gets a descriptor that only has the ID or name set, but not both.\n * API will throw an error if both are set when fetching from the connection.\n * @param descriptor Variable descriptor to sanitize\n * @returns Descriptor object that has either the ID or name set, but not both.\n */\nexport function sanitizeVariableDescriptor(\n descriptor: Partial<dh.ide.VariableDescriptor>\n): NameVariableDescriptor | IdVariableDescriptor {\n // Can't use a spread operator because of how the GWT compiled code defines properties on the object: https://github.com/gwtproject/gwt/issues/9913\n if (isIdVariableDescriptor(descriptor)) {\n return {\n id: descriptor.id,\n type: descriptor.type,\n };\n }\n if (isNameVariableDescriptor(descriptor)) {\n return {\n name: descriptor.name ?? '',\n type: descriptor.type,\n };\n }\n throw new Error(`Invalid descriptor: ${descriptor}`);\n}\n\n/**\n * Get the variable descriptor for a definition.\n * @param definition Definition to get the variable descriptor from\n * @returns Serializable VariableDescriptor object\n */\nexport function getVariableDescriptor(\n definition: dh.ide.VariableDescriptor & { title?: string }\n): dh.ide.VariableDescriptor {\n return {\n type: definition.type ?? '',\n name: definition.title ?? definition.name,\n id: definition.id,\n };\n}\n\n/**\n * Use a function to fetch an object based on provided metadata\n * @returns Function to asynchronously fetch an object based on provided metadata\n */\nexport function useObjectFetcher(): ObjectFetcher {\n return useContextOrThrow(\n ObjectFetcherContext,\n 'No ObjectFetcher available in useObjectFetcher. Was code wrapped in ObjectFetcherContext.Provider?'\n );\n}\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,aAAa,QAAQ,OAAO;;AAErC;AACA;AACA;;AAQA;AACA;AACA;;AAUA,OAAO,SAASC,wBAAwBA,CACtCC,KAAc,EACmB;EACjC,OACE,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,IAAI,IAAI,IACb,OAAQA,KAAK,CAA4BC,IAAI,KAAK,QAAQ,IACzDD,KAAK,CAA4BE,IAAI,IAAI,IAAI;AAElD;AAEA,OAAO,SAASC,sBAAsBA,CACpCH,KAAc,EACiB;EAC/B,OACE,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,IAAI,IAAI,IACb,OAAQA,KAAK,CAA0BC,IAAI,KAAK,QAAQ,IACvDD,KAAK,CAA0BI,EAAE,IAAI,IAAI;AAE9C;AAEA,OAAO,SAASC,oBAAoBA,CAClCL,KAAc,EACsB;EACpC,OAAOD,wBAAwB,CAACC,KAAK,CAAC,IAAIG,sBAAsB,CAACH,KAAK,CAAC;AACzE;;AAEA;AACA;AACA;AACA;AACA;;AAKA,OAAO,IAAMM,oBAAoB,gBAAGR,aAAa,CAAuB,IAAI,CAAC;AAC7EQ,oBAAoB,CAACC,WAAW,GAAG,sBAAsB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CACxCC,UAA8C,EACC;EAC/C;EACA,IAAIN,sBAAsB,CAACM,UAAU,CAAC,EAAE;IACtC,OAAO;MACLL,EAAE,EAAEK,UAAU,CAACL,EAAE;MACjBH,IAAI,EAAEQ,UAAU,CAACR;IACnB,CAAC;EACH;EACA,IAAIF,wBAAwB,CAACU,UAAU,CAAC,EAAE;IAAA,IAAAC,gBAAA;IACxC,OAAO;MACLR,IAAI,GAAAQ,gBAAA,GAAED,UAAU,CAACP,IAAI,cAAAQ,gBAAA,cAAAA,gBAAA,GAAI,EAAE;MAC3BT,IAAI,EAAEQ,UAAU,CAACR;IACnB,CAAC;EACH;EACA,MAAM,IAAIU,KAAK,wBAAAC,MAAA,CAAwBH,UAAU,CAAE,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,qBAAqBA,CACnCC,UAA0D,EAC/B;EAAA,IAAAC,gBAAA,EAAAC,iBAAA;EAC3B,OAAO;IACLf,IAAI,GAAAc,gBAAA,GAAED,UAAU,CAACb,IAAI,cAAAc,gBAAA,cAAAA,gBAAA,GAAI,EAAE;IAC3Bb,IAAI,GAAAc,iBAAA,GAAEF,UAAU,CAACG,KAAK,cAAAD,iBAAA,cAAAA,iBAAA,GAAIF,UAAU,CAACZ,IAAI;IACzCE,EAAE,EAAEU,UAAU,CAACV;EACjB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASc,gBAAgBA,CAAA,EAAkB;EAChD,OAAOrB,iBAAiB,CACtBS,oBAAoB,EACpB,oGACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useWidget.js","names":["Log","assertNotNull","useEffect","useMemo","useState","useObjectFetch","useDeferredApi","useApi","log","module","useWidget","descriptor","wrapper","setWrapper","widget","error","objectFetch","descriptorApi","descriptorApiError","defaultApi","api","loadWidget","debug","status","fetch","isCancelled","loadWidgetInternal","_loadWidgetInternal","apply","arguments","_asyncToGenerator","newWidget","debug2","close","exportedObjects","forEach","exportedObject","e","Error","wrapperWithApi","_wrapper$error","_objectSpread"],"sources":["../src/useWidget.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useObjectFetch } from './useObjectFetch';\nimport { type UriVariableDescriptor } from './useObjectFetcher';\nimport useDeferredApi from './useDeferredApi';\nimport useApi from './useApi';\n\nconst log = Log.module('useWidget');\n\n/**\n * Types of widgets that can be fetched with this hook.\n */\nexport type WidgetTypes =\n | dh.Table\n | dh.TreeTable\n | dh.PartitionedTable\n | dh.plot.Figure\n | dh.Widget;\n\n/**\n * Wrapper object for a widget and error status. Both widget and error will be `null` if it is still loading.\n */\nexport type WidgetWrapper<T extends WidgetTypes = dh.Widget> = {\n /** Widget object to retrieve */\n widget: T | null;\n\n /** Deephaven JS API to use for this widget */\n api: typeof dh | null;\n\n /** Error status if there was an issue fetching the widget */\n error: NonNullable<unknown> | null;\n};\n\n/**\n * Retrieve a widget for the given variable descriptor. Note that if the widget is successfully fetched, ownership of the widget is passed to the consumer and will need to close the object as well.\n * @param descriptor Descriptor or URI to get the widget for. Should be stable to avoid infinite re-fetching.\n * @returns A WidgetWrapper object that contains the widget and JS API, or an error status if there was an issue fetching the widget. Will contain nulls if still loading.\n */\nexport function useWidget<T extends WidgetTypes = dh.Widget>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor\n): WidgetWrapper<T> {\n const [wrapper, setWrapper] = useState<\n Omit<WidgetWrapper<T>, 'api' | 'ApiProvider'>\n >(() => ({\n widget: null,\n error: null,\n }));\n const objectFetch = useObjectFetch<T>(descriptor);\n const [descriptorApi, descriptorApiError] = useDeferredApi(descriptor);\n const defaultApi = useApi();\n\n const api = descriptorApi ?? defaultApi;\n\n useEffect(\n function loadWidget() {\n log.debug('loadWidget', descriptor);\n\n const { status } = objectFetch;\n\n if (status === 'error') {\n // We can't fetch if there's an error getting the fetcher, just return an error\n setWrapper({ widget: null, error: objectFetch.error });\n return;\n }\n\n if (status === 'loading') {\n // Still loading\n setWrapper({ widget: null, error: null });\n return;\n }\n\n const { fetch } = objectFetch;\n // We should be able to load the widget. Load it asynchronously, and set the widget when it's done.\n // If we get cancelled before the fetch is done, we should close the widget and its exported objects.\n // If not though, the consumer of the widget is expected to take ownership and close the widget appropriately.\n let isCancelled = false;\n async function loadWidgetInternal() {\n try {\n assertNotNull(fetch);\n const newWidget = await fetch();\n if (isCancelled) {\n log.debug2('loadWidgetInternal cancelled', descriptor, newWidget);\n newWidget.close();\n if ('exportedObjects' in newWidget) {\n newWidget.exportedObjects.forEach(exportedObject => {\n exportedObject.close();\n });\n }\n return;\n }\n log.debug('loadWidgetInternal done', descriptor, newWidget);\n\n setWrapper({ widget: newWidget, error: null });\n } catch (e) {\n if (isCancelled) {\n return;\n }\n log.error('loadWidgetInternal error', descriptor, e);\n setWrapper({ widget: null, error: e ?? new Error('Null error') });\n }\n }\n loadWidgetInternal();\n return () => {\n isCancelled = true;\n };\n },\n [descriptor, objectFetch]\n );\n\n const wrapperWithApi = useMemo(\n () => ({\n ...wrapper,\n error: wrapper.error ?? descriptorApiError,\n api: wrapper.widget != null ? api : null,\n }),\n [wrapper, api, descriptorApiError]\n );\n\n return wrapperWithApi;\n}\n\nexport default useWidget;\n"],"mappings":";;;;;;;AACA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAC5CC,cAAc;AAAA,OAEhBC,cAAc;AAAA,OACdC,MAAM;AAEb,IAAMC,GAAG,GAAGR,GAAG,CAACS,MAAM,CAAC,WAAW,CAAC;;AAEnC;AACA;AACA;;AAQA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CACvBC,UAA6D,EAC3C;EAClB,IAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGT,QAAQ,CAEpC,OAAO;IACPU,MAAM,EAAE,IAAI;IACZC,KAAK,EAAE;EACT,CAAC,CAAC,CAAC;EACH,IAAMC,WAAW,GAAGX,cAAc,CAAIM,UAAU,CAAC;EACjD,IAAM,CAACM,aAAa,EAAEC,kBAAkB,CAAC,GAAGZ,cAAc,CAACK,UAAU,CAAC;EACtE,IAAMQ,UAAU,GAAGZ,MAAM,CAAC,CAAC;EAE3B,IAAMa,GAAG,GAAGH,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAIE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AChD,CAAC,CAAC,OAAOsB,CAAC,EAAE;UACV,IAAIZ,WAAW,EAAE;YACf;UACF;UACAjB,GAAG,CAACO,KAAK,CAAC,0BAA0B,EAAEJ,UAAU,EAAE0B,CAAC,CAAC;UACpDxB,UAAU,CAAC;YAAEC,MAAM,EAAE,IAAI;YAAEC,KAAK,EAAEsB,CAAC,aAADA,CAAC,cAADA,CAAC,GAAI,IAAIC,KAAK,CAAC,YAAY;UAAE,CAAC,CAAC;QACnE;MACF,CAAC;MAAA,OAAAX,mBAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IACDH,kBAAkB,CAAC,CAAC;IACpB,OAAO,MAAM;MACXD,WAAW,GAAG,IAAI;IACpB,CAAC;EACH,CAAC,EACD,CAACd,UAAU,EAAEK,WAAW,CAC1B,CAAC;EAED,IAAMuB,cAAc,GAAGpC,OAAO,CAC5B;IAAA,IAAAqC,cAAA;IAAA,OAAAC,aAAA,CAAAA,aAAA,KACK7B,OAAO;MACVG,KAAK,GAAAyB,cAAA,GAAE5B,OAAO,CAACG,KAAK,cAAAyB,cAAA,cAAAA,cAAA,GAAItB,kBAAkB;MAC1CE,GAAG,EAAER,OAAO,CAACE,MAAM,IAAI,IAAI,GAAGM,GAAG,GAAG;IAAI;EAAA,CACxC,EACF,CAACR,OAAO,EAAEQ,GAAG,EAAEF,kBAAkB,CACnC,CAAC;EAED,OAAOqB,cAAc;AACvB;AAEA,eAAe7B,SAAS"}
1
+ {"version":3,"file":"useWidget.js","names":["Log","assertNotNull","useEffect","useMemo","useState","useObjectFetch","useDeferredApi","useApi","log","module","useWidget","descriptor","wrapper","setWrapper","widget","error","objectFetch","descriptorApi","descriptorApiError","defaultApi","api","loadWidget","debug","status","fetch","isCancelled","loadWidgetInternal","_loadWidgetInternal","apply","arguments","_asyncToGenerator","newWidget","debug2","close","exportedObjects","forEach","exportedObject","e","Error","wrapperWithApi","_wrapper$error","_objectSpread"],"sources":["../src/useWidget.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useObjectFetch } from './useObjectFetch';\nimport { type UriVariableDescriptor } from './useObjectFetcher';\nimport useDeferredApi from './useDeferredApi';\nimport useApi from './useApi';\n\nconst log = Log.module('useWidget');\n\n/**\n * Types of widgets that can be fetched with this hook.\n */\nexport type WidgetTypes =\n | dh.Table\n | dh.TreeTable\n | dh.PartitionedTable\n | dh.plot.Figure\n | dh.Widget;\n\n/**\n * Wrapper object for a widget and error status. Both widget and error will be `null` if it is still loading.\n */\nexport type WidgetWrapper<T extends WidgetTypes = dh.Widget> = {\n /** Widget object to retrieve */\n widget: T | null;\n\n /** Deephaven JS API to use for this widget */\n api: typeof dh | null;\n\n /** Error status if there was an issue fetching the widget */\n error: NonNullable<unknown> | null;\n};\n\n/**\n * Retrieve a widget for the given variable descriptor. Note that if the widget is successfully fetched, ownership of the widget is passed to the consumer and will need to close the object as well.\n * @param descriptor Descriptor or URI to get the widget for. Should be stable to avoid infinite re-fetching.\n * @returns A WidgetWrapper object that contains the widget and JS API, or an error status if there was an issue fetching the widget. Will contain nulls if still loading.\n */\nexport function useWidget<T extends WidgetTypes = dh.Widget>(\n descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor\n): WidgetWrapper<T> {\n const [wrapper, setWrapper] = useState<\n Omit<WidgetWrapper<T>, 'api' | 'ApiProvider'>\n >(() => ({\n widget: null,\n error: null,\n }));\n const objectFetch = useObjectFetch<T>(descriptor);\n const [descriptorApi, descriptorApiError] = useDeferredApi(descriptor);\n const defaultApi = useApi();\n\n const api = descriptorApi ?? defaultApi;\n\n useEffect(\n function loadWidget() {\n log.debug('loadWidget', descriptor);\n\n const { status } = objectFetch;\n\n if (status === 'error') {\n // We can't fetch if there's an error getting the fetcher, just return an error\n setWrapper({ widget: null, error: objectFetch.error });\n return;\n }\n\n if (status === 'loading') {\n // Still loading\n setWrapper({ widget: null, error: null });\n return;\n }\n\n const { fetch } = objectFetch;\n // We should be able to load the widget. Load it asynchronously, and set the widget when it's done.\n // If we get cancelled before the fetch is done, we should close the widget and its exported objects.\n // If not though, the consumer of the widget is expected to take ownership and close the widget appropriately.\n let isCancelled = false;\n async function loadWidgetInternal() {\n try {\n assertNotNull(fetch);\n const newWidget = await fetch();\n if (isCancelled) {\n log.debug2('loadWidgetInternal cancelled', descriptor, newWidget);\n newWidget.close();\n if ('exportedObjects' in newWidget) {\n newWidget.exportedObjects.forEach(exportedObject => {\n exportedObject.close();\n });\n }\n return;\n }\n log.debug('loadWidgetInternal done', descriptor, newWidget);\n\n setWrapper({ widget: newWidget, error: null });\n } catch (e) {\n if (isCancelled) {\n return;\n }\n log.error('loadWidgetInternal error', descriptor, e);\n setWrapper({ widget: null, error: e ?? new Error('Null error') });\n }\n }\n loadWidgetInternal();\n return () => {\n isCancelled = true;\n };\n },\n [descriptor, objectFetch]\n );\n\n const wrapperWithApi = useMemo(\n () => ({\n ...wrapper,\n error: wrapper.error ?? descriptorApiError,\n api: wrapper.widget != null ? api : null,\n }),\n [wrapper, api, descriptorApiError]\n );\n\n return wrapperWithApi;\n}\n\nexport default useWidget;\n"],"mappings":";;;;;;;AACA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAC5CC,cAAc;AAAA,OAEhBC,cAAc;AAAA,OACdC,MAAM;AAEb,IAAMC,GAAG,GAAGR,GAAG,CAACS,MAAM,CAAC,WAAW,CAAC;;AAEnC;AACA;AACA;;AAQA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CACvBC,UAA6D,EAC3C;EAClB,IAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGT,QAAQ,CAEpC,OAAO;IACPU,MAAM,EAAE,IAAI;IACZC,KAAK,EAAE;EACT,CAAC,CA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
- "version": "1.7.2-beta.1+a19bc114",
3
+ "version": "1.7.2-beta.3+b369a51e",
4
4
  "description": "Deephaven JSAPI Bootstrap",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,15 +22,14 @@
22
22
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^1.7.2-beta.1+a19bc114",
25
+ "@deephaven/components": "^1.7.2-beta.3+b369a51e",
26
26
  "@deephaven/jsapi-types": "^1.0.0-dev0.39.4",
27
- "@deephaven/log": "^1.7.2-beta.1+a19bc114",
28
- "@deephaven/react-hooks": "^1.7.2-beta.1+a19bc114",
29
- "@deephaven/utils": "^1.7.2-beta.1+a19bc114"
27
+ "@deephaven/log": "^1.7.2-beta.3+b369a51e",
28
+ "@deephaven/react-hooks": "^1.7.2-beta.3+b369a51e",
29
+ "@deephaven/utils": "^1.7.2-beta.3+b369a51e"
30
30
  },
31
31
  "devDependencies": {
32
- "@deephaven/test-utils": "^1.7.2-beta.1+a19bc114",
33
- "react": "^17.x"
32
+ "@deephaven/test-utils": "^1.7.2-beta.3+b369a51e"
34
33
  },
35
34
  "peerDependencies": {
36
35
  "react": ">=16.8.0"
@@ -42,5 +41,5 @@
42
41
  "publishConfig": {
43
42
  "access": "public"
44
43
  },
45
- "gitHead": "a19bc11446da4328bc5c216064ec810b24ee0312"
44
+ "gitHead": "b369a51ee94d212641a14c6ce1f19fcc85168339"
46
45
  }