@deephaven/embed-grid 0.55.1-beta.11 → 0.55.1-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -47
- package/build/assets/{App-ddc6b344.css → App-bad0fe82.css} +1 -1
- package/build/assets/{App-5f79b02f.js → App-d44495e7.js} +2 -2
- package/build/assets/App-d44495e7.js.map +1 -0
- package/build/assets/{index-6f25a354.js → index-0f1ab464.js} +2 -2
- package/build/assets/{index-6f25a354.js.map → index-0f1ab464.js.map} +1 -1
- package/build/assets/index-e3f519e6.js +5 -0
- package/build/assets/index-e3f519e6.js.map +1 -0
- package/build/assets/{useUser-ca6481c7.js → useUser-f3bbb242.js} +2 -2
- package/build/assets/{useUser-ca6481c7.js.map → useUser-f3bbb242.js.map} +1 -1
- package/build/index.html +2 -7
- package/package.json +14 -14
- package/build/assets/App-5f79b02f.js.map +0 -1
- package/build/assets/index-58b25c0a.js +0 -5
- package/build/assets/index-58b25c0a.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
This project uses [Vite](https://vitejs.dev/). It is to provide an example React application connecting to Deephaven and displaying a table of data.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Running
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. **Install dependencies**: Run `npm install` to install all dependencies required.
|
|
9
|
-
3. **Start the UI**: Run `npm start` to start up the UI. It should automatically open up at http://localhost:4010.
|
|
7
|
+
To start the Embed Grid server, run `npm install` and `npm start` in the root directory of this repository. See the [Getting Started](../../README.md#getting-started) section for more details.
|
|
10
8
|
|
|
11
9
|
## Query Parameters
|
|
12
10
|
|
|
@@ -57,46 +55,3 @@ Once Deephaven is running, you can open a table with a specific name by adding t
|
|
|
57
55
|
### Configuring Server Address
|
|
58
56
|
|
|
59
57
|
By default, this project assumes you are hosting Deephaven with Python on the default port at http://localhost:10000. If Deephaven is running on a different port/server, update the `VITE_CORE_API_URL` environment variable to point to the correct server. See [.env](./.env) file for the default definition, and [Vite docs](https://vitejs.dev/guide/env-and-mode.html) for other info about environment variables.
|
|
60
|
-
|
|
61
|
-
## Available Scripts
|
|
62
|
-
|
|
63
|
-
In the project directory, you can run:
|
|
64
|
-
|
|
65
|
-
### `npm start`
|
|
66
|
-
|
|
67
|
-
Runs the app in the development mode.\
|
|
68
|
-
Open [http://localhost:4010](http://localhost:4010) to view it in the browser.
|
|
69
|
-
|
|
70
|
-
The page will reload if you make edits.\
|
|
71
|
-
You will also see any lint errors in the console.
|
|
72
|
-
|
|
73
|
-
### `npm test`
|
|
74
|
-
|
|
75
|
-
Launches the test runner in the interactive watch mode.\
|
|
76
|
-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
77
|
-
|
|
78
|
-
### `npm run build`
|
|
79
|
-
|
|
80
|
-
Builds the app for production to the `build` folder.\
|
|
81
|
-
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
82
|
-
|
|
83
|
-
The build is minified and the filenames include the hashes.\
|
|
84
|
-
Your app is ready to be deployed!
|
|
85
|
-
|
|
86
|
-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
|
87
|
-
|
|
88
|
-
### `npm run eject`
|
|
89
|
-
|
|
90
|
-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
|
91
|
-
|
|
92
|
-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
|
93
|
-
|
|
94
|
-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
|
95
|
-
|
|
96
|
-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
|
97
|
-
|
|
98
|
-
## Learn More
|
|
99
|
-
|
|
100
|
-
You can learn more in the [Vite documentation](https://vitejs.dev/guide/).
|
|
101
|
-
|
|
102
|
-
To learn React, check out the [React documentation](https://reactjs.org/).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.App{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100
|
|
1
|
+
.App{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,C as d}from"./vendor-094aa5bb.js";import{u as $,a as P,I as D,C as F,b as U,f as k}from"./useUser-
|
|
2
|
-
//# sourceMappingURL=App-
|
|
1
|
+
import{r as s,C as d}from"./vendor-094aa5bb.js";import{u as $,a as P,I as D,C as F,b as U,f as k}from"./useUser-f3bbb242.js";import{L as C,a as B}from"./index-0f1ab464.js";import"./helpers-042e6b4d.js";import"./monaco-9eb7d7d5.js";var{dh:G}=globalThis;const i=G;C.setLogLevel(parseInt("2",10));const c=C.module("EmbedGrid.App"),N=[i.VariableType.TABLE,i.VariableType.TREETABLE,i.VariableType.HIERARCHICALTABLE,i.VariableType.PANDAS];async function O(a,r){c.info(`Fetching table ${r}...`);const e=await k(a,r);if(!N.includes(e.type))throw new Error(`Unsupported type '${e.type}' for variable named '${r}'`);return await a.getObject(e)}function J(){const a=$(),r=P(),[e,E]=s.useState(),[L,y]=s.useState(),[h,v]=s.useState(),[A,T]=s.useState(),[S,x]=s.useState(!0),g=s.useMemo(()=>new URLSearchParams(window.location.search),[]),{permissions:I}=r,{canCopy:V,canDownloadCsv:j}=I;s.useEffect(function(){async function l(){try{const t=g.get("name");if(t==null)throw new Error("No name param provided");c.debug("Loading table",t,"...");const p=await O(a,t);c.debug("Creating model...");const u=await U.makeModel(i,p);E(u),c.debug("Table successfully loaded!")}catch(t){c.error("Unable to load table",t),y(`${t}`)}x(!1)}l()},[a,g]),s.useEffect(function(){function l(t){const{command:p,value:u}=t.data;switch(p){case"filter":{const f=u.map(({name:o,value:b})=>{const n=e==null?void 0:e.columns.find(w=>w.name===o);if(n==null)throw new Error(`Could not find column named ${o}`);return{name:o,value:b,type:n.type}});v(f);break}case"sort":{const f=u.map(({name:o,direction:b})=>{const n=e==null?void 0:e.columns.find(w=>w.name===o);if(n==null)throw new Error(`Could not find column named ${o}`);return b==="DESC"?n.sort().desc():n.sort().asc()});T(f);break}}}return window.addEventListener("message",l),()=>{window.removeEventListener("message",l)}},[e]);const m=e!=null;return d.jsxs("div",{className:"App",children:[m&&d.jsx(D,{canCopy:V,canDownloadCsv:j,model:e,inputFilters:h,sorts:A}),!m&&d.jsx(B,{isLoaded:m,isLoading:S,errorMessage:L??null}),d.jsx(F,{})]})}export{J as default};
|
|
2
|
+
//# sourceMappingURL=App-d44495e7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App-d44495e7.js","sources":["../../../jsapi-shim/dist/dh.js","../../src/App.tsx"],"sourcesContent":["// The Deephaven API script isn't packaged as a module (yet), and is just included in index.html, exported to the global namespace\n// This include file is simply a wrapper so that it behaves like a module, and can be mocked easily for unit tests\n\nvar {\n dh\n} = globalThis;\nexport default dh;\n//# sourceMappingURL=dh.js.map","import React, { useEffect, useMemo, useState } from 'react';\nimport { useUser } from '@deephaven/app-utils';\nimport { useConnection } from '@deephaven/jsapi-components';\nimport { ContextMenuRoot, LoadingOverlay } from '@deephaven/components'; // Use the loading spinner from the Deephaven components package\nimport {\n InputFilter,\n IrisGrid,\n IrisGridModel,\n IrisGridModelFactory,\n} from '@deephaven/iris-grid'; // iris-grid is used to display Deephaven tables\nimport dh from '@deephaven/jsapi-shim'; // Import the shim to use the JS API\nimport type { IdeConnection, Sort, Table } from '@deephaven/jsapi-types';\nimport { fetchVariableDefinition } from '@deephaven/jsapi-utils';\nimport Log from '@deephaven/log';\nimport './App.scss'; // Styles for in this app\n\nLog.setLogLevel(parseInt(import.meta.env.VITE_LOG_LEVEL ?? '', 10));\n\nconst log = Log.module('EmbedGrid.App');\n\nconst SUPPORTED_TYPES: string[] = [\n dh.VariableType.TABLE,\n dh.VariableType.TREETABLE,\n dh.VariableType.HIERARCHICALTABLE,\n dh.VariableType.PANDAS,\n];\n\nexport type Command = 'filter' | 'sort';\n\n/** Input value for filter commands */\nexport type FilterCommandType = {\n name: string;\n value: string;\n};\n\nexport type SortCommandType = {\n name: string;\n direction?: 'ASC' | 'DESC';\n};\n\n/**\n * Load an existing Deephaven table with the connection provided\n * @param connection The Deephaven session object\n * @param name Name of the table to load\n * @param type The type of table to load\n * @returns Deephaven table\n */\nasync function loadTable(\n connection: IdeConnection,\n name: string\n): Promise<Table> {\n log.info(`Fetching table ${name}...`);\n\n const definition = await fetchVariableDefinition(connection, name);\n if (!SUPPORTED_TYPES.includes(definition.type)) {\n throw new Error(\n `Unsupported type '${definition.type}' for variable named '${name}'`\n );\n }\n const object = await connection.getObject(definition);\n return object as Table;\n}\n\n/**\n * A functional React component that displays a Deephaven table in an IrisGrid using the @deephaven/iris-grid package.\n * It will attempt to open and display the table specified with the `name` parameter, expecting it to be present on the server.\n * E.g. http://localhost:3000/?name=myTable will attempt to open a table `myTable`\n * If no query param is provided, it will attempt to open a new session and create a basic time table and display that.\n * By default, tries to connect to the server defined in the VITE_CORE_API_URL variable, which is set to http://localhost:1000/jsapi\n * See Vite docs for how to update these env vars: https://vitejs.dev/guide/env-and-mode.html\n */\nfunction App(): JSX.Element {\n const connection = useConnection();\n const user = useUser();\n const [model, setModel] = useState<IrisGridModel>();\n const [error, setError] = useState<string>();\n const [inputFilters, setInputFilters] = useState<InputFilter[]>();\n const [sorts, setSorts] = useState<Sort[]>();\n const [isLoading, setIsLoading] = useState(true);\n const searchParams = useMemo(\n () => new URLSearchParams(window.location.search),\n []\n );\n const { permissions } = user;\n const { canCopy, canDownloadCsv } = permissions;\n\n useEffect(\n function initializeApp() {\n async function initApp(): Promise<void> {\n try {\n // Get the table name from the query param `name`.\n const name = searchParams.get('name');\n if (name == null) {\n throw new Error('No name param provided');\n }\n log.debug('Loading table', name, '...');\n // Load the table up.\n const table = await loadTable(connection, name);\n // Create the `IrisGridModel` for use with the `IrisGrid` component\n log.debug(`Creating model...`);\n const newModel = await IrisGridModelFactory.makeModel(dh, table);\n setModel(newModel);\n log.debug('Table successfully loaded!');\n } catch (e: unknown) {\n log.error('Unable to load table', e);\n setError(`${e}`);\n }\n setIsLoading(false);\n }\n initApp();\n },\n [connection, searchParams]\n );\n\n useEffect(\n function initCommandListener() {\n function receiveMessage(e: MessageEvent): void {\n const { command, value } = e.data as {\n command: Command;\n value: unknown;\n };\n switch (command) {\n case 'filter': {\n const filterCommandValues = value as FilterCommandType[];\n const newInputFilters = filterCommandValues.map(\n ({ name, value: filterValue }) => {\n const column = model?.columns.find(c => c.name === name);\n if (column == null) {\n throw new Error(`Could not find column named ${name}`);\n }\n return {\n name,\n value: filterValue,\n type: column.type,\n };\n }\n );\n setInputFilters(newInputFilters);\n break;\n }\n case 'sort': {\n const sortCommandValues = value as SortCommandType[];\n const newSorts = sortCommandValues.map(({ name, direction }) => {\n const column = model?.columns.find(c => c.name === name);\n if (column == null) {\n throw new Error(`Could not find column named ${name}`);\n }\n return direction === 'DESC'\n ? column.sort().desc()\n : column.sort().asc();\n });\n setSorts(newSorts);\n break;\n }\n }\n }\n window.addEventListener('message', receiveMessage);\n\n return () => {\n window.removeEventListener('message', receiveMessage);\n };\n },\n [model]\n );\n\n const isLoaded = model != null;\n\n return (\n <div className=\"App\">\n {isLoaded && (\n <IrisGrid\n canCopy={canCopy}\n canDownloadCsv={canDownloadCsv}\n model={model}\n inputFilters={inputFilters}\n sorts={sorts}\n />\n )}\n {!isLoaded && (\n <LoadingOverlay\n isLoaded={isLoaded}\n isLoading={isLoading}\n errorMessage={error ?? null}\n />\n )}\n <ContextMenuRoot />\n </div>\n );\n}\n\nexport default App;\n"],"names":["dh","shim","Log","log","SUPPORTED_TYPES","loadTable","connection","name","definition","fetchVariableDefinition","App","useConnection","user","useUser","model","setModel","useState","error","setError","inputFilters","setInputFilters","sorts","setSorts","isLoading","setIsLoading","searchParams","useMemo","permissions","canCopy","canDownloadCsv","useEffect","initApp","table","newModel","IrisGridModelFactory","e","receiveMessage","command","value","newInputFilters","filterValue","column","c","newSorts","direction","isLoaded","jsxs","jsx","IrisGrid","LoadingOverlay","ContextMenuRoot"],"mappings":"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"}
|
|
@@ -5,5 +5,5 @@ import{_ as A}from"./monaco-9eb7d7d5.js";import{r as d,R as T,C as v,D as b,E as
|
|
|
5
5
|
`,j7=`:root{--dh-color-grid-bg: var(--dh-color-background);--dh-color-grid-header-bg: var(--dh-color-gray-100);--dh-color-grid-header-text: var(--dh-color-heading-text);--dh-color-grid-header-separator: var(--dh-color-gray-50);--dh-color-grid-header-separator-hover: var(--dh-color-gray-600);--dh-color-grid-header-separator-hidden-hover: var(--dh-color-accent-700);--dh-color-grid-header-sort-bar: var(--dh-color-visual-purple);--dh-color-grid-header-reverse-bar: var(--dh-color-visual-green);--dh-color-grid-header-bar-casing: var(--dh-color-gray-50);--dh-color-grid-row-0-bg: var(--dh-color-gray-300);--dh-color-grid-row-1-bg: var(--dh-color-gray-100);--dh-color-grid-row-hover-bg: var(--dh-color-gray-400);--dh-color-grid-row-hover-bg-selected: var( --dh-color-highlight-selected-hover );--dh-color-grid-selection: var(--dh-color-highlight-selected);--dh-color-grid-selection-outline: var(--dh-color-accent-900);--dh-color-grid-selection-outline-casing: var(--dh-color-gray-50);--dh-color-grid-scroll-bar-active-selection-tick: var(--dh-color-accent-400);--dh-color-grid-scroll-bar-bg: var(--dh-color-gray-100);--dh-color-grid-scroll-bar-hover-bg: var(--dh-color-gray-200);--dh-color-grid-scroll-bar-casing: var(--dh-color-gray-400);--dh-color-grid-scroll-bar-corner: var(--dh-color-gray-100);--dh-color-grid-scroll-bar: var(--dh-color-gray-500);--dh-color-grid-scroll-bar-hover: var(--dh-color-gray-600);--dh-color-grid-scroll-bar-active: var(--dh-color-gray-700);--dh-color-grid-text: var(--dh-color-text);--dh-color-grid-text-hyperlink: var(--dh-color-accent-1000);--dh-color-grid-text-pending: var(--dh-color-yellow-1300);--dh-color-grid-text-error: var(--dh-color-visual-negative);--dh-color-grid-date: var(--dh-color-visual-notice);--dh-color-grid-number-positive: var(--dh-color-visual-positive);--dh-color-grid-number-negative: var(--dh-color-visual-negative);--dh-color-grid-number-zero: var(--dh-color-visual-notice);--dh-color-grid-string-null: var(--dh-color-gray-600);--dh-color-grid-filter-bar-active-bg: hsla( var(--dh-color-accent-700-hsl), 0.5 );--dh-color-grid-filter-bar-active: var(--dh-color-accent-600);--dh-color-grid-filter-bar-expanded-bg: var(--dh-color-gray-200);--dh-color-grid-filter-bar-expanded-active-bg: hsla( var(--dh-color-accent-1000-hsl), 0.19 );--dh-color-grid-filter-bar-expanded-active-cell-bg: hsla( var(--dh-color-accent-700-hsl), 0.32 );--dh-color-grid-filter-bar-separator: var(--dh-color-gray-600);--dh-color-grid-filter-bar-error: var(--dh-color-visual-negative);--dh-color-grid-filter-icon: var(--dh-color-accent-600);--dh-color-grid-context-menu-sort-icon: var(--dh-color-visual-purple);--dh-color-grid-context-menu-reverse-icon: var(--dh-color-visual-green);--dh-color-grid-column-linker-hover-bg: var( --dh-color-highlight-selected-hover );--dh-color-grid-column-grouped-divider: var(--dh-color-gray-50);--dh-color-grid-tree-line: var(--dh-color-gray-500);--dh-color-grid-tree-marker: var(--dh-color-gray-700);--dh-color-grid-tree-marker-hover: var(--dh-color-gray-900);--dh-color-grid-floating-row: var(--dh-color-gray-300);--dh-color-grid-floating-row-bg: var(--dh-color-gray-200);--dh-color-grid-floating-divider-inner: var(--dh-color-gray-200);--dh-color-grid-floating-divider-outer: var(--dh-color-gray-50);--dh-color-grid-overflow-button: var(--dh-color-gray-700);--dh-color-grid-overflow-button-hover: var(--dh-color-gray-900);--dh-color-grid-data-bar-positive: var(--dh-color-visual-positive);--dh-color-grid-data-bar-negative: var(--dh-color-visual-negative);--dh-color-grid-data-bar-marker: var(--dh-color-white);--dh-color-grid-data-bar-zero-line: var(--dh-color-gray-300);--dh-color-grid-scrim: var(--dh-color-gray-50)}/*# sourceMappingURL=theme-dark-semantic-grid.css.map */
|
|
6
6
|
`,q7=`:root{--dh-color-loading-spinner-primary: var(--dh-color-accent-default-bg);--dh-color-loading-spinner-secondary: hsla(var(--dh-color-gray-800-hsl), 0.5);--dh-color-quickactions-bg: hsla(var(--dh-color-visual-gray-hsl), 0.9);--dh-color-radial-reaction: hsla(var(--dh-color-visual-gray-hsl), 0.6);--dh-color-colorpicker-border: hsla(var(--dh-color-visual-gray-hsl), 0.1);--dh-color-search-icon: var(--dh-color-foreground);--dh-color-form-control-error: hsl(var(--dh-color-visual-negative-hsl));--dh-color-form-control-error-shadow: hsla( var(--dh-color-visual-negative-hsl), 0.25 );--dh-color-selector-fg: hsla(var(--dh-color-gray-800-hsl), 0.4);--dh-color-selector-hover-fg: hsl(var(--dh-color-gray-800-hsl));--dh-color-selector-disabled-fg: hsla( var(--dh-color-gray-800-hsl), /* * Other dropdowns have opacity .4 when not hovered and then an additional * .65 opacity applied to disabled, hence .4 * .65 == .26 */ 0.26 )}/*# sourceMappingURL=theme-dark-components.css.map */
|
|
7
7
|
`;var W7=[G7,U7,I7,_7,j7,q7].join(`
|
|
8
|
-
`),N="default-dark",ml="default-light",T9={"--dh-color-loading-spinner-primary":"#3b6bda","--dh-color-loading-spinner-secondary":"#f0f0ee80","--dh-color-background":"#1a171a","--dh-color-foreground":"#f0f0ee"},K7={"--dh-svg-icon-select-indicator":"--dh-color-selector-fg","--dh-svg-icon-select-indicator-hover":"--dh-color-selector-hover-fg","--dh-svg-icon-select-indicator-disabled":"--dh-color-selector-disabled-fg","--dh-svg-icon-error":"--dh-color-form-control-error"},O9="deephaven.themeCache",H=E9.module("ThemeUtils"),B9="var(--",R="dh-tmp",$7=/\S/,P=/\s/;function J7(){var o=G9(document.body),l=Object.keys(T9).map(e=>"".concat(e,":").concat(o(e)));return":root{".concat(l.join(";"),"}")}function G9(o){var l=getComputedStyle(o);return function(r){var c,a=l.getPropertyValue(r);return a!==""?a:(c=T9[r])!==null&&c!==void 0?c:""}}function X7(o){var l=new Set;return Object.values(o).forEach(e=>{U9(e).forEach(r=>{var[c,a]=r,h=e.substring(c,a+1);h.includes(B9)&&l.add(h)})}),l}function fl(o,l){var e,r=l.custom.find(h=>h.themeKey===o),c=(e=r==null?void 0:r.baseThemeKey)!==null&&e!==void 0?e:o,a=l.base.find(h=>h.themeKey===c);return a==null&&(H.error("No registered base theme found for theme key: '".concat(c,"'"),"Registered:",l.base.map(h=>h.themeKey),l.custom.map(h=>h.themeKey)),a=l.base.find(h=>h.themeKey===N),Q9(a,"Default base theme '".concat(N,"' is not registered"))),H.debug("Applied themes:",a.themeKey,r==null?void 0:r.themeKey),r==null?[a]:[a,r]}function zl(){return[{name:"Default Dark",themeKey:N,styleContent:W7}]}function Q7(){var o=localStorage.getItem(O9);try{return o==null?null:JSON.parse(o)}catch{}return null}function U9(o){for(var l,e,r=[],c=(l=(e=$7.exec(o))===null||e===void 0?void 0:e.index)!==null&&l!==void 0?l:0,a=0,h=0;h<o.length;h+=1)if(o[h]==="("?a+=1:o[h]===")"&&(a-=1),h===o.length-1||P.test(o[h+1])&&a===0){for(r.push([c,h]);h<o.length-1&&P.test(o[h+1]);)h+=1;c=h+1}return a!==0?(H.error("Unbalanced parentheses in css var expression",o),[]):r}function Y7(o,l){return o.replace(/fill='.*?'/,"fill='".concat(encodeURIComponent(l),"'"))}function ul(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.body,e=performance.now(),r=document.createElement("div");l.appendChild(r);var c=[...X7(o)];c.forEach((i,t)=>{var n="--".concat(R,"-").concat(t);r.style.setProperty(n,i)});var a={},h=window.getComputedStyle(r),s=i=>{var t="--".concat(R,"-").concat(c.indexOf(i)),n=h.getPropertyValue(t);return W9.normalizeCssColor(n)};return Object.entries(o).forEach(i=>{var[t,n]=i;a[t]=ll(s,n)}),r.remove(),H.debug("Resolved css variables",performance.now()-e,"ms"),a}function ll(o,l){var e=[],r=0;return U9(l).forEach(c=>{var[a,h]=c;r<a&&(e.push(l.substring(r,a)),r+=a-r);var s=l.substring(a,h+1);e.push(s.includes(B9)?o(s):s),r+=h-a+1}),e.length===0?l:e.join("")}function gl(o){localStorage.setItem(O9,JSON.stringify(o))}function Hl(o,l){return"".concat(o,"_").concat(l)}function ol(){var o,l,e=(o=(l=Q7())===null||l===void 0?void 0:l.preloadStyleContent)!==null&&o!==void 0?o:J7();H.debug("Preloading theme content:","'".concat(e,"'"));var r=document.createElement("style");r.id="theme-preload",r.innerHTML=e,document.head.appendChild(r)}function pl(){var o=G9(document.body);Object.entries(K7).forEach(l=>{var[e,r]=l;document.body.style.removeProperty(e);var c=o(e),a=o(r),h=Y7(c,a);document.body.style.setProperty(e,h)})}function E(o,l,e,r,c,a,h){try{var s=o[a](h),i=s.value}catch(t){e(t);return}s.done?l(i):Promise.resolve(i).then(r,c)}function el(o){return function(){var l=this,e=arguments;return new Promise(function(r,c){var a=o.apply(l,e);function h(i){E(a,r,c,h,s,"next",i)}function s(i){E(a,r,c,h,s,"throw",i)}h(void 0)})}}var y=E9.module("@deephaven/jsapi-bootstrap.ApiBootstrap"),rl=d.createContext(null);function al(o){var{apiUrl:l,children:e,failureElement:r,setGlobally:c=!1}=o,[a,h]=d.useState(!0),[s,i]=d.useState();return d.useEffect(()=>{function t(){return n.apply(this,arguments)}function n(){return n=el(function*(){try{var p=(yield A(()=>import(l),[],import.meta.url)).default;y.info("API bootstrapped from",l),i(p),c&&(y.debug("API set globally"),globalThis.dh=p)}catch(m){y.error("Unable to bootstrap API",m)}h(!1)}),n.apply(this,arguments)}t()},[l,c]),a?v.jsx(F9,{}):s==null?r??v.jsxs(F7,{isOpen:!0,className:"modal-dialog-centered theme-bg-light",children:[v.jsx(O7,{closeButton:!1,children:"Error: Unable to load API"}),v.jsx(T7,{children:v.jsxs("p",{className:"text-break",children:["Ensure the server is running and you are able to reach ",l,", then refresh the page."]})})]}):v.jsx(rl.Provider,{value:s,children:e})}ol();const cl=O.lazy(()=>A(()=>import("./App-
|
|
9
|
-
//# sourceMappingURL=index-
|
|
8
|
+
`),N="default-dark",ml="default-light",T9={"--dh-color-loading-spinner-primary":"#3b6bda","--dh-color-loading-spinner-secondary":"#f0f0ee80","--dh-color-background":"#1a171a","--dh-color-foreground":"#f0f0ee"},K7={"--dh-svg-icon-select-indicator":"--dh-color-selector-fg","--dh-svg-icon-select-indicator-hover":"--dh-color-selector-hover-fg","--dh-svg-icon-select-indicator-disabled":"--dh-color-selector-disabled-fg","--dh-svg-icon-error":"--dh-color-form-control-error"},O9="deephaven.themeCache",H=E9.module("ThemeUtils"),B9="var(--",R="dh-tmp",$7=/\S/,P=/\s/;function J7(){var o=G9(document.body),l=Object.keys(T9).map(e=>"".concat(e,":").concat(o(e)));return":root{".concat(l.join(";"),"}")}function G9(o){var l=getComputedStyle(o);return function(r){var c,a=l.getPropertyValue(r);return a!==""?a:(c=T9[r])!==null&&c!==void 0?c:""}}function X7(o){var l=new Set;return Object.values(o).forEach(e=>{U9(e).forEach(r=>{var[c,a]=r,h=e.substring(c,a+1);h.includes(B9)&&l.add(h)})}),l}function fl(o,l){var e,r=l.custom.find(h=>h.themeKey===o),c=(e=r==null?void 0:r.baseThemeKey)!==null&&e!==void 0?e:o,a=l.base.find(h=>h.themeKey===c);return a==null&&(H.error("No registered base theme found for theme key: '".concat(c,"'"),"Registered:",l.base.map(h=>h.themeKey),l.custom.map(h=>h.themeKey)),a=l.base.find(h=>h.themeKey===N),Q9(a,"Default base theme '".concat(N,"' is not registered"))),H.debug("Applied themes:",a.themeKey,r==null?void 0:r.themeKey),r==null?[a]:[a,r]}function zl(){return[{name:"Default Dark",themeKey:N,styleContent:W7}]}function Q7(){var o=localStorage.getItem(O9);try{return o==null?null:JSON.parse(o)}catch{}return null}function U9(o){for(var l,e,r=[],c=(l=(e=$7.exec(o))===null||e===void 0?void 0:e.index)!==null&&l!==void 0?l:0,a=0,h=0;h<o.length;h+=1)if(o[h]==="("?a+=1:o[h]===")"&&(a-=1),h===o.length-1||P.test(o[h+1])&&a===0){for(r.push([c,h]);h<o.length-1&&P.test(o[h+1]);)h+=1;c=h+1}return a!==0?(H.error("Unbalanced parentheses in css var expression",o),[]):r}function Y7(o,l){return o.replace(/fill='.*?'/,"fill='".concat(encodeURIComponent(l),"'"))}function ul(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.body,e=performance.now(),r=document.createElement("div");l.appendChild(r);var c=[...X7(o)];c.forEach((i,t)=>{var n="--".concat(R,"-").concat(t);r.style.setProperty(n,i)});var a={},h=window.getComputedStyle(r),s=i=>{var t="--".concat(R,"-").concat(c.indexOf(i)),n=h.getPropertyValue(t);return W9.normalizeCssColor(n)};return Object.entries(o).forEach(i=>{var[t,n]=i;a[t]=ll(s,n)}),r.remove(),H.debug("Resolved css variables",performance.now()-e,"ms"),a}function ll(o,l){var e=[],r=0;return U9(l).forEach(c=>{var[a,h]=c;r<a&&(e.push(l.substring(r,a)),r+=a-r);var s=l.substring(a,h+1);e.push(s.includes(B9)?o(s):s),r+=h-a+1}),e.length===0?l:e.join("")}function gl(o){localStorage.setItem(O9,JSON.stringify(o))}function Hl(o,l){return"".concat(o,"_").concat(l)}function ol(){var o,l,e=(o=(l=Q7())===null||l===void 0?void 0:l.preloadStyleContent)!==null&&o!==void 0?o:J7();H.debug("Preloading theme content:","'".concat(e,"'"));var r=document.createElement("style");r.id="theme-preload",r.innerHTML=e,document.head.appendChild(r)}function pl(){var o=G9(document.body);Object.entries(K7).forEach(l=>{var[e,r]=l;document.body.style.removeProperty(e);var c=o(e),a=o(r),h=Y7(c,a);document.body.style.setProperty(e,h)})}function E(o,l,e,r,c,a,h){try{var s=o[a](h),i=s.value}catch(t){e(t);return}s.done?l(i):Promise.resolve(i).then(r,c)}function el(o){return function(){var l=this,e=arguments;return new Promise(function(r,c){var a=o.apply(l,e);function h(i){E(a,r,c,h,s,"next",i)}function s(i){E(a,r,c,h,s,"throw",i)}h(void 0)})}}var y=E9.module("@deephaven/jsapi-bootstrap.ApiBootstrap"),rl=d.createContext(null);function al(o){var{apiUrl:l,children:e,failureElement:r,setGlobally:c=!1}=o,[a,h]=d.useState(!0),[s,i]=d.useState();return d.useEffect(()=>{function t(){return n.apply(this,arguments)}function n(){return n=el(function*(){try{var p=(yield A(()=>import(l),[],import.meta.url)).default;y.info("API bootstrapped from",l),i(p),c&&(y.debug("API set globally"),globalThis.dh=p)}catch(m){y.error("Unable to bootstrap API",m)}h(!1)}),n.apply(this,arguments)}t()},[l,c]),a?v.jsx(F9,{}):s==null?r??v.jsxs(F7,{isOpen:!0,className:"modal-dialog-centered theme-bg-light",children:[v.jsx(O7,{closeButton:!1,children:"Error: Unable to load API"}),v.jsx(T7,{children:v.jsxs("p",{className:"text-break",children:["Ensure the server is running and you are able to reach ",l,", then refresh the page."]})})]}):v.jsx(rl.Provider,{value:s,children:e})}ol();const cl=O.lazy(()=>A(()=>import("./App-d44495e7.js"),["./App-d44495e7.js","./vendor-094aa5bb.js","./helpers-042e6b4d.js","./vendor-b58e2f70.css","./useUser-f3bbb242.js","./monaco-9eb7d7d5.js","./monaco-0e9455f6.css","./useUser-a67d6e45.css","./App-bad0fe82.css"],import.meta.url)),hl=O.lazy(async()=>({default:(await A(()=>import("./index-e3f519e6.js"),["./index-e3f519e6.js","./vendor-094aa5bb.js","./helpers-042e6b4d.js","./vendor-b58e2f70.css","./useUser-f3bbb242.js","./monaco-9eb7d7d5.js","./monaco-0e9455f6.css","./useUser-a67d6e45.css","./plotly-3a8616f2.js","./index-85b71da6.css"],import.meta.url)).AppBootstrap})),F=new URL("../../jsapi/dh-core.js",document.baseURI),vl=new URL("../../js-plugins",document.baseURI);T.render(v.jsx(al,{apiUrl:F.href,setGlobally:!0,children:v.jsx(d.Suspense,{fallback:v.jsx(F9,{}),children:v.jsx(hl,{serverUrl:F.origin,pluginsUrl:vl.href,children:v.jsx(cl,{})})})}),document.getElementById("root"));export{T4 as $,pl as A,ol as B,B9 as C,N as D,Y7 as E,ul as F,ll as G,gl as H,W7 as I,rl as J,al as K,E9 as L,F7 as M,$7 as N,J4 as O,R9 as P,c4 as Q,l9 as R,K7 as S,x as T,W9 as U,tl as V,P as W,Z2 as X,J as Y,X as Z,G8 as _,F9 as a,i1 as a0,h0 as a1,C2 as a2,dl as a3,S as a4,O4 as a5,$5 as a6,A6 as a7,X9 as a8,m8 as a9,P5 as aA,R5 as aB,D9 as aC,Q5 as aD,E5 as aE,t9 as aF,l4 as aG,b0 as aH,r2 as aI,$ as aJ,o9 as aK,o3 as aL,S9 as aM,x3 as aN,w8 as aO,$2 as aP,Q3 as aQ,u8 as aR,g4 as aS,L9 as aa,p9 as ab,l5 as ac,e5 as ad,J0 as ae,V9 as af,X5 as ag,s4 as ah,n9 as ai,a9 as aj,H9 as ak,r6 as al,u9 as am,g9 as an,N9 as ao,T2 as ap,C9 as aq,D2 as ar,b9 as as,F4 as at,U5 as au,G5 as av,i8 as aw,Z3 as ax,k2 as ay,w2 as az,T7 as b,O7 as c,A2 as d,U as e,M9 as f,Q9 as g,X0 as h,$9 as i,B5 as j,h6 as k,K2 as l,ml as m,T9 as n,B7 as o,O9 as p,R as q,J7 as r,G9 as s,X7 as t,fl as u,Y3 as v,zl as w,U9 as x,Hl as y,Q7 as z};
|
|
9
|
+
//# sourceMappingURL=index-0f1ab464.js.map
|