From 29ed459c130dae9d6a1f3876716d25fb2f0a5fea Mon Sep 17 00:00:00 2001 From: ethanalvizo <55671206+ethanalvizo@users.noreply.github.com> Date: Fri, 12 May 2023 15:56:21 -0400 Subject: [PATCH 01/10] feat: add uncaught rejections to support logs (#1293) Closes #1253 - sample output logs: [console.txt](https://github.com/deephaven/web-client-ui/files/11466158/console.txt) - search for "can't handle this - ethan" --- packages/log/src/LogProxy.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/log/src/LogProxy.ts b/packages/log/src/LogProxy.ts index cdec58a999..31b29bbc1f 100644 --- a/packages/log/src/LogProxy.ts +++ b/packages/log/src/LogProxy.ts @@ -49,6 +49,19 @@ export class LogProxy { ); }; + private handleUncaughtRejection = (event: PromiseRejectionEvent) => { + const messages: string[] = []; + if (event.promise != null) { + messages.push(event.promise.toString()); + } + if (event.reason as string) { + messages.push(event.reason as string); + } + this.eventTarget.dispatchEvent( + makeEvent(LOG_PROXY_TYPE.UNCAUGHT_ERROR, messages) + ); + }; + constructor() { this.debug = console.debug; this.log = console.log; @@ -83,6 +96,7 @@ export class LogProxy { }; window.addEventListener('error', this.handleUncaughtError); + window.addEventListener('unhandledrejection', this.handleUncaughtRejection); // This forces logger to update its reference to the overriding functions instead of the original Log.setLogLevel(Log.level); @@ -98,6 +112,10 @@ export class LogProxy { console.warn = this.warn; console.error = this.error; window.removeEventListener('error', this.handleUncaughtError); + window.removeEventListener( + 'unhandledrejection', + this.handleUncaughtRejection + ); Log.setLogLevel(Log.level); this.isEnabled = false; } From a80c6fc608466351d03358f47b9c7d062b28c9cf Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Mon, 15 May 2023 13:49:49 -0400 Subject: [PATCH 02/10] revert: Revert "feat: Table rendering support for databars (#1212)" (#1296) This reverts commit a17cc0eb2b4e8ba9240c891a15b9d4b7659fb721. - Noticed an issue when changing filters on a table with a string column which would cause `null` to be flashed in. Caused by the databar changes. We don't need the databars for this release so just reverting that change for now. ![Table shows null to start](https://github.com/deephaven/web-client-ui/assets/4505624/ced45b58-9caf-4f9e-8ffc-3218294db300) --- packages/code-studio/src/styleguide/Grids.tsx | 5 - .../grid-examples/DataBarExample.tsx | 123 ---- packages/grid/src/CellRenderer.ts | 104 --- packages/grid/src/DataBarCellRenderer.ts | 610 ------------------ packages/grid/src/DataBarGridModel.ts | 53 -- packages/grid/src/GridColorUtils.ts | 119 +--- packages/grid/src/GridMetricCalculator.ts | 15 +- packages/grid/src/GridModel.ts | 5 - packages/grid/src/GridRenderer.test.tsx | 42 +- packages/grid/src/GridRenderer.ts | 426 +++++++++++- packages/grid/src/GridRendererTypes.ts | 3 - packages/grid/src/GridTheme.ts | 13 - packages/grid/src/GridUtils.ts | 73 +-- packages/grid/src/MockDataBarGridModel.ts | 160 ----- packages/grid/src/TextCellRenderer.ts | 271 -------- packages/grid/src/TokenBoxCellRenderer.ts | 23 - packages/grid/src/index.ts | 5 - .../mouse-handlers/GridTokenMouseHandler.ts | 18 +- .../src/IrisGridCellRendererUtils.ts | 31 - .../src/IrisGridDataBarCellRenderer.ts | 32 - packages/iris-grid/src/IrisGridIcons.ts | 52 -- packages/iris-grid/src/IrisGridRenderer.ts | 339 +++++++--- .../src/IrisGridTableModelTemplate.ts | 11 - .../iris-grid/src/IrisGridTextCellRenderer.ts | 191 ------ .../iris-grid/src/IrisGridTheme.module.scss | 4 - packages/iris-grid/src/IrisGridTheme.ts | 4 - .../IrisGridTokenMouseHandler.ts | 17 +- 27 files changed, 668 insertions(+), 2081 deletions(-) delete mode 100644 packages/code-studio/src/styleguide/grid-examples/DataBarExample.tsx delete mode 100644 packages/grid/src/CellRenderer.ts delete mode 100644 packages/grid/src/DataBarCellRenderer.ts delete mode 100644 packages/grid/src/DataBarGridModel.ts delete mode 100644 packages/grid/src/MockDataBarGridModel.ts delete mode 100644 packages/grid/src/TextCellRenderer.ts delete mode 100644 packages/grid/src/TokenBoxCellRenderer.ts delete mode 100644 packages/iris-grid/src/IrisGridCellRendererUtils.ts delete mode 100644 packages/iris-grid/src/IrisGridDataBarCellRenderer.ts delete mode 100644 packages/iris-grid/src/IrisGridIcons.ts delete mode 100644 packages/iris-grid/src/IrisGridTextCellRenderer.ts diff --git a/packages/code-studio/src/styleguide/Grids.tsx b/packages/code-studio/src/styleguide/Grids.tsx index 27d07bf7bf..6c857bddc5 100644 --- a/packages/code-studio/src/styleguide/Grids.tsx +++ b/packages/code-studio/src/styleguide/Grids.tsx @@ -13,7 +13,6 @@ import StaticExample from './grid-examples/StaticExample'; import QuadrillionExample from './grid-examples/QuadrillionExample'; import TreeExample from './grid-examples/TreeExample'; import AsyncExample from './grid-examples/AsyncExample'; -import DataBarExample from './grid-examples/DataBarExample'; function Grids(): ReactElement { const [irisGridModel] = useState( @@ -35,10 +34,6 @@ function Grids(): ReactElement {
-

Data Bar

-
- -

Quadrillion rows and columns

diff --git a/packages/code-studio/src/styleguide/grid-examples/DataBarExample.tsx b/packages/code-studio/src/styleguide/grid-examples/DataBarExample.tsx deleted file mode 100644 index 9718b2399d..0000000000 --- a/packages/code-studio/src/styleguide/grid-examples/DataBarExample.tsx +++ /dev/null @@ -1,123 +0,0 @@ -import React, { useState } from 'react'; -import { Grid, MockDataBarGridModel } from '@deephaven/grid'; -import { ColorMap } from 'packages/grid/src/DataBarGridModel'; - -function DataBarExample() { - const columnData = [100, 50, 20, 10, -10, -20, -50, -30, 100, 0, 1]; - const data: number[][] = []; - const columnAxes = new Map([ - [0, 'proportional'], - [1, 'middle'], - [2, 'directional'], - [6, 'directional'], - [7, 'directional'], - [8, 'directional'], - [9, 'directional'], - [10, 'directional'], - ]); - const positiveColors: ColorMap = new Map([ - [3, '#72d7df'], - [4, '#ac9cf4'], - ]); - positiveColors.set(5, ['#f3cd5b', '#9edc6f']); - positiveColors.set(19, ['#42f54b', '#42b9f5', '#352aa8']); - - const negativeColors: ColorMap = new Map([ - [3, '#f3cd5b'], - [4, '#ac9cf4'], - ]); - negativeColors.set(5, ['#f95d84', '#f3cd5b']); - negativeColors.set(19, ['#e05536', '#e607de', '#e6e207']); - - const valuePlacements = new Map([ - [6, 'hide'], - [7, 'overlap'], - [8, 'overlap'], - [9, 'overlap'], - ]); - const opacities = new Map([ - [7, 0.5], - [8, 0.5], - [9, 0.5], - ]); - const directions = new Map([ - [8, 'RTL'], - [10, 'RTL'], - [16, 'RTL'], - [19, 'RTL'], - ]); - const textAlignments = new Map([ - [9, 'left'], - [11, 'left'], - ]); - const markers = new Map([ - [ - 12, - [ - { column: 13, color: 'white' }, - { column: 14, color: 'gray' }, - ], - ], - ]); - for (let i = 0; i < 13; i += 1) { - data.push(columnData.slice()); - } - data.push([70, 60, 30, 20, -10, -30, -20, -50, 80, 50, 10]); - data.push([50, 20, 10, 0, 0, -10, -30, 10, 90, 20, 40]); - data.push([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0]); - data.push(columnData.slice()); - // Decimals - data.push([ - 100, - 10.5, - 11.234, - -20.5, - -50, - -2.5, - -15.1234, - 94.254, - 25, - 44.4444, - -50.5, - ]); - - // Big values - data.push([ - 1000000, - 10, - 200, - -20000, - -2000000, - -25, - -900000, - 800000, - 100000, - 450000, - 1, - ]); - - // RTL gradient with multiple colors - data.push(columnData.slice()); - - // Both data bar and text - data.push(columnData.slice()); - data.push(columnData.slice()); - const [model] = useState( - () => - new MockDataBarGridModel( - data, - columnAxes, - positiveColors, - negativeColors, - valuePlacements, - opacities, - directions, - textAlignments, - markers - ) - ); - - return ; -} - -export default DataBarExample; diff --git a/packages/grid/src/CellRenderer.ts b/packages/grid/src/CellRenderer.ts deleted file mode 100644 index 0326a9442d..0000000000 --- a/packages/grid/src/CellRenderer.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { getOrThrow } from '@deephaven/utils'; -import { isExpandableGridModel } from './ExpandableGridModel'; -import { VisibleIndex, Coordinate, BoxCoordinates } from './GridMetrics'; -import GridRenderer from './GridRenderer'; -import { GridRenderState } from './GridRendererTypes'; -import { GridColor } from './GridTheme'; -import memoizeClear from './memoizeClear'; - -export type CellRenderType = 'text' | 'dataBar'; - -abstract class CellRenderer { - abstract drawCellContent( - context: CanvasRenderingContext2D, - state: GridRenderState, - column: VisibleIndex, - row: VisibleIndex - ): void; - - drawCellRowTreeMarker( - context: CanvasRenderingContext2D, - state: GridRenderState, - row: VisibleIndex - ): void { - const { metrics, model, mouseX, mouseY, theme } = state; - const { - firstColumn, - gridX, - gridY, - allColumnXs, - allColumnWidths, - allRowYs, - allRowHeights, - visibleRowTreeBoxes, - } = metrics; - const { treeMarkerColor, treeMarkerHoverColor } = theme; - const columnX = getOrThrow(allColumnXs, firstColumn); - const columnWidth = getOrThrow(allColumnWidths, firstColumn); - const rowY = getOrThrow(allRowYs, row); - const rowHeight = getOrThrow(allRowHeights, row); - if (!isExpandableGridModel(model) || !model.isRowExpandable(row)) { - return; - } - - const treeBox = getOrThrow(visibleRowTreeBoxes, row); - const color = - mouseX != null && - mouseY != null && - mouseX >= gridX + columnX && - mouseX <= gridX + columnX + columnWidth && - mouseY >= gridY + rowY && - mouseY <= gridY + rowY + rowHeight - ? treeMarkerHoverColor - : treeMarkerColor; - - this.drawTreeMarker( - context, - state, - columnX, - rowY, - treeBox, - color, - model.isRowExpanded(row) - ); - } - - drawTreeMarker( - context: CanvasRenderingContext2D, - state: GridRenderState, - columnX: Coordinate, - rowY: Coordinate, - treeBox: BoxCoordinates, - color: GridColor, - isExpanded: boolean - ): void { - const { x1, y1, x2, y2 } = treeBox; - const markerText = isExpanded ? '⊟' : '⊞'; - const textX = columnX + (x1 + x2) * 0.5 + 0.5; - const textY = rowY + (y1 + y2) * 0.5 + 0.5; - context.fillStyle = color; - context.textAlign = 'center'; - context.fillText(markerText, textX, textY); - } - - getCachedTruncatedString = memoizeClear( - ( - context: CanvasRenderingContext2D, - text: string, - width: number, - fontWidth: number, - truncationChar?: string - ): string => - GridRenderer.truncateToWidth( - context, - text, - width, - fontWidth, - truncationChar - ), - { max: 10000 } - ); -} - -export default CellRenderer; diff --git a/packages/grid/src/DataBarCellRenderer.ts b/packages/grid/src/DataBarCellRenderer.ts deleted file mode 100644 index 0b47b0258a..0000000000 --- a/packages/grid/src/DataBarCellRenderer.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { getOrThrow } from '@deephaven/utils'; -import CellRenderer from './CellRenderer'; -import { isExpandableGridModel } from './ExpandableGridModel'; -import { isDataBarGridModel } from './DataBarGridModel'; -import { ModelIndex, VisibleIndex, VisibleToModelMap } from './GridMetrics'; -import GridColorUtils, { Oklab } from './GridColorUtils'; -import GridUtils from './GridUtils'; -import memoizeClear from './memoizeClear'; -import { DEFAULT_FONT_WIDTH, GridRenderState } from './GridRendererTypes'; -import GridModel from './GridModel'; - -interface DataBarRenderMetrics { - /** The total width the entire bar from the min to max value can take up (rightmostPosition - leftmostPosition) */ - maxWidth: number; - /** The x coordinate of the bar (the left) */ - x: number; - /** The y coordinate of the bar (the top) */ - y: number; - /** The position of the zero line */ - zeroPosition: number; - /** The position of the leftmost point */ - leftmostPosition: number; - /** The position of the rightmost point */ - rightmostPosition: number; - /** The range of values (e.g. max of 100 and min of -50 means range of 150) */ - totalValueRange: number; - /** The width of the databar */ - dataBarWidth: number; - /** The x coordinates of the markers (the left) */ - markerXs: number[]; -} -class DataBarCellRenderer extends CellRenderer { - private heightOfDigits?: number; - - drawCellContent( - context: CanvasRenderingContext2D, - state: GridRenderState, - column: VisibleIndex, - row: VisibleIndex - ) { - const { metrics, model, theme } = state; - if (!isDataBarGridModel(model)) { - return; - } - const { - modelColumns, - modelRows, - allRowHeights, - allRowYs, - firstColumn, - fontWidths, - } = metrics; - - const isFirstColumn = column === firstColumn; - const rowHeight = getOrThrow(allRowHeights, row); - const modelRow = getOrThrow(modelRows, row); - const modelColumn = getOrThrow(modelColumns, column); - const rowY = getOrThrow(allRowYs, row); - const textAlign = model.textAlignForCell(modelColumn, modelRow); - const text = model.textForCell(modelColumn, modelRow); - const { x: textX, width: textWidth } = GridUtils.getTextRenderMetrics( - state, - column, - row - ); - - const fontWidth = fontWidths?.get(context.font) ?? DEFAULT_FONT_WIDTH; - const truncationChar = model.truncationCharForCell(modelColumn, modelRow); - const truncatedText = this.getCachedTruncatedString( - context, - text, - textWidth, - fontWidth, - truncationChar - ); - - const { - columnMin, - columnMax, - axis, - color: dataBarColor, - valuePlacement, - opacity, - markers, - direction, - value, - } = model.dataBarOptionsForCell(modelColumn, modelRow); - - const hasGradient = Array.isArray(dataBarColor); - if (columnMin == null || columnMax == null) { - return; - } - - const { - maxWidth, - x: dataBarX, - y: dataBarY, - zeroPosition, - leftmostPosition, - markerXs, - totalValueRange, - dataBarWidth, - } = this.getDataBarRenderMetrics(context, state, column, row); - - if (this.heightOfDigits === undefined) { - const { - actualBoundingBoxAscent, - actualBoundingBoxDescent, - } = context.measureText('1234567890'); - this.heightOfDigits = actualBoundingBoxAscent + actualBoundingBoxDescent; - } - - context.save(); - context.textAlign = textAlign; - if (hasGradient) { - const color = - value >= 0 ? dataBarColor[dataBarColor.length - 1] : dataBarColor[0]; - context.fillStyle = color; - } else { - context.fillStyle = dataBarColor; - } - context.textBaseline = 'top'; - context.font = theme.font; - - if (valuePlacement !== 'hide') { - context.fillText( - truncatedText, - textX, - rowY + (rowHeight - this.heightOfDigits) / 2 - ); - } - - // Draw bar - if (hasGradient) { - // Draw gradient bar - - const dataBarColorsOklab: Oklab[] = dataBarColor.map(color => - GridColorUtils.linearSRGBToOklab(GridColorUtils.hexToRgb(color)) - ); - - context.save(); - - context.beginPath(); - - context.roundRect(dataBarX, dataBarY, dataBarWidth, rowHeight - 2, 1); - context.clip(); - - if (value < 0) { - if (direction === 'LTR') { - const totalGradientWidth = Math.round( - (Math.abs(columnMin) / totalValueRange) * maxWidth - ); - const partGradientWidth = - totalGradientWidth / (dataBarColor.length - 1); - let gradientX = Math.round(leftmostPosition); - for (let i = 0; i < dataBarColor.length - 1; i += 1) { - const leftColor = dataBarColorsOklab[i]; - const rightColor = dataBarColorsOklab[i + 1]; - this.drawGradient( - context, - leftColor, - rightColor, - gradientX, - rowY + 1, - partGradientWidth, - rowHeight - ); - - gradientX += partGradientWidth; - } - } else if (direction === 'RTL') { - const totalGradientWidth = Math.round( - maxWidth - (Math.abs(columnMax) / totalValueRange) * maxWidth - ); - const partGradientWidth = - totalGradientWidth / (dataBarColor.length - 1); - let gradientX = Math.round(zeroPosition); - for (let i = dataBarColor.length - 1; i > 0; i -= 1) { - const leftColor = dataBarColorsOklab[i]; - const rightColor = dataBarColorsOklab[i - 1]; - this.drawGradient( - context, - leftColor, - rightColor, - gradientX, - rowY + 1, - partGradientWidth, - rowHeight - ); - - gradientX += partGradientWidth; - } - } - } else if (direction === 'LTR') { - // Value is greater than or equal to 0 - const totalGradientWidth = - Math.round( - maxWidth - (Math.abs(columnMin) / totalValueRange) * maxWidth - ) - 1; - const partGradientWidth = - totalGradientWidth / (dataBarColor.length - 1); - let gradientX = Math.round(zeroPosition); - - for (let i = 0; i < dataBarColor.length - 1; i += 1) { - const leftColor = dataBarColorsOklab[i]; - const rightColor = dataBarColorsOklab[i + 1]; - this.drawGradient( - context, - leftColor, - rightColor, - gradientX, - rowY + 1, - partGradientWidth, - rowHeight - 2 - ); - - gradientX += partGradientWidth; - } - } else if (direction === 'RTL') { - // Value is greater than or equal to 0 - const totalGradientWidth = Math.round( - (Math.abs(columnMax) / totalValueRange) * maxWidth - ); - const partGradientWidth = - totalGradientWidth / (dataBarColor.length - 1); - let gradientX = Math.round(leftmostPosition); - - for (let i = dataBarColor.length - 1; i > 0; i -= 1) { - const leftColor = dataBarColorsOklab[i]; - const rightColor = dataBarColorsOklab[i - 1]; - this.drawGradient( - context, - leftColor, - rightColor, - gradientX, - rowY + 1, - partGradientWidth, - rowHeight - 2 - ); - - gradientX += partGradientWidth; - } - } - - // restore clip - context.restore(); - } else { - // Draw normal bar - context.save(); - - context.globalAlpha = opacity; - context.beginPath(); - context.roundRect(dataBarX, dataBarY, dataBarWidth, rowHeight - 2, 1); - context.fill(); - - context.restore(); - } - - // Draw markers - if (maxWidth > 0) { - markerXs.forEach((markerX, index) => { - context.fillStyle = markers[index].color; - context.fillRect(markerX, dataBarY, 1, rowHeight - 2); - }); - } - - const shouldRenderDashedLine = !( - axis === 'directional' && - ((valuePlacement === 'beside' && - textAlign === 'right' && - direction === 'LTR') || - (valuePlacement === 'beside' && - textAlign === 'left' && - direction === 'RTL') || - valuePlacement !== 'beside') - ); - - // Draw dashed line - if (shouldRenderDashedLine) { - context.strokeStyle = theme.zeroLineColor; - context.beginPath(); - context.setLineDash([2, 1]); - context.moveTo(zeroPosition, rowY); - context.lineTo(zeroPosition, rowY + rowHeight); - context.stroke(); - } - - context.restore(); - - // Draw tree marker - if ( - isFirstColumn && - isExpandableGridModel(model) && - model.hasExpandableRows - ) { - this.drawCellRowTreeMarker(context, state, row); - } - } - - getDataBarRenderMetrics( - context: CanvasRenderingContext2D, - state: GridRenderState, - column: VisibleIndex, - row: VisibleIndex - ): DataBarRenderMetrics { - const { metrics, model, theme } = state; - if (!isDataBarGridModel(model)) { - throw new Error('Grid model is not a data bar grid model'); - } - const { - firstColumn, - allColumnXs, - allColumnWidths, - allRowYs, - modelColumns, - modelRows, - visibleRows, - } = metrics; - const { - cellHorizontalPadding, - treeDepthIndent, - treeHorizontalPadding, - } = theme; - - const modelColumn = getOrThrow(modelColumns, column); - const modelRow = getOrThrow(modelRows, row); - const x = getOrThrow(allColumnXs, column); - const y = getOrThrow(allRowYs, row); - const columnWidth = getOrThrow(allColumnWidths, column); - const isFirstColumn = column === firstColumn; - let treeIndent = 0; - if ( - isExpandableGridModel(model) && - model.hasExpandableRows && - isFirstColumn - ) { - treeIndent = - treeDepthIndent * (model.depthForRow(row) + 1) + treeHorizontalPadding; - } - - const textAlign = model.textAlignForCell(modelColumn, modelRow); - const { - columnMin, - columnMax, - axis, - valuePlacement, - markers, - direction, - value, - } = model.dataBarOptionsForCell(modelColumn, modelRow); - const longestValueWidth = this.getCachedWidestValueForColumn( - context, - visibleRows, - modelRows, - model, - modelColumn - ); - - const leftPadding = 2; - const rightPadding = - valuePlacement === 'beside' && textAlign === 'right' ? 2 : 1; - - // The value of the total range (e.g. max - column) - let totalValueRange = columnMax - columnMin; - // If min and max are both positive or min and max are equal, the max length is columnMax - if ((columnMax >= 0 && columnMin >= 0) || columnMin === columnMax) { - totalValueRange = columnMax; - } else if (columnMax <= 0 && columnMin <= 0) { - // If min and max are both negative, the max length is the absolute value of columnMin - totalValueRange = Math.abs(columnMin); - } - - let maxWidth = columnWidth - treeIndent - rightPadding - leftPadding; - if (valuePlacement === 'beside') { - maxWidth = maxWidth - cellHorizontalPadding - longestValueWidth; - } - - if (maxWidth < 0) { - maxWidth = 0; - } - - const columnLongest = Math.max(Math.abs(columnMin), Math.abs(columnMax)); - // If axis is proportional, totalValueRange is proportional to maxWidth - let dataBarWidth = (Math.abs(value) / totalValueRange) * maxWidth; - - if (maxWidth === 0) { - dataBarWidth = 0; - } else if (axis === 'middle') { - // The longest bar is proportional to half of the maxWidth - dataBarWidth = (Math.abs(value) / columnLongest) * (maxWidth / 2); - } else if (axis === 'directional') { - // The longest bar is proportional to the maxWidth - dataBarWidth = (Math.abs(value) / columnLongest) * maxWidth; - } - - // Default: proportional, beside, LTR, right text align - // All positions are assuming the left side is 0 and the right side is maxWidth - let zeroPosition = - columnMin >= 0 ? 0 : (Math.abs(columnMin) / totalValueRange) * maxWidth; - let dataBarX = - value >= 0 - ? zeroPosition - : zeroPosition - (Math.abs(value) / totalValueRange) * maxWidth; - let markerXs = markers.map(marker => { - const { column: markerColumn } = marker; - const markerValue = Number(model.textForCell(markerColumn, modelRow)); - return markerValue >= 0 - ? zeroPosition + (Math.abs(markerValue) / totalValueRange) * maxWidth - : zeroPosition - (Math.abs(markerValue) / totalValueRange) * maxWidth; - }); - let leftmostPosition = - valuePlacement === 'beside' && textAlign === 'left' - ? cellHorizontalPadding + longestValueWidth + leftPadding - : leftPadding; - let rightmostPosition = - valuePlacement === 'beside' && textAlign === 'right' - ? columnWidth - cellHorizontalPadding - longestValueWidth - rightPadding - : rightPadding; - - // Proportional, RTL - if (direction === 'RTL') { - zeroPosition = - columnMin >= 0 - ? columnWidth - : columnWidth - (Math.abs(columnMin) / totalValueRange) * maxWidth; - dataBarX = - value >= 0 - ? zeroPosition - (value / totalValueRange) * maxWidth - : zeroPosition; - markerXs = markers.map(marker => { - const { column: markerColumn } = marker; - const markerValue = Number(model.textForCell(markerColumn, modelRow)); - return markerValue >= 0 - ? zeroPosition - (Math.abs(markerValue) / totalValueRange) * maxWidth - : zeroPosition + (Math.abs(markerValue) / totalValueRange) * maxWidth; - }); - } - - if (axis === 'middle') { - zeroPosition = maxWidth / 2; - if (direction === 'LTR') { - // Middle, LTR - dataBarX = - value >= 0 - ? zeroPosition - : zeroPosition - (Math.abs(value) / columnLongest) * (maxWidth / 2); - markerXs = markers.map(marker => { - const { column: markerColumn } = marker; - const markerValue = Number(model.textForCell(markerColumn, modelRow)); - return markerValue >= 0 - ? zeroPosition + - (Math.abs(markerValue) / columnLongest) * (maxWidth / 2) - : zeroPosition - - (Math.abs(markerValue) / columnLongest) * (maxWidth / 2); - }); - } else if (direction === 'RTL') { - // Middle, RTL - dataBarX = - value <= 0 - ? zeroPosition - : zeroPosition - (Math.abs(value) / columnLongest) * (maxWidth / 2); - markerXs = markers.map(marker => { - const { column: markerColumn } = marker; - const markerValue = Number(model.textForCell(markerColumn, modelRow)); - return markerValue <= 0 - ? zeroPosition + - (Math.abs(markerValue) / columnLongest) * (maxWidth / 2) - : zeroPosition - - (Math.abs(markerValue) / columnLongest) * (maxWidth / 2); - }); - } - } else if (axis === 'directional') { - if (direction === 'LTR') { - // Directional, LTR - zeroPosition = 0; - dataBarX = zeroPosition; - markerXs = markers.map(marker => { - const { column: markerColumn } = marker; - const markerValue = Number(model.textForCell(markerColumn, modelRow)); - return ( - zeroPosition + (Math.abs(markerValue) / columnLongest) * maxWidth - ); - }); - } else if (direction === 'RTL') { - // Directional, RTL - zeroPosition = columnWidth; - dataBarX = zeroPosition - (Math.abs(value) / columnLongest) * maxWidth; - markerXs = markers.map(marker => { - const { column: markerColumn } = marker; - const markerValue = Number(model.textForCell(markerColumn, modelRow)); - return ( - zeroPosition - (Math.abs(markerValue) / columnLongest) * maxWidth - ); - }); - } - } - - // Offset all values by the actual x value and padding - if (direction === 'LTR') { - zeroPosition += x + leftPadding + treeIndent; - dataBarX += x + leftPadding + treeIndent; - markerXs = markerXs.map( - markerX => markerX + x + leftPadding + treeIndent - ); - - if (valuePlacement === 'beside' && textAlign === 'left') { - zeroPosition += longestValueWidth + cellHorizontalPadding; - dataBarX += longestValueWidth + cellHorizontalPadding; - markerXs = markerXs.map( - markerX => markerX + longestValueWidth + cellHorizontalPadding - ); - } - } else if (direction === 'RTL') { - zeroPosition = zeroPosition + x - rightPadding; - dataBarX = dataBarX + x - rightPadding; - markerXs = markerXs.map(markerX => markerX + x - rightPadding); - - if (valuePlacement === 'beside' && textAlign === 'right') { - zeroPosition = zeroPosition - cellHorizontalPadding - longestValueWidth; - dataBarX = dataBarX - cellHorizontalPadding - longestValueWidth; - markerXs = markerXs.map( - markerX => markerX - cellHorizontalPadding - longestValueWidth - ); - } - } - - leftmostPosition += x + treeIndent; - rightmostPosition += x; - - return { - maxWidth, - x: dataBarX, - y: y + 1.5, - zeroPosition, - leftmostPosition, - rightmostPosition, - totalValueRange, - dataBarWidth, - markerXs, - }; - } - - drawGradient( - context: CanvasRenderingContext2D, - leftColor: Oklab, - rightColor: Oklab, - x: number, - y: number, - width: number, - height: number - ) { - let currentColor = leftColor; - // Increase by 0.5 because half-pixel will render weird on different zooms - for (let currentX = x; currentX <= x + width; currentX += 0.5) { - this.drawGradientPart( - context, - currentX, - y, - 1, - height, - GridColorUtils.rgbToHex(GridColorUtils.OklabToLinearSRGB(currentColor)) - ); - - currentColor = GridColorUtils.lerpColor( - leftColor, - rightColor, - (currentX - x) / width - ); - } - } - - drawGradientPart( - context: CanvasRenderingContext2D, - x: number, - y: number, - width: number, - height: number, - color: string - ) { - context.fillStyle = color; - context.fillRect(x, y, width, height); - } - - /** - * Returns the width of the widest value in pixels - */ - getCachedWidestValueForColumn = memoizeClear( - ( - context: CanvasRenderingContext2D, - visibleRows: readonly VisibleIndex[], - modelRows: VisibleToModelMap, - model: GridModel, - column: ModelIndex - ): number => { - let widestValue = 0; - for (let i = 0; i < visibleRows.length; i += 1) { - const row = visibleRows[i]; - const modelRow = getOrThrow(modelRows, row); - const text = model.textForCell(column, modelRow); - widestValue = Math.max(widestValue, context.measureText(text).width); - } - - return widestValue; - }, - { max: 1000 } - ); -} - -export default DataBarCellRenderer; diff --git a/packages/grid/src/DataBarGridModel.ts b/packages/grid/src/DataBarGridModel.ts deleted file mode 100644 index e7a3dcab72..0000000000 --- a/packages/grid/src/DataBarGridModel.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ModelIndex } from './GridMetrics'; -import GridModel from './GridModel'; -import { GridColor } from './GridTheme'; - -export type Marker = { column: ModelIndex; color: string }; -export type AxisOption = 'proportional' | 'middle' | 'directional'; -export type ValuePlacementOption = 'beside' | 'overlap' | 'hide'; -export type DirectionOption = 'LTR' | 'RTL'; -/** Map from ModelIndex to the axis option of the column */ -export type ColumnAxisMap = Map; -/** Map from ModelIndex to a color or an array of colors - * If given an array, then the bar will be a gradient - * The colors should be given left to right (e.g. it should be like ['yellow', 'green'] for positive color and ['red', 'yellow'] for negative color) - */ -export type ColorMap = Map; -/** Map from ModelIndex to the value placement option of the column */ -export type ValuePlacementMap = Map; -/** Map from ModelIndex to the opacity of the column */ -export type OpacityMap = Map; -/** Map from ModelIndex to the direction of the column */ -export type DirectionMap = Map; -/** Map from ModelIndex to the text alignment of the column */ -export type TextAlignmentMap = Map; -/** Map from column to the columns its markers are from */ -export type MarkerMap = Map; -/** Map from column to whether the bar has a gradient */ -export type GradientMap = Map; -// Map from ModelIndex to the minimum number in the column -export type MinMap = Map; -// Map from ModelIndex to the maximum number in the column -export type MaxMap = Map; - -export interface DataBarOptions { - columnMin: number; - columnMax: number; - axis: AxisOption; - color: GridColor | GridColor[]; - valuePlacement: ValuePlacementOption; - opacity: number; - markers: Marker[]; - direction: DirectionOption; - value: number; -} - -export function isDataBarGridModel( - model: GridModel -): model is DataBarGridModel { - return (model as DataBarGridModel)?.dataBarOptionsForCell !== undefined; -} - -export interface DataBarGridModel extends GridModel { - dataBarOptionsForCell(column: ModelIndex, row: ModelIndex): DataBarOptions; -} diff --git a/packages/grid/src/GridColorUtils.ts b/packages/grid/src/GridColorUtils.ts index 4a653611a7..6301ebc70d 100644 --- a/packages/grid/src/GridColorUtils.ts +++ b/packages/grid/src/GridColorUtils.ts @@ -1,11 +1,7 @@ import convert from 'color-convert'; import { HEX } from 'color-convert/conversions'; -import clamp from 'lodash.clamp'; import { GridColor } from './GridTheme'; -export type RGB = { r: number; g: number; b: number }; -export type Oklab = { L: number; a: number; b: number }; - /** * Darken the provided colour * @param color Color in hex format to convert (with #) @@ -34,117 +30,4 @@ export function colorWithAlpha(color: HEX, alpha: number): GridColor { return `rgba(${r}, ${g}, ${b}, ${alpha})`; } -/** - * Converts a color in RGB to Oklab - * Formula provided here: https://bottosson.github.io/posts/oklab/#converting-from-linear-srgb-to-oklab - * @param color An RGB color - * @returns The color but respresented as an Oklab color - */ -const linearSRGBToOklab = (color: RGB): Oklab => { - const { r, g, b } = color; - - const l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b; - const m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b; - const s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b; - - const l2 = Math.cbrt(l); - const m2 = Math.cbrt(m); - const s2 = Math.cbrt(s); - - return { - L: 0.2104542553 * l2 + 0.793617785 * m2 - 0.0040720468 * s2, - a: 1.9779984951 * l2 - 2.428592205 * m2 + 0.4505937099 * s2, - b: 0.0259040371 * l2 + 0.7827717662 * m2 - 0.808675766 * s2, - }; -}; - -/** - * Converts an Oklab color to RGB - * Formula provided here: https://bottosson.github.io/posts/oklab/#converting-from-linear-srgb-to-oklab - * @param color An Oklab color - * @returns The given color but represented as a RGB color - */ -const OklabToLinearSRGB = (color: Oklab): RGB => { - const { L, a, b } = color; - - const l2 = L + 0.3963377774 * a + 0.2158037573 * b; - const m2 = L - 0.1055613458 * a - 0.0638541728 * b; - const s2 = L - 0.0894841775 * a - 1.291485548 * b; - - const l = l2 * l2 * l2; - const m = m2 * m2 * m2; - const s = s2 * s2 * s2; - - return { - r: clamp(+4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s, 0, 255), - g: clamp(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s, 0, 255), - b: clamp(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s, 0, 255), - }; -}; - -/** - * Converts a hex color to RGB - * Algorithm from https://stackoverflow.com/a/39077686/20005358 - * @param hex A hex color - * @returns The RGB representation of the given color - */ -const hexToRgb = (hex: string): RGB => { - const rgbArray = hex - .replace( - /^#?([a-f\d])([a-f\d])([a-f\d])$/i, - (m: string, r: string, g: string, b: string) => - `#${r}${r}${g}${g}${b}${b}` - ) - .substring(1) - .match(/.{2}/g) - ?.map((x: string) => parseInt(x, 16)) ?? [0, 0, 0]; - - return { r: rgbArray[0], g: rgbArray[1], b: rgbArray[2] }; -}; - -/** - * Converts a RGB color to hex - * Algorithm from https://stackoverflow.com/a/39077686/20005358 - * @param color A RGB color - * @returns The hexcode of the given color - */ -const rgbToHex = (color: RGB): string => { - const r = Math.round(color.r); - const g = Math.round(color.g); - const b = Math.round(color.b); - - return `#${[r, g, b] - .map(x => { - const hex = x.toString(16); - return hex.length === 1 ? `0${hex}` : hex; - }) - .join('')}`; -}; - -/** - * Calculates a color given an interpolation factor between two given colors - * @param color1 Color on one end - * @param color2 Color on other end - * @param factor The interpolation factor (0 to 1, 0 will be color1 while 1 will be color2) - * @returns The color determined by the interpolation factor between the two colors - */ -const lerpColor = (color1: Oklab, color2: Oklab, factor: number): Oklab => { - const { L: L1, a: a1, b: b1 } = color1; - const { L: L2, a: a2, b: b2 } = color2; - - const L = L1 + (L2 - L1) * factor; - const a = a1 + (a2 - a1) * factor; - const b = b1 + (b2 - b1) * factor; - - return { L, a, b }; -}; - -export default { - colorWithAlpha, - darkenForDepth, - linearSRGBToOklab, - OklabToLinearSRGB, - hexToRgb, - rgbToHex, - lerpColor, -}; +export default { colorWithAlpha, darkenForDepth }; diff --git a/packages/grid/src/GridMetricCalculator.ts b/packages/grid/src/GridMetricCalculator.ts index bc49d116dd..782c7fb1e6 100644 --- a/packages/grid/src/GridMetricCalculator.ts +++ b/packages/grid/src/GridMetricCalculator.ts @@ -1728,7 +1728,6 @@ export class GridMetricCalculator { rowHeaderWidth, rowFooterWidth, scrollBarSize, - dataBarHorizontalPadding, } = theme; let columnWidth = 0; @@ -1745,19 +1744,13 @@ export class GridMetricCalculator { row => { const modelRow = this.getModelRow(row, state); const text = model.textForCell(modelColumn, modelRow); - const cellRenderType = model.renderTypeForCell(modelColumn, modelRow); - - let cellWidth = 0; if (text) { const cellPadding = cellHorizontalPadding * 2; - cellWidth = text.length * fontWidth + cellPadding; - } - - if (cellRenderType === 'dataBar') { - cellWidth += dataBarHorizontalPadding; + columnWidth = Math.max( + columnWidth, + text.length * fontWidth + cellPadding + ); } - - columnWidth = Math.max(columnWidth, cellWidth); } ); diff --git a/packages/grid/src/GridModel.ts b/packages/grid/src/GridModel.ts index 3f0dda5f7e..81bcacad5c 100644 --- a/packages/grid/src/GridModel.ts +++ b/packages/grid/src/GridModel.ts @@ -4,7 +4,6 @@ import { ModelIndex } from './GridMetrics'; import { GridColor, GridTheme, NullableGridColor } from './GridTheme'; import memoizeClear from './memoizeClear'; import GridUtils, { Token } from './GridUtils'; -import { CellRenderType } from './CellRenderer'; const LINK_TRUNCATION_LENGTH = 5000; @@ -227,10 +226,6 @@ abstract class GridModel< return GridUtils.findTokensWithProtocolInText(contentToCheckForLinks); } ); - - renderTypeForCell(column: ModelIndex, row: ModelIndex): CellRenderType { - return 'text'; - } } export default GridModel; diff --git a/packages/grid/src/GridRenderer.test.tsx b/packages/grid/src/GridRenderer.test.tsx index 5d4891ceba..e5ba6efc57 100644 --- a/packages/grid/src/GridRenderer.test.tsx +++ b/packages/grid/src/GridRenderer.test.tsx @@ -3,7 +3,6 @@ import GridModel from './GridModel'; import GridRenderer from './GridRenderer'; import MockGridModel from './MockGridModel'; import GridTheme from './GridTheme'; -import TextCellRenderer from './TextCellRenderer'; import { LinkToken } from './GridUtils'; import { GridRenderState } from './GridRendererTypes'; @@ -117,10 +116,7 @@ describe('getTokenBoxesForVisibleCell', () => { }), }); - const textCellRenderer = renderer.getCellRenderer( - 'text' - ) as TextCellRenderer; - textCellRenderer.getCachedTruncatedString = jest.fn( + renderer.getCachedTruncatedString = jest.fn( ( context: CanvasRenderingContext2D, text: string, @@ -132,14 +128,7 @@ describe('getTokenBoxesForVisibleCell', () => { }); it('should return tokens that are visible in the cell', () => { - const textCellRenderer = renderer.getCellRenderer( - 'text' - ) as TextCellRenderer; - const tokens = textCellRenderer.getTokenBoxesForVisibleCell( - 0, - 0, - renderState - ); + const tokens = renderer.getTokenBoxesForVisibleCell(0, 0, renderState); const expectedValue: LinkToken = { type: 'url', @@ -155,14 +144,7 @@ describe('getTokenBoxesForVisibleCell', () => { }); it('should return multiple tokens', () => { - const textCellRenderer = renderer.getCellRenderer( - 'text' - ) as TextCellRenderer; - const tokens = textCellRenderer.getTokenBoxesForVisibleCell( - 0, - 2, - renderState - ); + const tokens = renderer.getTokenBoxesForVisibleCell(0, 2, renderState); const expectedValue: LinkToken[] = [ { @@ -191,14 +173,7 @@ describe('getTokenBoxesForVisibleCell', () => { }); it('should return empty array if there are no tokens', () => { - const textCellRenderer = renderer.getCellRenderer( - 'text' - ) as TextCellRenderer; - const tokens = textCellRenderer.getTokenBoxesForVisibleCell( - 0, - 1, - renderState - ); + const tokens = renderer.getTokenBoxesForVisibleCell(0, 1, renderState); expect(tokens).toHaveLength(0); }); @@ -206,14 +181,7 @@ describe('getTokenBoxesForVisibleCell', () => { it('should return empty array if context or metrics is null', () => { // @ts-expect-error metrics and context usually can't be null renderState = makeMockGridRenderState({ metrics: null, context: null }); - const textCellRenderer = renderer.getCellRenderer( - 'text' - ) as TextCellRenderer; - const tokens = textCellRenderer.getTokenBoxesForVisibleCell( - 0, - 0, - renderState - ); + const tokens = renderer.getTokenBoxesForVisibleCell(0, 0, renderState); expect(tokens).toHaveLength(0); }); diff --git a/packages/grid/src/GridRenderer.ts b/packages/grid/src/GridRenderer.ts index 38b142ea9e..e8744dafc2 100644 --- a/packages/grid/src/GridRenderer.ts +++ b/packages/grid/src/GridRenderer.ts @@ -1,18 +1,15 @@ import clamp from 'lodash.clamp'; -import { ColorUtils, getOrThrow } from '@deephaven/utils'; +import { ColorUtils, EMPTY_ARRAY, getOrThrow } from '@deephaven/utils'; import memoizeClear from './memoizeClear'; -import GridUtils from './GridUtils'; +import GridUtils, { Token, TokenBox } from './GridUtils'; import GridColorUtils from './GridColorUtils'; import { isExpandableGridModel } from './ExpandableGridModel'; import { GridColor, GridColorWay, NullableGridColor } from './GridTheme'; -import { Coordinate, VisibleIndex } from './GridMetrics'; +import { BoxCoordinates, Coordinate, VisibleIndex } from './GridMetrics'; import { isEditableGridModel } from './EditableGridModel'; import GridColumnSeparatorMouseHandler from './mouse-handlers/GridColumnSeparatorMouseHandler'; import { BoundedAxisRange } from './GridAxisRange'; -import { DEFAULT_FONT_WIDTH, GridRenderState } from './GridRendererTypes'; -import CellRenderer, { CellRenderType } from './CellRenderer'; -import DataBarCellRenderer from './DataBarCellRenderer'; -import TextCellRenderer from './TextCellRenderer'; +import { GridRenderState } from './GridRendererTypes'; type NoneNullColumnRange = { startColumn: number; endColumn: number }; @@ -27,16 +24,15 @@ type NoneNullRowRange = { startRow: number; endRow: number }; * your own methods to customize drawing of the grid (eg. Draw icons or special features) */ export class GridRenderer { + // Default font width in pixels if it cannot be retrieved from the context + static DEFAULT_FONT_WIDTH = 10; + // Default radius in pixels for corners for some elements (like the active cell) static DEFAULT_EDGE_RADIUS = 2; // Default width in pixels for the border of the active cell static ACTIVE_CELL_BORDER_WIDTH = 2; - protected textCellRenderer = new TextCellRenderer(); - - protected dataBarCellRenderer = new DataBarCellRenderer(); - /** * Truncate a string to the specified length and add ellipses if necessary * @param str The string to truncate @@ -122,7 +118,7 @@ export class GridRenderer { context: CanvasRenderingContext2D, str: string, width: number, - fontWidth = DEFAULT_FONT_WIDTH, + fontWidth = GridRenderer.DEFAULT_FONT_WIDTH, truncationChar?: string ): string { if (width <= 0 || str.length <= 0) { @@ -997,28 +993,242 @@ export class GridRenderer { context.restore(); } + /** + * Gets textWidth and X-Y position for a specific cell + * The textWidth returned is the width that the text can occupy accounting for any other cell markings + * The width accounts for tree table indents and cell padding, so it is the width the text may consume + * + * @param state GridRenderState to get the text metrics for + * @param column Column of cell to get text metrics for + * @param row Row of cell to get text metrics for + * @returns Object with width, x, and y of the text + */ + getTextRenderMetrics( + state: GridRenderState, + column: VisibleIndex, + row: VisibleIndex + ): { + width: number; + x: number; + y: number; + } { + const { metrics, model, theme } = state; + const { + firstColumn, + allColumnXs, + allColumnWidths, + allRowYs, + allRowHeights, + modelRows, + modelColumns, + } = metrics; + const { + cellHorizontalPadding, + treeDepthIndent, + treeHorizontalPadding, + } = theme; + + const modelRow = getOrThrow(modelRows, row); + const modelColumn = getOrThrow(modelColumns, column); + const textAlign = model.textAlignForCell(modelColumn, modelRow); + const x = getOrThrow(allColumnXs, column); + const y = getOrThrow(allRowYs, row); + const columnWidth = getOrThrow(allColumnWidths, column); + const rowHeight = getOrThrow(allRowHeights, row); + const isFirstColumn = column === firstColumn; + let treeIndent = 0; + if ( + isExpandableGridModel(model) && + model.hasExpandableRows && + isFirstColumn + ) { + treeIndent = + treeDepthIndent * (model.depthForRow(row) + 1) + treeHorizontalPadding; + } + const textWidth = columnWidth - treeIndent; + let textX = x + cellHorizontalPadding; + const textY = y + rowHeight * 0.5; + if (textAlign === 'right') { + textX = x + textWidth - cellHorizontalPadding; + } else if (textAlign === 'center') { + textX = x + textWidth * 0.5; + } + textX += treeIndent; + + return { + width: textWidth - cellHorizontalPadding * 2, + x: textX, + y: textY, + }; + } + drawCellContent( context: CanvasRenderingContext2D, state: GridRenderState, column: VisibleIndex, - row: VisibleIndex + row: VisibleIndex, + textOverride?: string ): void { - const { metrics, model } = state; - const { modelColumns, modelRows } = metrics; + const { metrics, model, theme } = state; + const { + firstColumn, + fontWidths, + modelColumns, + modelRows, + allRowHeights, + } = metrics; + const { textColor } = theme; + const rowHeight = getOrThrow(allRowHeights, row); const modelRow = getOrThrow(modelRows, row); const modelColumn = getOrThrow(modelColumns, column); - const renderType = model.renderTypeForCell(modelColumn, modelRow); - const cellRenderer = this.getCellRenderer(renderType); - cellRenderer.drawCellContent(context, state, column, row); + const text = textOverride ?? model.textForCell(modelColumn, modelRow); + const truncationChar = model.truncationCharForCell(modelColumn, modelRow); + const isFirstColumn = column === firstColumn; + + if (text && rowHeight > 0) { + const textAlign = model.textAlignForCell(modelColumn, modelRow) || 'left'; + context.textAlign = textAlign; + + const color = + model.colorForCell(modelColumn, modelRow, theme) || textColor; + context.fillStyle = color; + + context.save(); + + const { + width: textWidth, + x: textX, + y: textY, + } = this.getTextRenderMetrics(state, column, row); + + const fontWidth = + fontWidths.get(context.font) ?? GridRenderer.DEFAULT_FONT_WIDTH; + const truncatedText = this.getCachedTruncatedString( + context, + text, + textWidth, + fontWidth, + truncationChar + ); + + const tokens = model.tokensForCell( + modelColumn, + modelRow, + truncatedText.length + ); + + if (truncatedText) { + let tokenIndex = 0; + let textStart = 0; + let left = textX; + const { actualBoundingBoxDescent } = context.measureText(truncatedText); + + while (textStart < truncatedText.length) { + const nextToken = tokens[tokenIndex]; + const token = textStart === nextToken?.start ? nextToken : null; + const textEnd = + token?.end ?? nextToken?.start ?? truncatedText.length; + const value = truncatedText.substring(textStart, textEnd); + const { width } = context.measureText(value); + const widthOfUnderline = value.endsWith('…') + ? context.measureText(value.substring(0, value.length - 1)).width + : width; + + // Set the styling based on the token, then draw the text + if (token != null) { + context.fillStyle = theme.hyperlinkColor; + context.fillText(value, left, textY); + context.fillRect( + left, + textY + actualBoundingBoxDescent, + widthOfUnderline, + 1 + ); + } else { + context.fillStyle = color; + context.fillText(value, left, textY); + } + + left += width; + textStart = textEnd; + if (token != null) tokenIndex += 1; + } + } + context.restore(); + } + + if ( + isFirstColumn && + isExpandableGridModel(model) && + model.hasExpandableRows + ) { + this.drawCellRowTreeMarker(context, state, row); + } } - getCellRenderer(renderType: CellRenderType): CellRenderer { - switch (renderType) { - case 'dataBar': - return this.dataBarCellRenderer; - default: - return this.textCellRenderer; + drawCellRowTreeMarker( + context: CanvasRenderingContext2D, + state: GridRenderState, + row: VisibleIndex + ): void { + const { metrics, model, mouseX, mouseY, theme } = state; + const { + firstColumn, + gridX, + gridY, + allColumnXs, + allColumnWidths, + allRowYs, + allRowHeights, + visibleRowTreeBoxes, + } = metrics; + const { treeMarkerColor, treeMarkerHoverColor } = theme; + const columnX = getOrThrow(allColumnXs, firstColumn); + const columnWidth = getOrThrow(allColumnWidths, firstColumn); + const rowY = getOrThrow(allRowYs, row); + const rowHeight = getOrThrow(allRowHeights, row); + if (!isExpandableGridModel(model) || !model.isRowExpandable(row)) { + return; } + + const treeBox = getOrThrow(visibleRowTreeBoxes, row); + const color = + mouseX != null && + mouseY != null && + mouseX >= gridX + columnX && + mouseX <= gridX + columnX + columnWidth && + mouseY >= gridY + rowY && + mouseY <= gridY + rowY + rowHeight + ? treeMarkerHoverColor + : treeMarkerColor; + + this.drawTreeMarker( + context, + state, + columnX, + rowY, + treeBox, + color, + model.isRowExpanded(row) + ); + } + + drawTreeMarker( + context: CanvasRenderingContext2D, + state: GridRenderState, + columnX: Coordinate, + rowY: Coordinate, + treeBox: BoxCoordinates, + color: GridColor, + isExpanded: boolean + ): void { + const { x1, y1, x2, y2 } = treeBox; + const markerText = isExpanded ? '⊟' : '⊞'; + const textX = columnX + (x1 + x2) * 0.5 + 0.5; + const textY = rowY + (y1 + y2) * 0.5 + 0.5; + context.fillStyle = color; + context.textAlign = 'center'; + context.fillText(markerText, textX, textY); } drawCellRowTreeDepthLines( @@ -1085,6 +1295,24 @@ export class GridRenderer { } } + getCachedTruncatedString = memoizeClear( + ( + context: CanvasRenderingContext2D, + text: string, + width: number, + fontWidth: number, + truncationChar?: string + ): string => + GridRenderer.truncateToWidth( + context, + text, + width, + fontWidth, + truncationChar + ), + { max: 10000 } + ); + getCachedBackgroundColors = memoizeClear( (backgroundColors: GridColorWay, maxDepth: number): GridColor[][] => backgroundColors.split(' ').map(color => { @@ -1537,7 +1765,8 @@ export class GridRenderer { white, } = theme; const { fontWidths, width } = metrics; - const fontWidth = fontWidths.get(context.font) ?? DEFAULT_FONT_WIDTH; + const fontWidth = + fontWidths.get(context.font) ?? GridRenderer.DEFAULT_FONT_WIDTH; const maxWidth = columnWidth - headerHorizontalPadding * 2; const maxLength = maxWidth / fontWidth; @@ -2751,6 +2980,153 @@ export class GridRenderer { context.translate(-barLeft, -barTop); } + + /** + * Gets the token boxes that are visible in the cell + * @param column The visible column + * @param row The visible row + * @param state The GridRenderState + * @returns An array of TokenBox of visible tokens or empty array with coordinates relative to gridX and gridY + */ + getTokenBoxesForVisibleCell( + column: VisibleIndex, + row: VisibleIndex, + state: GridRenderState + ): TokenBox[] { + const { metrics, context, model, theme } = state; + + if (context == null || metrics == null) { + return (EMPTY_ARRAY as unknown) as TokenBox[]; + } + + const { modelRows, modelColumns } = metrics; + const modelRow = getOrThrow(modelRows, row); + const modelColumn = getOrThrow(modelColumns, column); + + const text = model.textForCell(modelColumn, modelRow); + const { width: textWidth, x: textX, y: textY } = this.getTextRenderMetrics( + state, + column, + row + ); + + const { fontWidths } = metrics; + + // Set the font and baseline and change it back after + context.save(); + this.configureContext(context, state); + + const fontWidth = + fontWidths?.get(context.font) ?? GridRenderer.DEFAULT_FONT_WIDTH; + const truncationChar = model.truncationCharForCell(modelColumn, modelRow); + const truncatedText = this.getCachedTruncatedString( + context, + text, + textWidth, + fontWidth, + truncationChar + ); + + const { + actualBoundingBoxAscent, + actualBoundingBoxDescent, + } = context.measureText(truncatedText); + const textHeight = actualBoundingBoxAscent + actualBoundingBoxDescent; + + const tokens = model.tokensForCell( + modelColumn, + modelRow, + truncatedText.length + ); + + // Check if the truncated text contains a link + if (tokens.length === 0) { + context.restore(); + return (EMPTY_ARRAY as unknown) as TokenBox[]; + } + + const cachedTokenBoxes = this.getCachedTokenBoxesForVisibleCell( + truncatedText, + tokens, + theme.font, + 'middle', + textHeight, + context + ).map(tokenBox => ({ + x1: tokenBox.x1 + textX, + y1: tokenBox.y1 + (textY - actualBoundingBoxAscent), + x2: tokenBox.x2 + textX, + y2: tokenBox.y2 + (textY - actualBoundingBoxAscent), + token: tokenBox.token, + })); + + context.restore(); + + return cachedTokenBoxes; + } + + /** + * Returns an array of token boxes with the coordinates relative to the top left corner of the text + */ + getCachedTokenBoxesForVisibleCell = memoizeClear( + ( + truncatedText: string, + tokens: Token[], + // _font and _baseline are passed in so value is re-calculated when they change + // They should already be set on the `context`, so they are not used in this method + _font: string, + _baseline: CanvasTextBaseline, + textHeight: number, + context: CanvasRenderingContext2D + ): TokenBox[] => { + const top = 0; + const bottom = textHeight; + + const tokenBoxes: TokenBox[] = []; + + // The index where the last token ended + let lastTokenEnd = 0; + // The width of the text preceding the current token + let currentTextWidth = 0; + // Loop through array and push them to array + for (let i = 0; i < tokens.length; i += 1) { + const token = tokens[i]; + const { start, end } = token; + // The last token value is calculated based on the full text so the value needs to be truncated + const value = + end > truncatedText.length + ? truncatedText.substring(start) + : token.value; + + // Add the width of the text in between this token and the last token + currentTextWidth += context.measureText( + truncatedText.substring(lastTokenEnd, start) + ).width; + const tokenWidth = context.measureText(value).width; + + // Check if the x position is less than the grid x, then tokenWidth should be shifted by gridX - startX + + const left = currentTextWidth; + const right = left + tokenWidth; + + const newTokenBox: TokenBox = { + x1: left, + y1: top, + x2: right, + y2: bottom, + token, + }; + + tokenBoxes.push(newTokenBox); + + lastTokenEnd = end; + currentTextWidth += tokenWidth; + } + + return tokenBoxes; + }, + { max: 10000 } + ); } export default GridRenderer; diff --git a/packages/grid/src/GridRendererTypes.ts b/packages/grid/src/GridRendererTypes.ts index fecf47c366..8b2ddc2f8d 100644 --- a/packages/grid/src/GridRendererTypes.ts +++ b/packages/grid/src/GridRendererTypes.ts @@ -5,9 +5,6 @@ import { GridTheme } from './GridTheme'; import { DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; import { GridSeparator } from './mouse-handlers/GridSeparatorMouseHandler'; -// Default font width in pixels if it cannot be retrieved from the context -export const DEFAULT_FONT_WIDTH = 10; - export type EditingCellTextSelectionRange = [start: number, end: number]; export type EditingCell = { diff --git a/packages/grid/src/GridTheme.ts b/packages/grid/src/GridTheme.ts index 741e2c11ab..cde1afae61 100644 --- a/packages/grid/src/GridTheme.ts +++ b/packages/grid/src/GridTheme.ts @@ -132,12 +132,6 @@ export type GridTheme = { // Divider colors between the floating parts and the grid floatingDividerOuterColor: GridColor; floatingDividerInnerColor: GridColor; - - zeroLineColor: GridColor; - positiveBarColor: GridColor; - negativeBarColor: GridColor; - - dataBarHorizontalPadding: number; }; /** @@ -227,13 +221,6 @@ const defaultTheme: GridTheme = Object.freeze({ // Divider colors between the floating parts and the grid floatingDividerOuterColor: '#000000', floatingDividerInnerColor: '#cccccc', - - // Databar - zeroLineColor: '#888888', - positiveBarColor: '#00ff00', - negativeBarColor: '#ff0000', - - dataBarHorizontalPadding: 90, }); export default defaultTheme; diff --git a/packages/grid/src/GridUtils.ts b/packages/grid/src/GridUtils.ts index 46eb59b3ae..5c6a216e0c 100644 --- a/packages/grid/src/GridUtils.ts +++ b/packages/grid/src/GridUtils.ts @@ -1,7 +1,7 @@ import React from 'react'; import clamp from 'lodash.clamp'; import { find as linkifyFind } from 'linkifyjs'; -import { EMPTY_ARRAY, getOrThrow } from '@deephaven/utils'; +import { EMPTY_ARRAY } from '@deephaven/utils'; import GridRange, { GridRangeIndex } from './GridRange'; import { BoxCoordinates, @@ -23,8 +23,6 @@ import { isBoundedAxisRange, Range, } from './GridAxisRange'; -import { isExpandableGridModel } from './ExpandableGridModel'; -import { GridRenderState } from './GridRendererTypes'; export type GridPoint = { x: Coordinate; @@ -1443,75 +1441,6 @@ export class GridUtils { }; } - /** - * Gets textWidth and X-Y position for a specific cell - * The textWidth returned is the width that the text can occupy accounting for any other cell markings - * The width accounts for tree table indents and cell padding, so it is the width the text may consume - * - * @param state GridRenderState to get the text metrics for - * @param column Column of cell to get text metrics for - * @param row Row of cell to get text metrics for - * @returns Object with width, x, and y of the text - */ - static getTextRenderMetrics( - state: GridRenderState, - column: VisibleIndex, - row: VisibleIndex - ): { - width: number; - x: number; - y: number; - } { - const { metrics, model, theme } = state; - const { - firstColumn, - allColumnXs, - allColumnWidths, - allRowYs, - allRowHeights, - modelRows, - modelColumns, - } = metrics; - const { - cellHorizontalPadding, - treeDepthIndent, - treeHorizontalPadding, - } = theme; - - const modelRow = getOrThrow(modelRows, row); - const modelColumn = getOrThrow(modelColumns, column); - const textAlign = model.textAlignForCell(modelColumn, modelRow); - const x = getOrThrow(allColumnXs, column); - const y = getOrThrow(allRowYs, row); - const columnWidth = getOrThrow(allColumnWidths, column); - const rowHeight = getOrThrow(allRowHeights, row); - const isFirstColumn = column === firstColumn; - let treeIndent = 0; - if ( - isExpandableGridModel(model) && - model.hasExpandableRows && - isFirstColumn - ) { - treeIndent = - treeDepthIndent * (model.depthForRow(row) + 1) + treeHorizontalPadding; - } - const textWidth = columnWidth - treeIndent; - let textX = x + cellHorizontalPadding; - const textY = y + rowHeight * 0.5; - if (textAlign === 'right') { - textX = x + textWidth - cellHorizontalPadding; - } else if (textAlign === 'center') { - textX = x + textWidth * 0.5; - } - textX += treeIndent; - - return { - width: textWidth - cellHorizontalPadding * 2, - x: textX, - y: textY, - }; - } - /** * Finds tokens in text (urls, emails) that start with https:// or http:// * @param text The text to search in diff --git a/packages/grid/src/MockDataBarGridModel.ts b/packages/grid/src/MockDataBarGridModel.ts deleted file mode 100644 index c7d246c33f..0000000000 --- a/packages/grid/src/MockDataBarGridModel.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { getOrThrow } from '@deephaven/utils'; -import { CellRenderType } from './CellRenderer'; -import { - AxisOption, - ColorMap, - ColumnAxisMap, - DataBarGridModel, - DataBarOptions, - DirectionMap, - MarkerMap, - MaxMap, - MinMap, - OpacityMap, - TextAlignmentMap, - ValuePlacementMap, -} from './DataBarGridModel'; -import { ModelIndex } from './GridMetrics'; -import GridModel from './GridModel'; -import GridTheme from './GridTheme'; - -const DEFAULT_AXIS: AxisOption = 'proportional'; -const DEFAULT_POSITIVE_COLOR = GridTheme.positiveBarColor; -const DEFAULT_NEGATIVE_COLOR = GridTheme.negativeBarColor; -const DEFAULT_VALUE_PLACEMENT = 'beside'; -const DEFAULT_DIRECTION = 'LTR'; -const DEFAULT_TEXT_ALIGNMENT = 'right'; - -function isArrayOfNumbers(value: unknown): value is number[] { - return Array.isArray(value) && value.every(item => typeof item === 'number'); -} - -class MockDataBarGridModel extends GridModel implements DataBarGridModel { - private numberOfColumns; - - private numberOfRows; - - private data: unknown[][]; - - columnMins: MinMap; - - columnMaxs: MaxMap; - - columnAxes: ColumnAxisMap; - - valuePlacements: ValuePlacementMap; - - directions: DirectionMap; - - positiveColors: ColorMap; - - negativeColors: ColorMap; - - // Opacities should be between 0 and 1 - opacities: OpacityMap; - - textAlignments: TextAlignmentMap; - - markers: MarkerMap; - - constructor( - data: unknown[][], - columnAxes = new Map(), - positiveColors = new Map(), - negativeColors = new Map(), - valuePlacements = new Map(), - opacities = new Map(), - directions = new Map(), - textAlignments = new Map(), - markers: MarkerMap = new Map() - ) { - super(); - - this.positiveColors = positiveColors; - this.negativeColors = negativeColors; - this.data = data; - this.columnAxes = columnAxes; - this.valuePlacements = valuePlacements; - this.opacities = opacities; - this.directions = directions; - this.textAlignments = textAlignments; - this.markers = markers; - this.numberOfRows = Math.max(...data.map(row => row.length)); - this.numberOfColumns = data.length; - this.columnMins = new Map(); - this.columnMaxs = new Map(); - - for (let i = 0; i < data.length; i += 1) { - const column = data[i]; - if (isArrayOfNumbers(column)) { - this.columnMins.set(i, Math.min(...column)); - this.columnMaxs.set(i, Math.max(...column)); - } - } - } - - get rowCount() { - return this.numberOfRows; - } - - get columnCount() { - return this.numberOfColumns; - } - - textForCell(column: number, row: number): string { - return `${this.data[column]?.[row]}`; - } - - textForColumnHeader(column: number): string { - return `${column}`; - } - - textAlignForCell(column: number, row: number): CanvasTextAlign { - return this.textAlignments.get(column) ?? DEFAULT_TEXT_ALIGNMENT; - } - - renderTypeForCell(column: ModelIndex, row: ModelIndex): CellRenderType { - if (column < 20) { - return 'dataBar'; - } - return column % 2 === row % 2 ? 'dataBar' : 'text'; - } - - dataBarOptionsForCell(column: ModelIndex, row: ModelIndex): DataBarOptions { - const columnMin = getOrThrow(this.columnMins, column); - const columnMax = getOrThrow(this.columnMaxs, column); - const axis = this.columnAxes.get(column) ?? DEFAULT_AXIS; - const valuePlacement = - this.valuePlacements.get(column) ?? DEFAULT_VALUE_PLACEMENT; - let opacity = this.opacities.get(column); - if (opacity == null || opacity > 1) { - opacity = 1; - } else if (opacity < 0) { - opacity = 0; - } - const direction = this.directions.get(column) ?? DEFAULT_DIRECTION; - const positiveColor = - this.positiveColors.get(column) ?? DEFAULT_POSITIVE_COLOR; - const negativeColor = - this.negativeColors.get(column) ?? DEFAULT_NEGATIVE_COLOR; - - const value = Number(this.data[column]?.[row]); - const color = value >= 0 ? positiveColor : negativeColor; - const markers = this.markers.get(column) ?? []; - - return { - columnMin, - columnMax, - axis, - color, - valuePlacement, - opacity, - markers, - direction, - value, - }; - } -} - -export default MockDataBarGridModel; diff --git a/packages/grid/src/TextCellRenderer.ts b/packages/grid/src/TextCellRenderer.ts deleted file mode 100644 index 685d237dba..0000000000 --- a/packages/grid/src/TextCellRenderer.ts +++ /dev/null @@ -1,271 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { EMPTY_ARRAY, getOrThrow } from '@deephaven/utils'; -import CellRenderer from './CellRenderer'; -import { isExpandableGridModel } from './ExpandableGridModel'; -import { VisibleIndex } from './GridMetrics'; -import { DEFAULT_FONT_WIDTH, GridRenderState } from './GridRendererTypes'; -import GridUtils, { TokenBox, Token } from './GridUtils'; -import memoizeClear from './memoizeClear'; -import TokenBoxCellRenderer from './TokenBoxCellRenderer'; - -class TextCellRenderer extends CellRenderer implements TokenBoxCellRenderer { - drawCellContent( - context: CanvasRenderingContext2D, - state: GridRenderState, - column: VisibleIndex, - row: VisibleIndex - ): void { - const { metrics, model, theme } = state; - const { - fontWidths, - modelColumns, - modelRows, - allRowHeights, - firstColumn, - } = metrics; - const isFirstColumn = column === firstColumn; - const { textColor } = theme; - const rowHeight = getOrThrow(allRowHeights, row); - const modelRow = getOrThrow(modelRows, row); - const modelColumn = getOrThrow(modelColumns, column); - const text = model.textForCell(modelColumn, modelRow); - const truncationChar = model.truncationCharForCell(modelColumn, modelRow); - - if (text && rowHeight > 0) { - const textAlign = model.textAlignForCell(modelColumn, modelRow) || 'left'; - context.textAlign = textAlign; - - const color = - model.colorForCell(modelColumn, modelRow, theme) || textColor; - context.fillStyle = color; - - context.save(); - - const { - width: textWidth, - x: textX, - y: textY, - } = GridUtils.getTextRenderMetrics(state, column, row); - - const fontWidth = fontWidths.get(context.font) ?? DEFAULT_FONT_WIDTH; - const truncatedText = this.getCachedTruncatedString( - context, - text, - textWidth, - fontWidth, - truncationChar - ); - - const tokens = model.tokensForCell( - modelColumn, - modelRow, - truncatedText.length - ); - - if (truncatedText) { - let tokenIndex = 0; - let textStart = 0; - let left = textX; - const { actualBoundingBoxDescent } = context.measureText(truncatedText); - - while (textStart < truncatedText.length) { - const nextToken = tokens[tokenIndex]; - const token = textStart === nextToken?.start ? nextToken : null; - const textEnd = - token?.end ?? nextToken?.start ?? truncatedText.length; - const value = truncatedText.substring(textStart, textEnd); - const { width } = context.measureText(value); - const widthOfUnderline = value.endsWith('…') - ? context.measureText(value.substring(0, value.length - 1)).width - : width; - - // Set the styling based on the token, then draw the text - if (token != null) { - context.fillStyle = theme.hyperlinkColor; - context.fillText(value, left, textY); - context.fillRect( - left, - textY + actualBoundingBoxDescent, - widthOfUnderline, - 1 - ); - } else { - context.fillStyle = color; - context.fillText(value, left, textY); - } - - left += width; - textStart = textEnd; - if (token != null) tokenIndex += 1; - } - } - context.restore(); - } - - if ( - isFirstColumn && - isExpandableGridModel(model) && - model.hasExpandableRows - ) { - this.drawCellRowTreeMarker(context, state, row); - } - } - - /** - * Gets the token boxes that are visible in the cell - * @param column The visible column - * @param row The visible row - * @param state The GridRenderState - * @returns An array of TokenBox of visible tokens or empty array with coordinates relative to gridX and gridY - */ - getTokenBoxesForVisibleCell( - column: VisibleIndex, - row: VisibleIndex, - state: GridRenderState - ): TokenBox[] { - const { metrics, context, model, theme } = state; - - if (context == null || metrics == null) { - return (EMPTY_ARRAY as unknown) as TokenBox[]; - } - - const { modelRows, modelColumns } = metrics; - const modelRow = getOrThrow(modelRows, row); - const modelColumn = getOrThrow(modelColumns, column); - - const text = model.textForCell(modelColumn, modelRow); - const { - width: textWidth, - x: textX, - y: textY, - } = GridUtils.getTextRenderMetrics(state, column, row); - - const { fontWidths } = metrics; - - // Set the font and baseline and change it back after - context.save(); - this.configureContext(context, state); - - const fontWidth = fontWidths?.get(context.font) ?? DEFAULT_FONT_WIDTH; - const truncationChar = model.truncationCharForCell(modelColumn, modelRow); - const truncatedText = this.getCachedTruncatedString( - context, - text, - textWidth, - fontWidth, - truncationChar - ); - - const { - actualBoundingBoxAscent, - actualBoundingBoxDescent, - } = context.measureText(truncatedText); - const textHeight = actualBoundingBoxAscent + actualBoundingBoxDescent; - - const tokens = model.tokensForCell( - modelColumn, - modelRow, - truncatedText.length - ); - - // Check if the truncated text contains a link - if (tokens.length === 0) { - context.restore(); - return (EMPTY_ARRAY as unknown) as TokenBox[]; - } - - const cachedTokenBoxes = this.getCachedTokenBoxesForVisibleCell( - truncatedText, - tokens, - theme.font, - 'middle', - textHeight, - context - ).map(tokenBox => ({ - x1: tokenBox.x1 + textX, - y1: tokenBox.y1 + (textY - actualBoundingBoxAscent), - x2: tokenBox.x2 + textX, - y2: tokenBox.y2 + (textY - actualBoundingBoxAscent), - token: tokenBox.token, - })); - - context.restore(); - - return cachedTokenBoxes; - } - - configureContext( - context: CanvasRenderingContext2D, - state: GridRenderState - ): void { - const { theme } = state; - context.font = theme.font; - context.textBaseline = 'middle'; - context.lineCap = 'butt'; - } - - /** - * Returns an array of token boxes with the coordinates relative to the top left corner of the text - */ - getCachedTokenBoxesForVisibleCell = memoizeClear( - ( - truncatedText: string, - tokens: Token[], - // _font and _baseline are passed in so value is re-calculated when they change - // They should already be set on the `context`, so they are not used in this method - _font: string, - _baseline: CanvasTextBaseline, - textHeight: number, - context: CanvasRenderingContext2D - ): TokenBox[] => { - const top = 0; - const bottom = textHeight; - - const tokenBoxes: TokenBox[] = []; - - // The index where the last token ended - let lastTokenEnd = 0; - // The width of the text preceding the current token - let currentTextWidth = 0; - // Loop through array and push them to array - for (let i = 0; i < tokens.length; i += 1) { - const token = tokens[i]; - const { start, end } = token; - // The last token value is calculated based on the full text so the value needs to be truncated - const value = - end > truncatedText.length - ? truncatedText.substring(start) - : token.value; - - // Add the width of the text in between this token and the last token - currentTextWidth += context.measureText( - truncatedText.substring(lastTokenEnd, start) - ).width; - const tokenWidth = context.measureText(value).width; - - // Check if the x position is less than the grid x, then tokenWidth should be shifted by gridX - startX - - const left = currentTextWidth; - const right = left + tokenWidth; - - const newTokenBox: TokenBox = { - x1: left, - y1: top, - x2: right, - y2: bottom, - token, - }; - - tokenBoxes.push(newTokenBox); - - lastTokenEnd = end; - currentTextWidth += tokenWidth; - } - - return tokenBoxes; - }, - { max: 10000 } - ); -} - -export default TextCellRenderer; diff --git a/packages/grid/src/TokenBoxCellRenderer.ts b/packages/grid/src/TokenBoxCellRenderer.ts deleted file mode 100644 index 834205e82e..0000000000 --- a/packages/grid/src/TokenBoxCellRenderer.ts +++ /dev/null @@ -1,23 +0,0 @@ -import CellRenderer from './CellRenderer'; -import { VisibleIndex } from './GridMetrics'; -import { GridRenderState } from './GridRendererTypes'; -import { TokenBox } from './GridUtils'; - -export function isTokenBoxCellRenderer( - cellRenderer: CellRenderer -): cellRenderer is TokenBoxCellRenderer { - return ( - (cellRenderer as TokenBoxCellRenderer)?.getTokenBoxesForVisibleCell !== - undefined - ); -} - -interface TokenBoxCellRenderer extends CellRenderer { - getTokenBoxesForVisibleCell( - column: VisibleIndex, - row: VisibleIndex, - state: GridRenderState - ): TokenBox[]; -} - -export default TokenBoxCellRenderer; diff --git a/packages/grid/src/index.ts b/packages/grid/src/index.ts index 0ba0217031..8ea272b666 100644 --- a/packages/grid/src/index.ts +++ b/packages/grid/src/index.ts @@ -20,14 +20,9 @@ export { default as MockTreeGridModel } from './MockTreeGridModel'; export { default as memoizeClear } from './memoizeClear'; export { default as StaticDataGridModel } from './StaticDataGridModel'; export { default as ViewportDataGridModel } from './ViewportDataGridModel'; -export { default as MockDataBarGridModel } from './MockDataBarGridModel'; export * from './key-handlers'; export * from './mouse-handlers'; export * from './errors'; export * from './EventHandlerResult'; export { default as ThemeContext } from './ThemeContext'; -export type { default as CellRenderer, CellRenderType } from './CellRenderer'; -export { default as TextCellRenderer } from './TextCellRenderer'; -export { default as DataBarCellRenderer } from './DataBarCellRenderer'; -export * from './TokenBoxCellRenderer'; export * from './GridRendererTypes'; diff --git a/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts b/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts index 648aa5aee4..09ed028a89 100644 --- a/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts @@ -1,13 +1,11 @@ /* eslint class-methods-use-this: "off" */ -import { getOrThrow } from '@deephaven/utils'; import { isEditableGridModel } from '../EditableGridModel'; import { EventHandlerResult } from '../EventHandlerResult'; import Grid from '../Grid'; import GridMouseHandler, { GridMouseEvent } from '../GridMouseHandler'; import GridRange from '../GridRange'; import GridUtils, { GridPoint, isLinkToken, TokenBox } from '../GridUtils'; -import { isTokenBoxCellRenderer } from '../TokenBoxCellRenderer'; class GridTokenMouseHandler extends GridMouseHandler { timeoutId?: ReturnType; @@ -23,24 +21,13 @@ class GridTokenMouseHandler extends GridMouseHandler { isHoveringLink(gridPoint: GridPoint, grid: Grid): boolean { const { column, row, x, y } = gridPoint; - const { renderer, metrics, props } = grid; - const { model } = props; + const { renderer, metrics } = grid; if (column == null || row == null || metrics == null) { this.currentLinkBox = undefined; return false; } - const { modelRows, modelColumns } = metrics; - const modelRow = getOrThrow(modelRows, row); - const modelColumn = getOrThrow(modelColumns, column); - - const renderType = model.renderTypeForCell(modelColumn, modelRow); - const cellRenderer = renderer.getCellRenderer(renderType); - if (!isTokenBoxCellRenderer(cellRenderer)) { - return false; - } - if (this.currentLinkBox != null) { const { x1: left, y1: top, x2: right, y2: bottom } = this.currentLinkBox; if (x >= left && x <= right && y >= top && y <= bottom) { @@ -49,8 +36,7 @@ class GridTokenMouseHandler extends GridMouseHandler { } const renderState = grid.updateRenderState(); - - const tokensInCell = cellRenderer.getTokenBoxesForVisibleCell( + const tokensInCell = renderer.getTokenBoxesForVisibleCell( column, row, renderState diff --git a/packages/iris-grid/src/IrisGridCellRendererUtils.ts b/packages/iris-grid/src/IrisGridCellRendererUtils.ts deleted file mode 100644 index 3b322fd99a..0000000000 --- a/packages/iris-grid/src/IrisGridCellRendererUtils.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { BoxCoordinates, Coordinate } from '@deephaven/grid'; -import { getIcon } from './IrisGridIcons'; -import { IrisGridRenderState } from './IrisGridRenderer'; - -class IrisGridCellRendererUtils { - static drawTreeMarker( - context: CanvasRenderingContext2D, - state: IrisGridRenderState, - columnX: Coordinate, - rowY: Coordinate, - treeBox: BoxCoordinates, - color: string, - isExpanded: boolean - ): void { - context.save(); - const { x1, y1 } = treeBox; - const markerIcon = isExpanded - ? getIcon('caretDown') - : getIcon('caretRight'); - const iconX = columnX + x1 - 2; - const iconY = rowY + y1 + 2.5; - - context.fillStyle = color; - context.textAlign = 'center'; - context.translate(iconX, iconY); - context.fill(markerIcon); - context.restore(); - } -} - -export default IrisGridCellRendererUtils; diff --git a/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts b/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts deleted file mode 100644 index d70239491e..0000000000 --- a/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { - BoxCoordinates, - Coordinate, - DataBarCellRenderer, -} from '@deephaven/grid'; -import { IrisGridRenderState } from './IrisGridRenderer'; -import IrisGridCellRendererUtils from './IrisGridCellRendererUtils'; - -class IrisGridDataBarCellRenderer extends DataBarCellRenderer { - drawTreeMarker( - context: CanvasRenderingContext2D, - state: IrisGridRenderState, - columnX: Coordinate, - rowY: Coordinate, - treeBox: BoxCoordinates, - color: string, - isExpanded: boolean - ): void { - IrisGridCellRendererUtils.drawTreeMarker( - context, - state, - columnX, - rowY, - treeBox, - color, - isExpanded - ); - } -} - -export default IrisGridDataBarCellRenderer; diff --git a/packages/iris-grid/src/IrisGridIcons.ts b/packages/iris-grid/src/IrisGridIcons.ts deleted file mode 100644 index 9dcd58a46f..0000000000 --- a/packages/iris-grid/src/IrisGridIcons.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { memoizeClear } from '@deephaven/grid'; -import { - dhSortDown, - dhSortUp, - vsTriangleDown, - vsTriangleRight, - vsLinkExternal, - IconDefinition, -} from '@deephaven/icons'; - -export const ICON_SIZE = 16; - -export type IconName = - | 'sortUp' - | 'sortDown' - | 'caretDown' - | 'caretRight' - | 'cellOverflow'; - -const iconMap = new Map([ - ['sortUp', dhSortUp], - ['sortDown', dhSortDown], - ['caretDown', vsTriangleDown], - ['caretRight', vsTriangleRight], - ['cellOverflow', vsLinkExternal], -]); - -const makeIcon = memoizeClear( - (name: IconName) => { - const faIcon = iconMap.get(name); - if (faIcon === undefined) { - throw new Error('Icon is undefined'); - } - - const path = Array.isArray(faIcon.icon[4]) - ? faIcon.icon[4][0] - : faIcon.icon[4]; - const icon = new Path2D(path); - const scaledIcon = new Path2D(); - const scaleMatrix = { - a: ICON_SIZE / faIcon.icon[0], - d: ICON_SIZE / faIcon.icon[1], - }; - scaledIcon.addPath(icon, scaleMatrix); - return scaledIcon; - }, - { max: 1000 } -); - -export function getIcon(name: IconName): Path2D { - return makeIcon(name); -} diff --git a/packages/iris-grid/src/IrisGridRenderer.ts b/packages/iris-grid/src/IrisGridRenderer.ts index 9dcb1b3ebc..83da0d4708 100644 --- a/packages/iris-grid/src/IrisGridRenderer.ts +++ b/packages/iris-grid/src/IrisGridRenderer.ts @@ -1,10 +1,18 @@ /* eslint react/destructuring-assignment: "off" */ /* eslint class-methods-use-this: "off" */ /* eslint no-param-reassign: "off" */ +import { + dhSortDown, + dhSortUp, + vsTriangleDown, + vsTriangleRight, + vsLinkExternal, + IconDefinition, +} from '@deephaven/icons'; import { BoundedAxisRange, + BoxCoordinates, Coordinate, - DEFAULT_FONT_WIDTH, GridMetrics, GridRangeIndex, GridRenderer, @@ -24,9 +32,6 @@ import { } from './CommonTypes'; import { IrisGridThemeType } from './IrisGridTheme'; import IrisGridModel from './IrisGridModel'; -import IrisGridTextCellRenderer from './IrisGridTextCellRenderer'; -import IrisGridDataBarCellRenderer from './IrisGridDataBarCellRenderer'; -import { getIcon } from './IrisGridIcons'; const ICON_NAMES = Object.freeze({ SORT_UP: 'sortUp', @@ -37,6 +42,7 @@ const ICON_NAMES = Object.freeze({ }); const EXPAND_ICON_SIZE = 10; +const ICON_SIZE = 16; export type IrisGridRenderState = GridRenderState & { model: IrisGridModel; @@ -65,19 +71,51 @@ class IrisGridRenderer extends GridRenderer { return isAdvancedFilterValid && isQuickFilterValid; } - protected textCellRenderer = new IrisGridTextCellRenderer(); + constructor() { + super(); + this.icons = {}; + + this.initIcons(); + } + + icons: Record; + + initIcons(): void { + this.setIcon(ICON_NAMES.SORT_UP, dhSortUp); + this.setIcon(ICON_NAMES.SORT_DOWN, dhSortDown); + this.setIcon(ICON_NAMES.CARET_DOWN, vsTriangleDown); + this.setIcon(ICON_NAMES.CARET_RIGHT, vsTriangleRight); + this.setIcon(ICON_NAMES.CELL_OVERFLOW, vsLinkExternal); + } + + // Scales the icon to be square and match the global ICON_SIZE + setIcon(name: string, faIcon: IconDefinition): void { + const path = Array.isArray(faIcon.icon[4]) + ? faIcon.icon[4][0] + : faIcon.icon[4]; + const icon = new Path2D(path); + const scaledIcon = new Path2D(); + const scaleMatrix = { + a: ICON_SIZE / faIcon.icon[0], + d: ICON_SIZE / faIcon.icon[1], + }; + scaledIcon.addPath(icon, scaleMatrix); + this.icons[name] = scaledIcon; + } - protected dataBarCellRenderer = new IrisGridDataBarCellRenderer(); + getIcon(name: string): Path2D { + return this.icons[name]; + } getSortIcon(sort: Sort | null): Path2D | null { if (!sort) { return null; } if (sort.direction === TableUtils.sortDirection.ascending) { - return getIcon(ICON_NAMES.SORT_UP); + return this.getIcon(ICON_NAMES.SORT_UP); } if (sort.direction === TableUtils.sortDirection.descending) { - return getIcon(ICON_NAMES.SORT_DOWN); + return this.getIcon(ICON_NAMES.SORT_DOWN); } return null; } @@ -115,89 +153,23 @@ class IrisGridRenderer extends GridRenderer { ): void { const { metrics, model } = state; const { modelColumns, modelRows } = metrics; - const modelColumn = modelColumns.get(column); const modelRow = getOrThrow(modelRows, row); + const modelColumn = modelColumns.get(column); if (modelColumn === undefined) { return; } - - const renderType = model.renderTypeForCell(modelColumn, modelRow); - const cellRenderer = this.getCellRenderer(renderType); - cellRenderer.drawCellContent(context, state, column, row); - } - - getCellOverflowButtonPosition({ - mouseX, - mouseY, - metrics, - theme, - }: { - mouseX: Coordinate | null; - mouseY: Coordinate | null; - metrics: GridMetrics | undefined; - theme: GridThemeType; - }): { - left: Coordinate | null; - top: Coordinate | null; - width: number | null; - height: number | null; - } { - return this.textCellRenderer.getCellOverflowButtonPosition( - mouseX, - mouseY, - metrics, - theme - ); - } - - shouldRenderOverflowButton(state: IrisGridRenderState): boolean { - return this.textCellRenderer.shouldRenderOverflowButton(state); - } - - drawCellOverflowButton(state: IrisGridRenderState): void { - const { context, mouseX, mouseY, theme } = state; - if (mouseX == null || mouseY == null) return; - - if (!this.shouldRenderOverflowButton(state)) { - return; - } - - const { - left: buttonLeft, - top: buttonTop, - width: buttonWidth, - height: buttonHeight, - } = this.getCellOverflowButtonPosition(state); - - const { - cellHorizontalPadding, - overflowButtonColor, - overflowButtonHoverColor, - } = theme; - - context.save(); - if ( - overflowButtonHoverColor != null && - buttonLeft != null && - buttonWidth != null && - buttonTop != null && - buttonHeight != null && - mouseX >= buttonLeft && - mouseX <= buttonLeft + buttonWidth && - mouseY >= buttonTop && - mouseY <= buttonTop + buttonHeight - ) { - context.fillStyle = overflowButtonHoverColor; - } else if (overflowButtonColor != null) { - context.fillStyle = overflowButtonColor; - } - const icon = getIcon(ICON_NAMES.CELL_OVERFLOW); - if (buttonLeft != null && buttonTop != null) { - context.translate(buttonLeft + cellHorizontalPadding, buttonTop + 2); + const value = model.valueForCell(modelColumn, modelRow); + if (TableUtils.isTextType(model.columns[modelColumn]?.type)) { + if (value === null || value === '') { + const originalFont = context.font; + context.font = `italic ${originalFont}`; + const displayValue = value === null ? 'null' : 'empty'; + super.drawCellContent(context, state, column, row, displayValue); + context.font = originalFont; + return; + } } - context.fill(icon); - - context.restore(); + super.drawCellContent(context, state, column, row); } drawGroupedColumnLine( @@ -501,7 +473,8 @@ class IrisGridRenderer extends GridRenderer { return; } - const fontWidth = fontWidths.get(context.font) ?? DEFAULT_FONT_WIDTH; + const fontWidth = + fontWidths.get(context.font) ?? GridRenderer.DEFAULT_FONT_WIDTH; assertNotNull(fontWidth); const textWidth = text.length * fontWidth; const textRight = gridX + columnX + textWidth + headerHorizontalPadding; @@ -810,6 +783,30 @@ class IrisGridRenderer extends GridRenderer { context.restore(); } + drawTreeMarker( + context: CanvasRenderingContext2D, + state: IrisGridRenderState, + columnX: Coordinate, + rowY: Coordinate, + treeBox: BoxCoordinates, + color: string, + isExpanded: boolean + ): void { + context.save(); + const { x1, y1 } = treeBox; + const markerIcon = isExpanded + ? this.getIcon(ICON_NAMES.CARET_DOWN) + : this.getIcon(ICON_NAMES.CARET_RIGHT); + const iconX = columnX + x1 - 2; + const iconY = rowY + y1 + 2.5; + + context.fillStyle = color; + context.textAlign = 'center'; + context.translate(iconX, iconY); + context.fill(markerIcon); + context.restore(); + } + drawRowFooters( context: CanvasRenderingContext2D, state: IrisGridRenderState @@ -915,6 +912,174 @@ class IrisGridRenderer extends GridRenderer { context.translate(-gridX, -gridY); } + // This will shrink the size the text may take when the overflow button is rendered + // The text will truncate to a smaller width and won't overlap the button + getTextRenderMetrics( + state: IrisGridRenderState, + column: VisibleIndex, + row: VisibleIndex + ): { + width: number; + x: Coordinate; + y: Coordinate; + } { + const textMetrics = super.getTextRenderMetrics(state, column, row); + + const { mouseX, mouseY, metrics } = state; + + if (mouseX == null || mouseY == null) { + return textMetrics; + } + + const { column: mouseColumn, row: mouseRow } = GridUtils.getGridPointFromXY( + mouseX, + mouseY, + metrics + ); + + if (column === mouseColumn && row === mouseRow) { + const { left } = this.getCellOverflowButtonPosition(state); + if (this.shouldRenderOverflowButton(state) && left != null) { + textMetrics.width = left - metrics.gridX - textMetrics.x; + } + } + return textMetrics; + } + + shouldRenderOverflowButton(state: IrisGridRenderState): boolean { + const { context, mouseX, mouseY, metrics, model, theme } = state; + if (mouseX == null || mouseY == null) { + return false; + } + + const { row, column, modelRow, modelColumn } = GridUtils.getCellInfoFromXY( + mouseX, + mouseY, + metrics + ); + + if ( + row == null || + column == null || + modelRow == null || + modelColumn == null || + !TableUtils.isStringType(model.columns[modelColumn].type) + ) { + return false; + } + + const text = model.textForCell(modelColumn, modelRow) ?? ''; + const { width: textWidth } = super.getTextRenderMetrics(state, column, row); + const fontWidth = + metrics.fontWidths.get(theme.font) ?? IrisGridRenderer.DEFAULT_FONT_WIDTH; + + context.save(); + context.font = theme.font; + + const truncatedText = this.getCachedTruncatedString( + context, + text, + textWidth, + fontWidth, + model.truncationCharForCell(modelColumn, modelRow) + ); + context.restore(); + + return text !== '' && truncatedText !== text; + } + + getCellOverflowButtonPosition({ + mouseX, + mouseY, + metrics, + theme, + }: { + mouseX: Coordinate | null; + mouseY: Coordinate | null; + metrics: GridMetrics | undefined; + theme: GridThemeType; + }): { + left: Coordinate | null; + top: Coordinate | null; + width: number | null; + height: number | null; + } { + const NULL_POSITION = { left: null, top: null, width: null, height: null }; + if (mouseX == null || mouseY == null || metrics == null) { + return NULL_POSITION; + } + const { rowHeight, columnWidth, left, top } = GridUtils.getCellInfoFromXY( + mouseX, + mouseY, + metrics + ); + + if (left == null || columnWidth == null || top == null) { + return NULL_POSITION; + } + + const { width: gridWidth, verticalBarWidth } = metrics; + const { cellHorizontalPadding } = theme; + + const width = ICON_SIZE + 2 * cellHorizontalPadding; + const height = rowHeight; + // Right edge of column or of visible grid, whichever is smaller + const right = Math.min( + metrics.gridX + left + columnWidth, + gridWidth - verticalBarWidth + ); + const buttonLeft = right - width; + const buttonTop = metrics.gridY + top; + + return { left: buttonLeft, top: buttonTop, width, height }; + } + + drawCellOverflowButton(state: IrisGridRenderState): void { + const { context, mouseX, mouseY, theme } = state; + if (mouseX == null || mouseY == null) return; + + if (!this.shouldRenderOverflowButton(state)) { + return; + } + + const { + left: buttonLeft, + top: buttonTop, + width: buttonWidth, + height: buttonHeight, + } = this.getCellOverflowButtonPosition(state); + + const { + cellHorizontalPadding, + overflowButtonColor, + overflowButtonHoverColor, + } = theme; + + context.save(); + if ( + overflowButtonHoverColor != null && + buttonLeft != null && + buttonWidth != null && + buttonTop != null && + buttonHeight != null && + mouseX >= buttonLeft && + mouseX <= buttonLeft + buttonWidth && + mouseY >= buttonTop && + mouseY <= buttonTop + buttonHeight + ) { + context.fillStyle = overflowButtonHoverColor; + } else if (overflowButtonColor != null) { + context.fillStyle = overflowButtonColor; + } + const icon = this.getIcon(ICON_NAMES.CELL_OVERFLOW); + if (buttonLeft != null && buttonTop != null) { + context.translate(buttonLeft + cellHorizontalPadding, buttonTop + 2); + } + context.fill(icon); + + context.restore(); + } + getExpandButtonPosition( { mouseX, diff --git a/packages/iris-grid/src/IrisGridTableModelTemplate.ts b/packages/iris-grid/src/IrisGridTableModelTemplate.ts index 43bde731f8..35375708b4 100644 --- a/packages/iris-grid/src/IrisGridTableModelTemplate.ts +++ b/packages/iris-grid/src/IrisGridTableModelTemplate.ts @@ -543,17 +543,6 @@ class IrisGridTableModelTemplate< return '*'; } } - - if (TableUtils.isTextType(this.columns[x]?.type)) { - if (text === null) { - return 'null'; - } - - if (text === '') { - return 'empty'; - } - } - return text ?? ''; } diff --git a/packages/iris-grid/src/IrisGridTextCellRenderer.ts b/packages/iris-grid/src/IrisGridTextCellRenderer.ts deleted file mode 100644 index e243b258e8..0000000000 --- a/packages/iris-grid/src/IrisGridTextCellRenderer.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { - BoxCoordinates, - Coordinate, - DEFAULT_FONT_WIDTH, - getOrThrow, - GridMetrics, - GridThemeType, - GridUtils, - TextCellRenderer, - VisibleIndex, -} from '@deephaven/grid'; -import { TableUtils } from '@deephaven/jsapi-utils'; -import { IrisGridRenderState } from './IrisGridRenderer'; -import { ICON_SIZE } from './IrisGridIcons'; -import IrisGridCellRendererUtils from './IrisGridCellRendererUtils'; - -class IrisGridTextCellRenderer extends TextCellRenderer { - drawCellContent( - context: CanvasRenderingContext2D, - state: IrisGridRenderState, - column: VisibleIndex, - row: VisibleIndex - ): void { - const { metrics, model } = state; - const { modelColumns, modelRows } = metrics; - const modelRow = getOrThrow(modelRows, row); - const modelColumn = modelColumns.get(column); - if (modelColumn === undefined) { - return; - } - const value = model.valueForCell(modelColumn, modelRow); - if (TableUtils.isTextType(model.columns[modelColumn]?.type)) { - if (value === null || value === '') { - const originalFont = context.font; - context.font = `italic ${originalFont}`; - super.drawCellContent(context, state, column, row); - context.font = originalFont; - return; - } - } - super.drawCellContent(context, state, column, row); - } - - // This will shrink the size the text may take when the overflow button is rendered - // The text will truncate to a smaller width and won't overlap the button - getTextRenderMetrics( - state: IrisGridRenderState, - column: VisibleIndex, - row: VisibleIndex - ): { - width: number; - x: Coordinate; - y: Coordinate; - } { - const textMetrics = GridUtils.getTextRenderMetrics(state, column, row); - - const { mouseX, mouseY, metrics, theme } = state; - - if (mouseX == null || mouseY == null) { - return textMetrics; - } - - const { column: mouseColumn, row: mouseRow } = GridUtils.getGridPointFromXY( - mouseX, - mouseY, - metrics - ); - - if (column === mouseColumn && row === mouseRow) { - const { left } = this.getCellOverflowButtonPosition( - mouseX, - mouseY, - metrics, - theme - ); - if (this.shouldRenderOverflowButton(state) && left != null) { - textMetrics.width = left - metrics.gridX - textMetrics.x; - } - } - return textMetrics; - } - - getCellOverflowButtonPosition( - mouseX: Coordinate | null, - mouseY: Coordinate | null, - metrics: GridMetrics | undefined, - theme: GridThemeType - ): { - left: Coordinate | null; - top: Coordinate | null; - width: number | null; - height: number | null; - } { - const NULL_POSITION = { left: null, top: null, width: null, height: null }; - if (mouseX == null || mouseY == null || metrics == null) { - return NULL_POSITION; - } - const { rowHeight, columnWidth, left, top } = GridUtils.getCellInfoFromXY( - mouseX, - mouseY, - metrics - ); - - if (left == null || columnWidth == null || top == null) { - return NULL_POSITION; - } - - const { width: gridWidth, verticalBarWidth } = metrics; - const { cellHorizontalPadding } = theme; - - const width = ICON_SIZE + 2 * cellHorizontalPadding; - const height = rowHeight; - // Right edge of column or of visible grid, whichever is smaller - const right = Math.min( - metrics.gridX + left + columnWidth, - gridWidth - verticalBarWidth - ); - const buttonLeft = right - width; - const buttonTop = metrics.gridY + top; - - return { left: buttonLeft, top: buttonTop, width, height }; - } - - shouldRenderOverflowButton(state: IrisGridRenderState): boolean { - const { context, mouseX, mouseY, metrics, model, theme } = state; - if (mouseX == null || mouseY == null) { - return false; - } - - const { row, column, modelRow, modelColumn } = GridUtils.getCellInfoFromXY( - mouseX, - mouseY, - metrics - ); - - if ( - row == null || - column == null || - modelRow == null || - modelColumn == null || - !TableUtils.isStringType(model.columns[modelColumn].type) - ) { - return false; - } - - const text = model.textForCell(modelColumn, modelRow) ?? ''; - const { width: textWidth } = GridUtils.getTextRenderMetrics( - state, - column, - row - ); - const fontWidth = metrics.fontWidths.get(theme.font) ?? DEFAULT_FONT_WIDTH; - - context.save(); - context.font = theme.font; - - const truncatedText = this.getCachedTruncatedString( - context, - text, - textWidth, - fontWidth, - model.truncationCharForCell(modelColumn, modelRow) - ); - context.restore(); - - return text !== '' && truncatedText !== text; - } - - drawTreeMarker( - context: CanvasRenderingContext2D, - state: IrisGridRenderState, - columnX: Coordinate, - rowY: Coordinate, - treeBox: BoxCoordinates, - color: string, - isExpanded: boolean - ): void { - IrisGridCellRendererUtils.drawTreeMarker( - context, - state, - columnX, - rowY, - treeBox, - color, - isExpanded - ); - } -} - -export default IrisGridTextCellRenderer; diff --git a/packages/iris-grid/src/IrisGridTheme.module.scss b/packages/iris-grid/src/IrisGridTheme.module.scss index 54781e9aea..06972a20f2 100644 --- a/packages/iris-grid/src/IrisGridTheme.module.scss +++ b/packages/iris-grid/src/IrisGridTheme.module.scss @@ -91,8 +91,4 @@ $header-height: 30px; overflow-button-color: $gray-300; overflow-button-hover-color: $gray-100; - - zero-line-color: $gray-500; - positive-bar-color: $green; - negative-bar-color: $red; } diff --git a/packages/iris-grid/src/IrisGridTheme.ts b/packages/iris-grid/src/IrisGridTheme.ts index 32f736da4d..5e6d3b8658 100644 --- a/packages/iris-grid/src/IrisGridTheme.ts +++ b/packages/iris-grid/src/IrisGridTheme.ts @@ -135,10 +135,6 @@ const theme: Partial = Object.freeze({ overflowButtonColor: IrisGridTheme['overflow-button-color'], overflowButtonHoverColor: IrisGridTheme['overflow-button-hover-color'], - - zeroLineColor: IrisGridTheme['zero-line-color'], - positiveBarColor: IrisGridTheme['positive-bar-color'], - negativeBarColor: IrisGridTheme['negative-bar-color'], }); export default theme; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts index 3c97c4538e..7e1a132a21 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts @@ -1,13 +1,11 @@ import { EventHandlerResult, - getOrThrow, Grid, GridMouseHandler, GridPoint, GridUtils, isLinkToken, TokenBox, - isTokenBoxCellRenderer, } from '@deephaven/grid'; import deepEqual from 'deep-equal'; import IrisGrid from '../IrisGrid'; @@ -30,24 +28,13 @@ class IrisGridTokenMouseHandler extends GridMouseHandler { isHoveringLink(gridPoint: GridPoint, grid: Grid): boolean { const { column, row, x, y } = gridPoint; - const { renderer, metrics, props } = grid; - const { model } = props; + const { renderer, metrics } = grid; if (column == null || row == null || metrics == null) { this.currentLinkBox = undefined; return false; } - const { modelRows, modelColumns } = metrics; - const modelRow = getOrThrow(modelRows, row); - const modelColumn = getOrThrow(modelColumns, column); - - const renderType = model.renderTypeForCell(modelColumn, modelRow); - const cellRenderer = renderer.getCellRenderer(renderType); - if (!isTokenBoxCellRenderer(cellRenderer)) { - return false; - } - if (this.currentLinkBox != null) { const { x1: left, y1: top, x2: right, y2: bottom } = this.currentLinkBox; if (x >= left && x <= right && y >= top && y <= bottom) { @@ -56,7 +43,7 @@ class IrisGridTokenMouseHandler extends GridMouseHandler { } const renderState = grid.updateRenderState(); - const tokensInCell = cellRenderer.getTokenBoxesForVisibleCell( + const tokensInCell = renderer.getTokenBoxesForVisibleCell( column, row, renderState From 3f12dd38a4db172697b3a7b39e6fbbd83d9f8519 Mon Sep 17 00:00:00 2001 From: Vlad Babich Date: Mon, 15 May 2023 13:49:58 -0600 Subject: [PATCH 03/10] feat: De-globalize JSAPI in Console package (#1292) - Remove global `dh` references in the Console package, update consumers. - Add `SET_API` reducer. BREAKING CHANGE: - Components `IrisGrid`, `Chart`, `ChartBuilder`, `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` prop removed. - `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. - Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require the JSAPI instance in the `dh` prop. - `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance passed in the first argument. - `SessionUtils`: static methods `createSessionWrapper`, `loadSessionWrapper` require JSAPI instance passed in the first argument. - Class `IrisGridModel` requires JSAPI instance passed in the constructor args. - Components `DashboardLayout`, `ObjectIcon` has to be wrapped in `ApiContext.Provider` passing the JSAPI instance. --- package-lock.json | 6 +- .../src/components/ConnectionBootstrap.tsx | 2 +- packages/chart/src/Chart.tsx | 8 +-- packages/chart/src/ChartModel.ts | 6 +- packages/chart/src/FigureChartModel.ts | 2 +- packages/chart/src/MockChartModel.js | 2 +- packages/code-studio/src/main/AppInit.tsx | 2 + .../src/main/AppMainContainer.test.tsx | 45 ++++++------ .../code-studio/src/main/AppMainContainer.tsx | 2 - .../code-studio/src/styleguide/Charts.tsx | 2 +- packages/code-studio/src/styleguide/Grids.tsx | 6 +- .../src/styleguide/MockIrisGridTreeModel.ts | 5 +- packages/console/package.json | 3 +- packages/console/src/Console.test.tsx | 1 + packages/console/src/Console.tsx | 17 +++-- packages/console/src/ConsoleMenu.tsx | 9 ++- .../console/src/ConsoleStatusBar.test.tsx | 1 + packages/console/src/ConsoleStatusBar.tsx | 15 ++-- packages/console/src/common/ConsoleUtils.ts | 17 ++--- packages/console/src/common/ObjectIcon.tsx | 3 +- packages/console/tsconfig.json | 26 +++---- .../src/ChartBuilderPlugin.tsx | 2 - .../src/ChartPlugin.tsx | 2 - .../dashboard-core-plugins/src/GridPlugin.tsx | 2 - .../src/panels/ChartPanel.test.tsx | 6 -- .../src/panels/ChartPanel.tsx | 47 +++++-------- .../src/panels/ConsolePanel.test.tsx | 2 +- .../src/panels/ConsolePanel.tsx | 3 +- .../src/panels/IrisGridPanel.test.tsx | 6 -- .../src/panels/IrisGridPanel.tsx | 22 ++---- packages/dashboard/package.json | 1 + packages/dashboard/src/Dashboard.test.tsx | 23 +++--- packages/dashboard/src/DashboardLayout.tsx | 35 +++++----- packages/dashboard/src/DashboardPlugin.ts | 2 + packages/dashboard/tsconfig.json | 40 +++-------- packages/embed-chart/src/App.tsx | 2 +- packages/embed-grid/src/App.tsx | 1 - .../iris-grid/src/AdvancedFilterCreator.tsx | 19 +---- packages/iris-grid/src/GotoRow.tsx | 6 +- packages/iris-grid/src/IrisGrid.test.tsx | 2 +- packages/iris-grid/src/IrisGrid.tsx | 70 ++++++++----------- packages/iris-grid/src/IrisGridModel.ts | 6 +- .../iris-grid/src/IrisGridModelUpdater.tsx | 7 +- packages/iris-grid/src/IrisGridProxyModel.ts | 3 +- packages/iris-grid/src/IrisGridTableModel.ts | 1 + .../src/IrisGridTableModelTemplate.ts | 2 +- .../src/sidebar/ChartBuilder.test.tsx | 7 +- .../iris-grid/src/sidebar/ChartBuilder.tsx | 31 ++++---- .../src/sidebar/TableCsvExporter.tsx | 5 +- packages/jsapi-utils/src/SessionUtils.ts | 6 +- packages/redux/src/reducers/api.ts | 7 ++ packages/redux/src/reducers/index.ts | 2 + 52 files changed, 253 insertions(+), 297 deletions(-) create mode 100644 packages/redux/src/reducers/api.ts diff --git a/package-lock.json b/package-lock.json index c844568879..82e8881673 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26122,7 +26122,7 @@ "@deephaven/chart": "file:../chart", "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", - "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/log": "file:../log", "@deephaven/storage": "file:../storage", "@deephaven/utils": "file:../utils", @@ -26140,6 +26140,7 @@ "shell-quote": "^1.7.2" }, "devDependencies": { + "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/mocks": "file:../mocks", "@deephaven/tsconfig": "file:../tsconfig" }, @@ -26158,6 +26159,7 @@ "dependencies": { "@deephaven/components": "file:../components", "@deephaven/golden-layout": "file:../golden-layout", + "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/redux": "file:../redux", @@ -28367,6 +28369,7 @@ "@deephaven/chart": "file:../chart", "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", + "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -28392,6 +28395,7 @@ "requires": { "@deephaven/components": "file:../components", "@deephaven/golden-layout": "file:../golden-layout", + "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", "@deephaven/react-hooks": "file:../react-hooks", diff --git a/packages/app-utils/src/components/ConnectionBootstrap.tsx b/packages/app-utils/src/components/ConnectionBootstrap.tsx index 1548ab6cd4..6d0aba6c08 100644 --- a/packages/app-utils/src/components/ConnectionBootstrap.tsx +++ b/packages/app-utils/src/components/ConnectionBootstrap.tsx @@ -1,7 +1,7 @@ import React, { createContext, useEffect, useState } from 'react'; import { LoadingOverlay } from '@deephaven/components'; import { useApi, useClient } from '@deephaven/jsapi-bootstrap'; -import { IdeConnection } from '@deephaven/jsapi-types'; +import type { IdeConnection } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; const log = Log.module('@deephaven/jsapi-components.ConnectionBootstrap'); diff --git a/packages/chart/src/Chart.tsx b/packages/chart/src/Chart.tsx index 7f8f0b2900..80cec7ef4e 100644 --- a/packages/chart/src/Chart.tsx +++ b/packages/chart/src/Chart.tsx @@ -7,7 +7,6 @@ import { dhWarningFilled, IconDefinition, } from '@deephaven/icons'; -import type { dh as DhType } from '@deephaven/jsapi-types'; import { Formatter, FormatterUtils, @@ -36,7 +35,6 @@ type FormatterSettings = ColumnFormatSettings & }; interface ChartProps { - dh: DhType; model: ChartModel; settings: FormatterSettings; isActive: boolean; @@ -507,16 +505,14 @@ export class Chart extends Component { } updateFormatter(): void { - const { dh } = this.props; + const { model } = this.props; const formatter = new Formatter( - dh, + model.dh, this.columnFormats, this.dateTimeFormatterOptions, this.decimalFormatOptions, this.integerFormatOptions ); - - const { model } = this.props; model.setFormatter(formatter); } diff --git a/packages/chart/src/ChartModel.ts b/packages/chart/src/ChartModel.ts index a53b30f4a1..11d0107e09 100644 --- a/packages/chart/src/ChartModel.ts +++ b/packages/chart/src/ChartModel.ts @@ -1,6 +1,7 @@ /* eslint class-methods-use-this: "off" */ /* eslint no-unused-vars: "off" */ +import type { dh as DhType } from '@deephaven/jsapi-types'; import { Formatter } from '@deephaven/jsapi-utils'; import { Layout, PlotData } from 'plotly.js'; import { FilterColumnMap, FilterMap } from './ChartUtils'; @@ -28,11 +29,14 @@ class ChartModel { static EVENT_LOADFINISHED = 'ChartModel.EVENT_LOADFINISHED'; - constructor() { + constructor(dh: DhType) { + this.dh = dh; this.listeners = []; this.isDownsamplingDisabled = false; } + dh: DhType; + listeners: ((event: ChartEvent) => void)[]; formatter?: Formatter; diff --git a/packages/chart/src/FigureChartModel.ts b/packages/chart/src/FigureChartModel.ts index 567bdcb481..ee1f677792 100644 --- a/packages/chart/src/FigureChartModel.ts +++ b/packages/chart/src/FigureChartModel.ts @@ -46,7 +46,7 @@ class FigureChartModel extends ChartModel { settings: Partial = {}, theme: typeof ChartTheme = ChartTheme ) { - super(); + super(dh); this.handleFigureUpdated = this.handleFigureUpdated.bind(this); this.handleFigureDisconnected = this.handleFigureDisconnected.bind(this); diff --git a/packages/chart/src/MockChartModel.js b/packages/chart/src/MockChartModel.js index df31eab427..26c2106900 100644 --- a/packages/chart/src/MockChartModel.js +++ b/packages/chart/src/MockChartModel.js @@ -167,7 +167,7 @@ class MockChartModel extends ChartModel { filterFields = [], } = {} ) { - super(); + super(dh); this.data = data; this.layout = layout; diff --git a/packages/code-studio/src/main/AppInit.tsx b/packages/code-studio/src/main/AppInit.tsx index e2a5661fa7..ca1f39b16e 100644 --- a/packages/code-studio/src/main/AppInit.tsx +++ b/packages/code-studio/src/main/AppInit.tsx @@ -126,6 +126,7 @@ function AppInit(props: AppInitProps) { try { const sessionDetails = await getSessionDetails(); const sessionWrapper = await loadSessionWrapper( + api, connection, sessionDetails ); @@ -279,6 +280,7 @@ AppInit.propTypes = { workspaceStorage: PropTypes.shape({ close: PropTypes.func }), setActiveTool: PropTypes.func.isRequired, + setApi: PropTypes.func.isRequired, setCommandHistoryStorage: PropTypes.func.isRequired, setDashboardData: PropTypes.func.isRequired, setFileStorage: PropTypes.func.isRequired, diff --git a/packages/code-studio/src/main/AppMainContainer.test.tsx b/packages/code-studio/src/main/AppMainContainer.test.tsx index 0589a59735..c74971fa55 100644 --- a/packages/code-studio/src/main/AppMainContainer.test.tsx +++ b/packages/code-studio/src/main/AppMainContainer.test.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { ToolType } from '@deephaven/dashboard-core-plugins'; +import { ApiContext } from '@deephaven/jsapi-bootstrap'; import dh from '@deephaven/jsapi-shim'; import type { IdeConnection, @@ -69,27 +70,29 @@ function renderAppMainContainer({ plugins = new Map(), } = {}) { return render( - + + + ); } let mockProp = {}; diff --git a/packages/code-studio/src/main/AppMainContainer.tsx b/packages/code-studio/src/main/AppMainContainer.tsx index 41a2f4a07e..55be158066 100644 --- a/packages/code-studio/src/main/AppMainContainer.tsx +++ b/packages/code-studio/src/main/AppMainContainer.tsx @@ -756,7 +756,6 @@ export class AppMainContainer extends Component< getDownloadWorker: DownloadServiceWorkerUtils.getServiceWorker, loadPlugin: this.handleLoadTablePlugin, localDashboardId: id, - makeApi: () => Promise.resolve(dh), makeModel: () => createGridModel(dh, connection, props.metadata, type), }; } @@ -766,7 +765,6 @@ export class AppMainContainer extends Component< return { ...props, localDashboardId: id, - makeApi: () => Promise.resolve(dh), makeModel: () => { const { metadata, panelState } = props; return createChartModel(dh, connection, metadata, panelState); diff --git a/packages/code-studio/src/styleguide/Charts.tsx b/packages/code-studio/src/styleguide/Charts.tsx index 1368702093..8e375b70b0 100644 --- a/packages/code-studio/src/styleguide/Charts.tsx +++ b/packages/code-studio/src/styleguide/Charts.tsx @@ -10,7 +10,7 @@ function Charts(): ReactElement {

Chart

- +
); diff --git a/packages/code-studio/src/styleguide/Grids.tsx b/packages/code-studio/src/styleguide/Grids.tsx index 6c857bddc5..a4a52f8687 100644 --- a/packages/code-studio/src/styleguide/Grids.tsx +++ b/packages/code-studio/src/styleguide/Grids.tsx @@ -15,13 +15,13 @@ import TreeExample from './grid-examples/TreeExample'; import AsyncExample from './grid-examples/AsyncExample'; function Grids(): ReactElement { + const dh = useApi(); const [irisGridModel] = useState( - new MockIrisGridTreeModel(new MockTreeGridModel()) + new MockIrisGridTreeModel(dh, new MockTreeGridModel()) ); const [model] = useState(new MockGridModel()); const [theme] = useState>({ autoSelectRow: true }); const [contextTheme] = useState>({ rowHeight: 40 }); - const dh = useApi(); return (
@@ -48,7 +48,7 @@ function Grids(): ReactElement {

Iris Grid

- +
diff --git a/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts b/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts index fef5e17b9a..89f16c0379 100644 --- a/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts +++ b/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts @@ -20,6 +20,7 @@ import { import type { Column, CustomColumn, + dh as DhType, ValueTypeUnion, } from '@deephaven/jsapi-types'; import { Formatter } from '@deephaven/jsapi-utils'; @@ -44,8 +45,8 @@ class MockIrisGridTreeModel protected editedData: string[][]; - constructor(model = new MockTreeGridModel()) { - super(); + constructor(dh: DhType, model = new MockTreeGridModel()) { + super(dh); this.model = model; this.editedData = []; diff --git a/packages/console/package.json b/packages/console/package.json index 0ac43a35d2..49c405b0ee 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -26,7 +26,7 @@ "@deephaven/chart": "file:../chart", "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", - "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/log": "file:../log", "@deephaven/storage": "file:../storage", "@deephaven/utils": "file:../utils", @@ -48,6 +48,7 @@ "react-dom": "^17.x" }, "devDependencies": { + "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/mocks": "file:../mocks", "@deephaven/tsconfig": "file:../tsconfig" }, diff --git a/packages/console/src/Console.test.tsx b/packages/console/src/Console.test.tsx index ba477fb1c7..838c1fbb94 100644 --- a/packages/console/src/Console.test.tsx +++ b/packages/console/src/Console.test.tsx @@ -37,6 +37,7 @@ function makeConsoleWrapper(consoleRef = React.createRef()) { const commandHistoryStorage = makeMockCommandHistoryStorage(); return render( undefined} diff --git a/packages/console/src/Console.tsx b/packages/console/src/Console.tsx index 8c1c505913..ae46609171 100644 --- a/packages/console/src/Console.tsx +++ b/packages/console/src/Console.tsx @@ -14,8 +14,8 @@ import classNames from 'classnames'; import memoize from 'memoize-one'; import throttle from 'lodash.throttle'; import type { JSZipObject } from 'jszip'; -import dh from '@deephaven/jsapi-shim'; import type { + dh as DhType, IdeSession, LogItem, VariableChanges, @@ -53,6 +53,7 @@ const DEFAULT_SETTINGS: Settings = { } as const; interface ConsoleProps { + dh: DhType; statusBarChildren: ReactNode; settings: Partial; focusCommandHistory: () => void; @@ -215,7 +216,7 @@ export class Console extends PureComponent { componentDidMount(): void { this.initConsoleLogging(); - const { session } = this.props; + const { dh, session } = this.props; session.addEventListener( dh.IdeSession.EVENT_COMMANDSTARTED, this.handleCommandStarted @@ -234,7 +235,7 @@ export class Console extends PureComponent { } componentWillUnmount(): void { - const { session } = this.props; + const { dh, session } = this.props; session.removeEventListener( dh.IdeSession.EVENT_COMMANDSTARTED, @@ -733,7 +734,13 @@ export class Console extends PureComponent { } handleOpenCsvTable(title: string): void { - const { openObject, commandHistoryStorage, language, scope } = this.props; + const { + dh, + openObject, + commandHistoryStorage, + language, + scope, + } = this.props; const { consoleHistory, objectMap } = this.state; const object = { name: title, title, type: dh.VariableType.TABLE }; const isExistingObject = objectMap.has(title); @@ -941,6 +948,7 @@ export class Console extends PureComponent { render(): ReactElement { const { actions, + dh, historyChildren, language, statusBarChildren, @@ -974,6 +982,7 @@ export class Console extends PureComponent { >
void; objects: VariableDefinition[]; overflowActions: () => DropdownAction[]; @@ -103,8 +104,9 @@ class ConsoleMenu extends PureComponent { filterText: string, openObject: (object: VariableDefinition) => void ): DropdownAction[] => { + const { dh } = this.props; const tables = objects.filter(object => - ConsoleUtils.isTableType(object.type) + ConsoleUtils.isTableType(dh, object.type) ); return ConsoleMenu.makeItemActions( tables, @@ -124,8 +126,9 @@ class ConsoleMenu extends PureComponent { filterText: string, openObject: (object: VariableDefinition) => void ): DropdownAction[] => { + const { dh } = this.props; const widgets = objects.filter(object => - ConsoleUtils.isWidgetType(object.type) + ConsoleUtils.isWidgetType(dh, object.type) ); return ConsoleMenu.makeItemActions( widgets, diff --git a/packages/console/src/ConsoleStatusBar.test.tsx b/packages/console/src/ConsoleStatusBar.test.tsx index aacaa0baff..c34da8263e 100644 --- a/packages/console/src/ConsoleStatusBar.test.tsx +++ b/packages/console/src/ConsoleStatusBar.test.tsx @@ -15,6 +15,7 @@ function makeConsoleStatusBarWrapper( const session = new (dh as any).IdeSession('test'); const wrapper = render( undefined} objects={[]} diff --git a/packages/console/src/ConsoleStatusBar.tsx b/packages/console/src/ConsoleStatusBar.tsx index ec5a3096dc..829f5512af 100644 --- a/packages/console/src/ConsoleStatusBar.tsx +++ b/packages/console/src/ConsoleStatusBar.tsx @@ -1,7 +1,10 @@ import React, { PureComponent, ReactElement, ReactNode } from 'react'; import classNames from 'classnames'; -import dh from '@deephaven/jsapi-shim'; -import type { IdeSession, VariableDefinition } from '@deephaven/jsapi-types'; +import type { + dh as DhType, + IdeSession, + VariableDefinition, +} from '@deephaven/jsapi-types'; import { DropdownAction, Tooltip } from '@deephaven/components'; import { CanceledPromiseError, Pending } from '@deephaven/utils'; import ConsoleMenu from './ConsoleMenu'; @@ -9,6 +12,7 @@ import './ConsoleStatusBar.scss'; interface ConsoleStatusBarProps { children: ReactNode; + dh: DhType; session: IdeSession; openObject: (object: VariableDefinition) => void; objects: VariableDefinition[]; @@ -54,7 +58,7 @@ export class ConsoleStatusBar extends PureComponent< pending: Pending; startListening(): void { - const { session } = this.props; + const { dh, session } = this.props; session.addEventListener( dh.IdeSession.EVENT_COMMANDSTARTED, this.handleCommandStarted @@ -62,7 +66,7 @@ export class ConsoleStatusBar extends PureComponent< } stopListening(): void { - const { session } = this.props; + const { dh, session } = this.props; session.removeEventListener( dh.IdeSession.EVENT_COMMANDSTARTED, this.handleCommandStarted @@ -96,7 +100,7 @@ export class ConsoleStatusBar extends PureComponent< } render(): ReactElement { - const { children, openObject, overflowActions, objects } = this.props; + const { children, dh, openObject, overflowActions, objects } = this.props; const { isDisconnected, isCommandRunning } = this.state; let statusIconClass = null; @@ -123,6 +127,7 @@ export class ConsoleStatusBar extends PureComponent<
{children} { const { settings } = metadata; - const makeApi = () => Promise.resolve(dh); const makeModel = () => ChartModelFactory.makeModelFromSettings(dh, settings, table); const title = ChartUtils.titleFromSettings(settings); @@ -58,7 +57,6 @@ export function ChartBuilderPlugin( localDashboardId: id, id: panelId, metadata, - makeApi, makeModel, }, title, diff --git a/packages/dashboard-core-plugins/src/ChartPlugin.tsx b/packages/dashboard-core-plugins/src/ChartPlugin.tsx index 4d6ed18a09..8c35768e0f 100644 --- a/packages/dashboard-core-plugins/src/ChartPlugin.tsx +++ b/packages/dashboard-core-plugins/src/ChartPlugin.tsx @@ -41,7 +41,6 @@ export function ChartPlugin(props: ChartPluginProps): JSX.Element | null { } const metadata = { name, figure: name }; - const makeApi = () => Promise.resolve(dh); const makeModel = () => fetch().then((figure: Figure) => ChartModelFactory.makeModel(dh, undefined, figure) @@ -53,7 +52,6 @@ export function ChartPlugin(props: ChartPluginProps): JSX.Element | null { localDashboardId: id, id: panelId, metadata, - makeApi, makeModel, }, title: name, diff --git a/packages/dashboard-core-plugins/src/GridPlugin.tsx b/packages/dashboard-core-plugins/src/GridPlugin.tsx index ae9606d2fc..17e4eda5ed 100644 --- a/packages/dashboard-core-plugins/src/GridPlugin.tsx +++ b/packages/dashboard-core-plugins/src/GridPlugin.tsx @@ -57,7 +57,6 @@ export function GridPlugin(props: GridPluginProps): JSX.Element | null { return; } const metadata = { name, table: name, type: widget.type }; - const makeApi = () => Promise.resolve(dh); const makeModel = () => fetch().then((table: Table) => IrisGridModelFactory.makeModel(dh, table) @@ -71,7 +70,6 @@ export function GridPlugin(props: GridPluginProps): JSX.Element | null { localDashboardId: id, id: panelId, metadata, - makeApi, makeModel, theme, }, diff --git a/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx b/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx index 6e05b40566..634c9834e0 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx @@ -66,7 +66,6 @@ function makeChartPanelWrapper({ glContainer = makeGlComponent(), glEventHub = makeGlComponent(), columnSelectionValidator = undefined, - makeApi = () => Promise.resolve(dh), makeModel = () => Promise.resolve(makeChartModel()), metadata = { figure: 'testFigure' }, inputFilters = [], @@ -80,7 +79,6 @@ function makeChartPanelWrapper({ } = {}) { return ( { const model = makeChartModel(); const modelPromise = Promise.resolve(model); const makeModel = () => modelPromise; - const apiPromise = Promise.resolve(dh); - const makeApi = () => apiPromise; const { rerender } = render( makeChartPanelWrapper({ - makeApi, makeModel, metadata: { settings: { isLinked: true } }, source: null, @@ -509,7 +504,6 @@ it('adds listeners to the source table when passed in and linked', async () => { const source = makeTable(); rerender( makeChartPanelWrapper({ - makeApi, makeModel, metadata: { settings: { isLinked: true } }, source, diff --git a/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx b/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx index eaf6455120..2c0ef9b90a 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx @@ -28,7 +28,6 @@ import { LegacyDehydratedSort, } from '@deephaven/iris-grid'; import type { - dh as DhType, FigureDescriptor, SeriesPlotStyle, TableTemplate, @@ -125,7 +124,6 @@ export interface GLChartPanelState { figure?: string; } export interface ChartPanelProps { - makeApi: () => Promise; glContainer: Container; glEventHub: EventEmitter; metadata: ChartPanelMetadata; @@ -149,7 +147,6 @@ export interface ChartPanelProps { } interface ChartPanelState { - dh: DhType | undefined; settings: Partial; error?: unknown; isActive: boolean; @@ -236,7 +233,6 @@ export class ChartPanel extends Component { const { filterValueMap = [], settings = {} } = panelState ?? {}; this.state = { - dh: undefined, settings, error: undefined, isActive: false, @@ -329,9 +325,9 @@ export class ChartPanel extends Component { componentWillUnmount(): void { this.pending.cancel(); - const { dh } = this.state; + const { model } = this.state; const { source } = this.props; - if (dh != null && source) { + if (model != null && source) { this.stopListeningToSource(source); } } @@ -345,17 +341,12 @@ export class ChartPanel extends Component { initModel(): void { this.setState({ isLoading: true, isLoaded: false, error: undefined }); - const { makeApi, makeModel } = this.props; + const { makeModel } = this.props; + this.pending - .add(makeApi()) - .then(dh => { - this.setState({ dh }); + .add(makeModel(), resolved => { + resolved.close(); }) - .then(() => - this.pending.add(makeModel(), resolved => { - resolved.close(); - }) - ) .then(this.handleLoadSuccess, this.handleLoadError); } @@ -464,11 +455,9 @@ export class ChartPanel extends Component { startListeningToSource(table: TableTemplate): void { log.debug('startListeningToSource', table); - const { dh } = this.state; - if (dh == null) { - log.error('API is not defined'); - return; - } + const { model } = this.state; + assertNotNull(model); + const { dh } = model; table.addEventListener( dh.Table.EVENT_CUSTOMCOLUMNSCHANGED, this.handleSourceColumnChange @@ -485,11 +474,9 @@ export class ChartPanel extends Component { stopListeningToSource(table: TableTemplate): void { log.debug('stopListeningToSource', table); - const { dh } = this.state; - if (dh == null) { - log.error('API is not defined'); - return; - } + const { model } = this.state; + assertNotNull(model); + const { dh } = model; table.removeEventListener( dh.Table.EVENT_CUSTOMCOLUMNSCHANGED, this.handleSourceColumnChange @@ -625,12 +612,12 @@ export class ChartPanel extends Component { updateModelFromSource(): void { const { metadata, source } = this.props; - const { dh, isLinked, model } = this.state; - if (!dh || !isLinked || !model || !source) { + const { isLinked, model } = this.state; + if (!isLinked || !model || !source) { log.debug2('updateModelFromSource ignoring', isLinked, model, source); return; } - + const { dh } = model; // By now the model has already been loaded, which is the only other cancelable thing in pending this.pending.cancel(); if (isChartPanelTableMetadata(metadata)) { @@ -1056,7 +1043,6 @@ export class ChartPanel extends Component { } = this.props; const { columnMap, - dh, filterMap, error, model, @@ -1124,9 +1110,8 @@ export class ChartPanel extends Component { className="chart-panel-container h-100 w-100" >
- {isLoaded && model && dh && ( + {isLoaded && model && ( {session != null && ( dh; -} - function makeIrisGridPanelWrapper( makeModel = makeMakeModel(), - makeApi = makeMakeApi(), metadata = { table: 'table' }, glContainer = makeGlComponent(), glEventHub = makeGlComponent(), @@ -69,7 +64,6 @@ function makeIrisGridPanelWrapper( ) { return render( DhType | Promise; makeModel: () => IrisGridModel | Promise; inputFilters: InputFilter[]; links: Link[]; @@ -249,7 +247,6 @@ export class IrisGridPanel extends PureComponent< const { panelState } = props; this.pluginState = null; - this.dh = null; this.irisGridUtils = null; this.state = { @@ -345,8 +342,6 @@ export class IrisGridPanel extends PureComponent< pluginState: unknown; - private dh: DhType | null; - private irisGridUtils: IrisGridUtils | null; getTableName(): string { @@ -529,17 +524,12 @@ export class IrisGridPanel extends PureComponent< initModel(): void { this.setState({ isModelReady: false, isLoading: true, error: null }); - const { makeApi, makeModel } = this.props; + const { makeModel } = this.props; if (this.modelPromise != null) { this.modelPromise.cancel(); } - this.modelPromise = PromiseUtils.makeCancelable( - Promise.resolve(makeApi()).then(dh => { - this.dh = dh; - this.irisGridUtils = new IrisGridUtils(dh); - return makeModel(); - }), - resolved => resolved.close() + this.modelPromise = PromiseUtils.makeCancelable(makeModel(), resolved => + resolved.close() ); this.modelPromise.then(this.handleLoadSuccess).catch(this.handleLoadError); } @@ -548,7 +538,7 @@ export class IrisGridPanel extends PureComponent< const model = modelParam; const { panelState, irisGridStateOverrides } = this.state; const modelQueue: ((m: IrisGridModel) => void)[] = []; - + this.irisGridUtils = new IrisGridUtils(model.dh); if (panelState != null) { const { irisGridState } = panelState; const { @@ -1205,7 +1195,6 @@ export class IrisGridPanel extends PureComponent< } render(): ReactElement { - const { dh } = this; const { children, glContainer, @@ -1298,7 +1287,7 @@ export class IrisGridPanel extends PureComponent< /> )} > - {isModelReady && model && dh && ( + {isModelReady && model && ( - {children} - + + + {children} + + ); } diff --git a/packages/dashboard/src/DashboardLayout.tsx b/packages/dashboard/src/DashboardLayout.tsx index 6cb1939cff..a9a240ef5e 100644 --- a/packages/dashboard/src/DashboardLayout.tsx +++ b/packages/dashboard/src/DashboardLayout.tsx @@ -9,10 +9,10 @@ import PropTypes from 'prop-types'; import GoldenLayout from '@deephaven/golden-layout'; import type { Container, - EventEmitter, ItemConfigType, ReactComponentConfig, } from '@deephaven/golden-layout'; +import { ApiContext, useApi } from '@deephaven/jsapi-bootstrap'; import Log from '@deephaven/log'; import { usePrevious } from '@deephaven/react-hooks'; import { RootState } from '@deephaven/redux'; @@ -31,6 +31,7 @@ import { PanelComponentType, PanelDehydrateFunction, PanelHydrateFunction, + PanelProps, } from './DashboardPlugin'; export type DashboardLayoutConfig = ItemConfigType[]; @@ -79,6 +80,7 @@ export function DashboardLayout({ hydrate = hydrateDefault, dehydrate = dehydrateDefault, }: DashboardLayoutProps): JSX.Element { + const defaultDh = useApi(); const dispatch = useDispatch(); const data = useSelector(state => getDashboardData(state, id)) ?? @@ -110,10 +112,7 @@ export function DashboardLayout({ componentDehydrate ); - function renderComponent( - props: { glContainer: Container; glEventHub: EventEmitter }, - ref: unknown - ) { + function renderComponent(props: PanelProps, ref: unknown) { // Cast it to an `any` type so we can pass the ref in correctly. // ComponentType doesn't seem to work right, ReactNode is also incorrect // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -121,17 +120,21 @@ export function DashboardLayout({ // Props supplied by GoldenLayout // eslint-disable-next-line react/prop-types - const { glContainer, glEventHub } = props; + const { dh, glContainer, glEventHub } = props; return ( - - - {/* eslint-disable-next-line react/jsx-props-no-spreading */} - - - + // Enterprise should be able to override the JSAPI + // for each panel via the props + + + + {/* eslint-disable-next-line react/jsx-props-no-spreading */} + + + + ); } @@ -141,7 +144,7 @@ export function DashboardLayout({ dehydrateMap.set(name, componentDehydrate); return cleanup; }, - [hydrate, dehydrate, hydrateMap, dehydrateMap, layout, store] + [defaultDh, hydrate, dehydrate, hydrateMap, dehydrateMap, layout, store] ); const hydrateComponent = useCallback( (name, props) => (hydrateMap.get(name) ?? FALLBACK_CALLBACK)(props, id), diff --git a/packages/dashboard/src/DashboardPlugin.ts b/packages/dashboard/src/DashboardPlugin.ts index 1ac05213c0..283b32eb9c 100644 --- a/packages/dashboard/src/DashboardPlugin.ts +++ b/packages/dashboard/src/DashboardPlugin.ts @@ -12,6 +12,7 @@ import type { EventEmitter, Container, } from '@deephaven/golden-layout'; +import type { dh as DhType } from '@deephaven/jsapi-types'; import PanelManager from './PanelManager'; /** @@ -65,6 +66,7 @@ export function isWrappedComponent< } export type PanelProps = { + dh?: DhType; glContainer: Container; glEventHub: EventEmitter; }; diff --git a/packages/dashboard/tsconfig.json b/packages/dashboard/tsconfig.json index c0de4920cd..8aae239da7 100644 --- a/packages/dashboard/tsconfig.json +++ b/packages/dashboard/tsconfig.json @@ -4,35 +4,15 @@ "rootDir": "src/", "outDir": "dist/" }, - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - "src/**/*.js", - "src/**/*.jsx" - ], - "exclude": [ - "node_modules", - "src/**/*.test.*", - "src/**/__mocks__/*" - ], + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], + "exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"], "references": [ - { - "path": "../components" - }, - { - "path": "../golden-layout" - }, - { - "path": "../log" - }, - { - "path": "../react-hooks" - }, - { - "path": "../redux" - }, - { - "path": "../utils" - } + { "path": "../components" }, + { "path": "../golden-layout" }, + { "path": "../jsapi-bootstrap" }, + { "path": "../log" }, + { "path": "../react-hooks" }, + { "path": "../redux" }, + { "path": "../utils" } ] -} \ No newline at end of file +} diff --git a/packages/embed-chart/src/App.tsx b/packages/embed-chart/src/App.tsx index ca045e530e..2bf8e5e484 100644 --- a/packages/embed-chart/src/App.tsx +++ b/packages/embed-chart/src/App.tsx @@ -85,7 +85,7 @@ function App(): JSX.Element { return (
- {isLoaded && } + {isLoaded && } {!isLoaded && ( void; interface AdvancedFilterCreatorProps { - dh: DhType; model: IrisGridModel; column: Column; onFilterChange: ( @@ -452,14 +446,7 @@ class AdvancedFilterCreator extends PureComponent< } render(): JSX.Element { - const { - column, - dh, - model, - sortDirection, - formatter, - tableUtils, - } = this.props; + const { column, model, sortDirection, formatter, tableUtils } = this.props; const { filterItems, filterOperators, @@ -468,7 +455,7 @@ class AdvancedFilterCreator extends PureComponent< valuesTable, valuesTableError, } = this.state; - const { isValuesTableAvailable } = model; + const { dh, isValuesTableAvailable } = model; const isBoolean = TableUtils.isBooleanType(column.type); const isDateType = TableUtils.isDateType(column.type); const filterTypes = this.getFilterTypes(column.type); diff --git a/packages/iris-grid/src/GotoRow.tsx b/packages/iris-grid/src/GotoRow.tsx index 4bb94d6cd1..9651c45362 100644 --- a/packages/iris-grid/src/GotoRow.tsx +++ b/packages/iris-grid/src/GotoRow.tsx @@ -8,7 +8,7 @@ import React, { useRef, useState, } from 'react'; -import type { dh as DhType, Column } from '@deephaven/jsapi-types'; +import type { Column } from '@deephaven/jsapi-types'; import { Type as FilterType, TypeValue as FilterTypeValue, @@ -31,7 +31,6 @@ function isIrisGridProxyModel( const DEFAULT_FORMAT_STRING = '###,##0'; interface GotoRowProps { - dh: DhType; gotoRow: string; gotoRowError: string; gotoValueError: string; @@ -55,7 +54,6 @@ interface GotoRowProps { } function GotoRow({ - dh, gotoRow, gotoRowError, gotoValueError, @@ -88,7 +86,7 @@ function GotoRow({ const res = 'Row number'; - const { rowCount } = model; + const { dh, rowCount } = model; const handleGotoValueNumberKeyDown = (e: KeyboardEvent) => { if (e.key === 'Enter') { diff --git a/packages/iris-grid/src/IrisGrid.test.tsx b/packages/iris-grid/src/IrisGrid.test.tsx index feca64b103..bf4844ec47 100644 --- a/packages/iris-grid/src/IrisGrid.test.tsx +++ b/packages/iris-grid/src/IrisGrid.test.tsx @@ -59,7 +59,7 @@ function makeComponent( settings = DEFAULT_SETTINGS ) { const testRenderer = TestRenderer.create( - , + , { createNodeMock, } diff --git a/packages/iris-grid/src/IrisGrid.tsx b/packages/iris-grid/src/IrisGrid.tsx index 90c4cf6e17..2da946fde8 100644 --- a/packages/iris-grid/src/IrisGrid.tsx +++ b/packages/iris-grid/src/IrisGrid.tsx @@ -252,7 +252,6 @@ export type FilterMap = Map< >; export interface IrisGridProps { children: React.ReactNode; - dh: DhType; advancedFilters: ReadonlyAdvancedFilterMap; advancedSettings: Map; alwaysFetchColumns: readonly ColumnName[]; @@ -677,7 +676,6 @@ export class IrisGrid extends Component { ]; const { - dh, aggregationSettings, conditionalFormats, customColumnFormatMap, @@ -711,6 +709,7 @@ export class IrisGrid extends Component { if (canCopy) { keyHandlers.push(new CopyKeyHandler(this)); } + const { dh } = model; const mouseHandlers = [ new IrisGridCellOverflowMouseHandler(this), new IrisGridRowTreeMouseHandler(this), @@ -1032,23 +1031,19 @@ export class IrisGrid extends Component { advancedFilterOptions: AdvancedFilterOptions | undefined, sortDirection: SortDirection | undefined, formatter: Formatter - ) => { - const { dh } = this.props; - return ( - - ); - }, + ) => ( + + ), { max: 50 } ); @@ -1367,7 +1362,8 @@ export class IrisGrid extends Component { rowIndex: GridRangeIndex, rawValue = false ): string | unknown { - const { dh, model } = this.props; + const { model } = this.props; + const { dh } = model; const modelColumn = this.getModelColumn(columnIndex); const modelRow = this.getModelRow(rowIndex); if (rawValue && modelColumn != null && modelRow != null) { @@ -1826,7 +1822,7 @@ export class IrisGrid extends Component { forceUpdate = true ): void { const { customColumnFormatMap } = this.state; - const { dh } = this.props; + const { model } = this.props; const update = { customColumnFormatMap, ...updatedFormats, @@ -1836,7 +1832,7 @@ export class IrisGrid extends Component { ...update.customColumnFormatMap.values(), ]; const formatter = new Formatter( - dh, + model.dh, mergedColumnFormats, this.dateTimeFormatterOptions, this.decimalFormatOptions, @@ -1861,7 +1857,6 @@ export class IrisGrid extends Component { initState(): void { const { applyInputFiltersOnInit, - dh, inputFilters, sorts, model, @@ -1874,7 +1869,7 @@ export class IrisGrid extends Component { const searchColumns = selectedSearchColumns ?? []; const searchFilter = CrossColumnSearch.createSearchFilter( - dh, + model.dh, searchValue, searchColumns, model.columns, @@ -1937,10 +1932,10 @@ export class IrisGrid extends Component { } updatePartition(partition: string, partitionColumn: Column): void { - const { dh } = this.props; + const { model } = this.props; const partitionFilter = partitionColumn .filter() - .eq(dh.FilterValue.ofString(partition)); + .eq(model.dh.FilterValue.ofString(partition)); const partitionFilters = [partitionFilter]; this.setState({ partition, @@ -2314,9 +2309,9 @@ export class IrisGrid extends Component { columns: readonly Column[], invertSearchColumns: boolean ): void => { - const { dh } = this.props; + const { model } = this.props; const searchFilter = CrossColumnSearch.createSearchFilter( - dh, + model.dh, searchValue, selectedSearchColumns, columns, @@ -2485,7 +2480,8 @@ export class IrisGrid extends Component { } isTableSearchAvailable(): boolean { - const { dh, model, canToggleSearch } = this.props; + const { model, canToggleSearch } = this.props; + const { dh } = model; const searchDisplayMode = model?.layoutHints?.searchDisplayMode; if (searchDisplayMode === dh.SearchDisplayMode?.SEARCH_DISPLAY_HIDE) { @@ -3316,7 +3312,8 @@ export class IrisGrid extends Component { gotoValueSelectedColumnName: selectedColumnName, gotoValueSelectedFilter, } = this.state; - const { dh, model } = this.props; + const { model } = this.props; + const { dh } = model; if (!model.isSeekRowAvailable) { return; } @@ -3861,7 +3858,6 @@ export class IrisGrid extends Component { render(): ReactElement | null { const { - dh, children, customFilters, getDownloadWorker, @@ -4288,7 +4284,6 @@ export class IrisGrid extends Component { return ( { assertNotNull(this.handleConditionalFormatEditorUpdate); return ( { case OptionType.TABLE_EXPORTER: return ( {
{partitionTable && partitionColumn && partition != null && ( { /> {isVisible && ( { this.grid?.state.draggingColumn?.range )} formatColumns={this.getCachedPreviewFormatColumns( - dh, + model.dh, model.columns, conditionalFormats, conditionalFormatPreview, @@ -4575,7 +4568,6 @@ export class IrisGrid extends Component { this.getLinkHoverTooltip(linkHoverTooltipProps)}
{ onExited={this.handleAnimationEnd} /> { this.tableSaver = tableSaver; }} diff --git a/packages/iris-grid/src/IrisGridModel.ts b/packages/iris-grid/src/IrisGridModel.ts index 4c7930d226..586e8342e9 100644 --- a/packages/iris-grid/src/IrisGridModel.ts +++ b/packages/iris-grid/src/IrisGridModel.ts @@ -11,6 +11,7 @@ import type { Column, ColumnStatistics, CustomColumn, + dh as DhType, FilterCondition, Format, LayoutHints, @@ -65,12 +66,15 @@ abstract class IrisGridModel< PENDING_DATA_UPDATED: 'PENDING_DATA_UPDATED', } as const); - constructor() { + constructor(dh: DhType) { super(); + this.dh = dh; this.listenerCount = 0; } + dh: DhType; + listenerCount: number; // Pulled directly from event-target-shim implementation signature diff --git a/packages/iris-grid/src/IrisGridModelUpdater.tsx b/packages/iris-grid/src/IrisGridModelUpdater.tsx index 0a73101ff8..96b36473f8 100644 --- a/packages/iris-grid/src/IrisGridModelUpdater.tsx +++ b/packages/iris-grid/src/IrisGridModelUpdater.tsx @@ -4,7 +4,6 @@ import React, { useEffect, useMemo } from 'react'; import type { Column, CustomColumn, - dh as DhType, FilterCondition, RollupConfig, Sort, @@ -20,7 +19,6 @@ import type ColumnHeaderGroup from './ColumnHeaderGroup'; const COLUMN_BUFFER_PAGES = 1; interface IrisGridModelUpdaterProps { - dh: DhType; model: IrisGridModel; modelColumns: readonly Column[]; top: number; @@ -50,7 +48,6 @@ interface IrisGridModelUpdaterProps { */ const IrisGridModelUpdater = React.memo( ({ - dh, model, modelColumns, top, @@ -105,11 +102,11 @@ const IrisGridModelUpdater = React.memo( function updateSorts() { const sortsForModel = [...sorts]; if (reverseType !== TableUtils.REVERSE_TYPE.NONE) { - sortsForModel.push(dh.Table.reverse()); + sortsForModel.push(model.dh.Table.reverse()); } model.sort = sortsForModel; }, - [dh, model, sorts, reverseType] + [model, sorts, reverseType] ); useEffect( function updateFormatter() { diff --git a/packages/iris-grid/src/IrisGridProxyModel.ts b/packages/iris-grid/src/IrisGridProxyModel.ts index dab6750756..ff2cfe64a3 100644 --- a/packages/iris-grid/src/IrisGridProxyModel.ts +++ b/packages/iris-grid/src/IrisGridProxyModel.ts @@ -61,6 +61,7 @@ function makeModel( */ class IrisGridProxyModel extends IrisGridModel { /** + * @param dh JSAPI instance * @param table Iris data table to be used in the model * @param formatter The formatter to use when getting formats * @param inputTable Iris input table associated with this table @@ -84,7 +85,7 @@ class IrisGridProxyModel extends IrisGridModel { formatter = new Formatter(dh), inputTable: InputTable | null = null ) { - super(); + super(dh); this.handleModelEvent = this.handleModelEvent.bind(this); diff --git a/packages/iris-grid/src/IrisGridTableModel.ts b/packages/iris-grid/src/IrisGridTableModel.ts index 6c4f523c73..96e275ebfd 100644 --- a/packages/iris-grid/src/IrisGridTableModel.ts +++ b/packages/iris-grid/src/IrisGridTableModel.ts @@ -36,6 +36,7 @@ class IrisGridTableModel extends IrisGridTableModelTemplate { formatColumnList: CustomColumn[]; /** + * @param dh JSAPI instance * @param table Iris data table to be used in the model * @param formatter The formatter to use when getting formats * @param inputTable Iris input table associated with this table diff --git a/packages/iris-grid/src/IrisGridTableModelTemplate.ts b/packages/iris-grid/src/IrisGridTableModelTemplate.ts index 35375708b4..ddf39cc6f9 100644 --- a/packages/iris-grid/src/IrisGridTableModelTemplate.ts +++ b/packages/iris-grid/src/IrisGridTableModelTemplate.ts @@ -206,7 +206,7 @@ class IrisGridTableModelTemplate< formatter = new Formatter(dh), inputTable: InputTable | null = null ) { - super(); + super(dh); this.handleTableDisconnect = this.handleTableDisconnect.bind(this); this.handleTableReconnect = this.handleTableReconnect.bind(this); diff --git a/packages/iris-grid/src/sidebar/ChartBuilder.test.tsx b/packages/iris-grid/src/sidebar/ChartBuilder.test.tsx index afe7acc643..a3c12bf587 100644 --- a/packages/iris-grid/src/sidebar/ChartBuilder.test.tsx +++ b/packages/iris-grid/src/sidebar/ChartBuilder.test.tsx @@ -19,12 +19,7 @@ function makeChartBuilderWrapper({ ), } = {}) { return render( - + ); } diff --git a/packages/iris-grid/src/sidebar/ChartBuilder.tsx b/packages/iris-grid/src/sidebar/ChartBuilder.tsx index 113d3b08ed..3e5d13d77b 100644 --- a/packages/iris-grid/src/sidebar/ChartBuilder.tsx +++ b/packages/iris-grid/src/sidebar/ChartBuilder.tsx @@ -41,7 +41,6 @@ export type SeriesItem = { }; interface ChartBuilderProps { - dh: DhType; model: IrisGridModel; onSubmit: (obj: ChartBuilderSettings) => void; onChange: (obj: ChartBuilderSettings) => void; @@ -116,8 +115,8 @@ class ChartBuilder extends PureComponent { this.handleXAxisChange = this.handleXAxisChange.bind(this); this.sendChange = this.sendChange.bind(this); - const { dh, model } = props; - const { columns } = model; + const { model } = props; + const { columns, dh } = model; const type = this.getTypes()[0]; const xAxis = ChartBuilder.getDefaultXAxis(type, columns) as string; @@ -139,7 +138,8 @@ class ChartBuilder extends PureComponent { } getTypes() { - const { dh } = this.props; + const { model } = this.props; + const { dh } = model; return [ dh.plot.SeriesPlotStyle.LINE, dh.plot.SeriesPlotStyle.BAR, @@ -155,7 +155,8 @@ class ChartBuilder extends PureComponent { * Just replaces underscores with spaces and capitals the first letter of each word. */ getTypeName(type: SeriesPlotStyle): string | SeriesPlotStyle { - const { dh } = this.props; + const { model } = this.props; + const { dh } = model; switch (type) { case dh.plot.SeriesPlotStyle.LINE: return 'Line'; @@ -173,7 +174,8 @@ class ChartBuilder extends PureComponent { } getTypeIcon(type: SeriesPlotStyle): React.ReactElement | null { - const { dh } = this.props; + const { model } = this.props; + const { dh } = model; switch (type) { case dh.plot.SeriesPlotStyle.LINE: return ; @@ -191,7 +193,8 @@ class ChartBuilder extends PureComponent { } getXAxisLabel(type: SeriesPlotStyle): string { - const { dh } = this.props; + const { model } = this.props; + const { dh } = model; switch (type) { case dh.plot.SeriesPlotStyle.PIE: return 'Labels'; @@ -203,7 +206,8 @@ class ChartBuilder extends PureComponent { } getSeriesLabel(type: SeriesPlotStyle): string { - const { dh } = this.props; + const { model } = this.props; + const { dh } = model; switch (type) { case dh.plot.SeriesPlotStyle.PIE: return 'Values'; @@ -233,8 +237,8 @@ class ChartBuilder extends PureComponent { } handleReset(): void { - const { dh, model } = this.props; - const { columns } = model; + const { model } = this.props; + const { columns, dh } = model; const type = this.getTypes()[0]; const xAxis = ChartBuilder.getDefaultXAxis(type, columns) as string; @@ -298,7 +302,8 @@ class ChartBuilder extends PureComponent { log.debug2('handleTypeSelect', type); this.setState(state => { - const { dh, model } = this.props; + const { model } = this.props; + const { dh } = model; const maxSeriesCount = ChartBuilder.getMaxSeriesCount(dh, type); let { seriesItems } = state; seriesItems = seriesItems.slice(0, maxSeriesCount); @@ -327,8 +332,8 @@ class ChartBuilder extends PureComponent { } render(): JSX.Element { - const { dh, model } = this.props; - const { columns } = model; + const { model } = this.props; + const { columns, dh } = model; const { seriesItems, type, xAxis, isLinked } = this.state; const maxSeriesCount = ChartBuilder.getMaxSeriesCount(dh, type); const xAxisLabel = this.getXAxisLabel(type); diff --git a/packages/iris-grid/src/sidebar/TableCsvExporter.tsx b/packages/iris-grid/src/sidebar/TableCsvExporter.tsx index de085342b8..37a66d30ee 100644 --- a/packages/iris-grid/src/sidebar/TableCsvExporter.tsx +++ b/packages/iris-grid/src/sidebar/TableCsvExporter.tsx @@ -29,7 +29,6 @@ import IrisGridUtils from '../IrisGridUtils'; const log = Log.module('TableCsvExporter'); interface TableCsvExporterProps { - dh: DhType; model: IrisGridModel; name: string; userColumnWidths: ModelSizeMap; @@ -131,9 +130,9 @@ class TableCsvExporter extends Component< this ); - const { dh, name } = props; + const { model, name } = props; this.state = { - fileName: `${name}-${TableCsvExporter.getDateString(dh)}.csv`, + fileName: `${name}-${TableCsvExporter.getDateString(model.dh)}.csv`, downloadRowOption: TableCsvExporter.DOWNLOAD_ROW_OPTIONS.ALL_ROWS, customizedDownloadRowOption: diff --git a/packages/jsapi-utils/src/SessionUtils.ts b/packages/jsapi-utils/src/SessionUtils.ts index f77d807737..264dc5cf87 100644 --- a/packages/jsapi-utils/src/SessionUtils.ts +++ b/packages/jsapi-utils/src/SessionUtils.ts @@ -30,6 +30,7 @@ export interface SessionWrapper { connection: IdeConnection; config: SessionConfig; details?: SessionDetails; + dh: DhType; } /** @@ -49,6 +50,7 @@ export function createConnection( * @returns A session and config that is ready to use */ export async function createSessionWrapper( + dh: DhType, connection: IdeConnection, details: SessionDetails ): Promise { @@ -77,6 +79,7 @@ export async function createSessionWrapper( config, connection, details, + dh, }; } @@ -112,12 +115,13 @@ export async function getSessionDetails(): Promise { } export async function loadSessionWrapper( + dh: DhType, connection: IdeConnection, sessionDetails: SessionDetails ): Promise { let sessionWrapper: SessionWrapper | undefined; try { - sessionWrapper = await createSessionWrapper(connection, sessionDetails); + sessionWrapper = await createSessionWrapper(dh, connection, sessionDetails); } catch (e) { // Consoles may be disabled on the server, but we should still be able to start up and open existing objects if (!isNoConsolesError(e)) { diff --git a/packages/redux/src/reducers/api.ts b/packages/redux/src/reducers/api.ts new file mode 100644 index 0000000000..9f42983ad5 --- /dev/null +++ b/packages/redux/src/reducers/api.ts @@ -0,0 +1,7 @@ +/** + * JSAPI instance + */ +import { SET_API } from '../actionTypes'; +import { replaceReducer } from './common'; + +export default replaceReducer(SET_API, null); diff --git a/packages/redux/src/reducers/index.ts b/packages/redux/src/reducers/index.ts index 7069f1b29f..a16387931c 100644 --- a/packages/redux/src/reducers/index.ts +++ b/packages/redux/src/reducers/index.ts @@ -1,3 +1,4 @@ +import api from './api'; import activeTool from './activeTool'; import plugins from './plugins'; import storage from './storage'; @@ -7,6 +8,7 @@ import serverConfigValues from './serverConfigValues'; const reducers = { activeTool, + api, plugins, storage, user, From 97c7ead4174e802b977962a9ff57dded5f4dd114 Mon Sep 17 00:00:00 2001 From: Don Date: Mon, 15 May 2023 16:09:26 -0400 Subject: [PATCH 04/10] feat: Added new icons and added composition example to styleguide (#1294) Added dhOrganizationAdd icon for ACL editor and dhAddSmall for composition if needed somewhere else. Also added composition example to styleguide. --- packages/code-studio/src/styleguide/Icons.tsx | 76 ++++++++++++++++++- .../src/styleguide/StyleGuide.scss | 3 +- packages/icons/src/icons/add-small.svg | 6 ++ packages/icons/src/icons/organization-add.svg | 19 +++++ 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 packages/icons/src/icons/add-small.svg create mode 100644 packages/icons/src/icons/organization-add.svg diff --git a/packages/code-studio/src/styleguide/Icons.tsx b/packages/code-studio/src/styleguide/Icons.tsx index b40ae33aa1..e5d56ac6cd 100644 --- a/packages/code-studio/src/styleguide/Icons.tsx +++ b/packages/code-studio/src/styleguide/Icons.tsx @@ -1,5 +1,11 @@ import React, { useState, useEffect } from 'react'; -import { dh, IconDefinition } from '@deephaven/icons'; +import { + dh, + IconDefinition, + vsOrganization, + dhSquareFilled, + dhAddSmall, +} from '@deephaven/icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button } from '@deephaven/components'; import PropTypes from 'prop-types'; @@ -105,11 +111,79 @@ function Icons(): React.ReactElement { ); }); + const compositionExample = ` +
+ + +
`; + return (

Icons

+ +
+
+

Icon Composition

+

+ Icons can be used indivudally or composed together using + font-awesome composition: +

+
+
+ +
+
+ +
+
+ +
+
=
+ +
+
+
+
+

All available icons

+

+ If you cannot find or compose a relevant icon for your use case, + please request a new one to be created from design. +

+ + + + diff --git a/packages/icons/src/icons/organization-add.svg b/packages/icons/src/icons/organization-add.svg new file mode 100644 index 0000000000..647834e955 --- /dev/null +++ b/packages/icons/src/icons/organization-add.svg @@ -0,0 +1,19 @@ + + + + + From 87315a7ec7784352c858410ef4890e7ae3f29f98 Mon Sep 17 00:00:00 2001 From: mikebender Date: Mon, 15 May 2023 16:11:17 -0400 Subject: [PATCH 05/10] v0.39.0 --- CHANGELOG.md | 130 +++++++++++++++++++ lerna.json | 2 +- package-lock.json | 66 +++++----- packages/app-utils/CHANGELOG.md | 27 ++++ packages/app-utils/package.json | 2 +- packages/auth-plugins/CHANGELOG.md | 4 + packages/auth-plugins/package.json | 2 +- packages/babel-preset/CHANGELOG.md | 4 + packages/babel-preset/package.json | 2 +- packages/chart/CHANGELOG.md | 62 +++++++++ packages/chart/package.json | 2 +- packages/code-studio/CHANGELOG.md | 115 ++++++++++++++++ packages/code-studio/package.json | 2 +- packages/components/CHANGELOG.md | 10 ++ packages/components/package.json | 2 +- packages/console/CHANGELOG.md | 27 ++++ packages/console/package.json | 2 +- packages/dashboard-core-plugins/CHANGELOG.md | 112 ++++++++++++++++ packages/dashboard-core-plugins/package.json | 4 +- packages/dashboard/CHANGELOG.md | 27 ++++ packages/dashboard/package.json | 2 +- packages/embed-chart/CHANGELOG.md | 62 +++++++++ packages/embed-chart/package.json | 2 +- packages/embed-grid/CHANGELOG.md | 74 +++++++++++ packages/embed-grid/package.json | 2 +- packages/eslint-config/CHANGELOG.md | 4 + packages/eslint-config/package.json | 2 +- packages/file-explorer/CHANGELOG.md | 4 + packages/file-explorer/package.json | 2 +- packages/filters/CHANGELOG.md | 4 + packages/filters/package.json | 2 +- packages/golden-layout/CHANGELOG.md | 6 + packages/golden-layout/package.json | 2 +- packages/grid/CHANGELOG.md | 10 ++ packages/grid/package.json | 2 +- packages/icons/CHANGELOG.md | 6 + packages/icons/package.json | 2 +- packages/iris-grid/CHANGELOG.md | 110 ++++++++++++++++ packages/iris-grid/package.json | 2 +- packages/jsapi-bootstrap/CHANGELOG.md | 4 + packages/jsapi-bootstrap/package.json | 2 +- packages/jsapi-components/CHANGELOG.md | 89 +++++++++++++ packages/jsapi-components/package.json | 4 +- packages/jsapi-shim/CHANGELOG.md | 16 +++ packages/jsapi-shim/package.json | 2 +- packages/jsapi-types/CHANGELOG.md | 4 + packages/jsapi-types/package.json | 2 +- packages/jsapi-utils/CHANGELOG.md | 104 +++++++++++++++ packages/jsapi-utils/package.json | 2 +- packages/log/CHANGELOG.md | 6 + packages/log/package.json | 2 +- packages/mocks/CHANGELOG.md | 4 + packages/mocks/package.json | 2 +- packages/pouch-storage/CHANGELOG.md | 4 + packages/pouch-storage/package.json | 2 +- packages/prettier-config/CHANGELOG.md | 4 + packages/prettier-config/package.json | 2 +- packages/react-hooks/CHANGELOG.md | 11 ++ packages/react-hooks/package.json | 2 +- packages/redux/CHANGELOG.md | 53 ++++++++ packages/redux/package.json | 2 +- packages/storage/CHANGELOG.md | 4 + packages/storage/package.json | 2 +- packages/stylelint-config/CHANGELOG.md | 4 + packages/stylelint-config/package.json | 2 +- packages/tsconfig/CHANGELOG.md | 4 + packages/tsconfig/package.json | 2 +- packages/utils/CHANGELOG.md | 11 ++ packages/utils/package.json | 2 +- 69 files changed, 1189 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9695963c27..f83cd292b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,136 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Bug Fixes + +- add word-break to long column names in column tooltip ([#1290](https://github.com/deephaven/web-client-ui/issues/1290)) ([02215b6](https://github.com/deephaven/web-client-ui/commit/02215b6323c58678ae37578ea9d0e0dda68ff880)), closes [#1283](https://github.com/deephaven/web-client-ui/issues/1283) +- DH-14630: useDebouncedViewportSearch: memoization bug ([#1273](https://github.com/deephaven/web-client-ui/issues/1273)) ([be82b14](https://github.com/deephaven/web-client-ui/commit/be82b145501bd1af48e44f068cc157c088711823)), closes [#1272](https://github.com/deephaven/web-client-ui/issues/1272) +- Select distinct throwing for tables with multiple columns ([#1286](https://github.com/deephaven/web-client-ui/issues/1286)) ([4b40e4b](https://github.com/deephaven/web-client-ui/commit/4b40e4b831c3dae4f7b869b71c7f6185560f929e)), closes [#1275](https://github.com/deephaven/web-client-ui/issues/1275) + +### Features + +- Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212)) ([a17cc0e](https://github.com/deephaven/web-client-ui/commit/a17cc0eb2b4e8ba9240c891a15b9d4b7659fb721)), closes [#1151](https://github.com/deephaven/web-client-ui/issues/1151) +- add uncaught rejections to support logs ([#1293](https://github.com/deephaven/web-client-ui/issues/1293)) ([29ed459](https://github.com/deephaven/web-client-ui/commit/29ed459c130dae9d6a1f3876716d25fb2f0a5fea)), closes [#1253](https://github.com/deephaven/web-client-ui/issues/1253) +- Added new icons and added composition example to styleguide ([#1294](https://github.com/deephaven/web-client-ui/issues/1294)) ([97c7ead](https://github.com/deephaven/web-client-ui/commit/97c7ead4174e802b977962a9ff57dded5f4dd114)) +- De-globalize JSAPI in Chart package ([#1258](https://github.com/deephaven/web-client-ui/issues/1258)) ([87fa2ef](https://github.com/deephaven/web-client-ui/commit/87fa2ef76e0482a1d641d8fea2d33fdad2996ef5)) +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) +- DH-14630 - ACL Editor Hooks ([#1257](https://github.com/deephaven/web-client-ui/issues/1257)) ([e0a2a36](https://github.com/deephaven/web-client-ui/commit/e0a2a369ea3c90e9c2e25b7e29823825db14d3f5)), closes [#1260](https://github.com/deephaven/web-client-ui/issues/1260) +- remove click handler setting onTabContentFocusIn ([#1263](https://github.com/deephaven/web-client-ui/issues/1263)) ([7d56f97](https://github.com/deephaven/web-client-ui/commit/7d56f97aceae6329a188b13f89a7df2e7add7395)) +- Update @vscode/codicons to v0.0.33 ([#1259](https://github.com/deephaven/web-client-ui/issues/1259)) ([1b29af1](https://github.com/deephaven/web-client-ui/commit/1b29af18fa60411a0e16ca1df27a969b11492c56)) +- useTableUtils hook ([#1281](https://github.com/deephaven/web-client-ui/issues/1281)) ([ce1fe2c](https://github.com/deephaven/web-client-ui/commit/ce1fe2ce8cf28c4bc90356ebb25422835b5070df)), closes [#1280](https://github.com/deephaven/web-client-ui/issues/1280) + +### Reverts + +- Revert "feat: Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212))" ([#1296](https://github.com/deephaven/web-client-ui/issues/1296)) ([a80c6fc](https://github.com/deephaven/web-client-ui/commit/a80c6fc608466351d03358f47b9c7d062b28c9cf)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + +- - `ChartUtils` class now needs to be instantiated with a JSAPI object, + most of the methods converted from static to instance methods. + +* All `ChartModelFactory` methods require JSAPI object as the first + argument. +* `FigureChartModel` constructor requires JSAPI object as the first + argument. + +- `generateEmptyKeyedItemsRange` previously required a + single `count` arg, but now requires a `start` and `end` index +- `vsCircleLargeOutline` icon renamed to `vsCircleLarge` + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Bug Fixes diff --git a/lerna.json b/lerna.json index 94df7e5c94..3ec1fea316 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": ["packages/*"], "useWorkspaces": true, "useNx": false, - "version": "0.38.0", + "version": "0.39.0", "command": { "publish": { "distTag": "latest" diff --git a/package-lock.json b/package-lock.json index 82e8881673..39edaf9f6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25715,7 +25715,7 @@ }, "packages/app-utils": { "name": "@deephaven/app-utils", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/auth-plugins": "file:../auth-plugins", @@ -25792,7 +25792,7 @@ }, "packages/auth-plugins": { "name": "@deephaven/auth-plugins", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -25821,7 +25821,7 @@ }, "packages/babel-preset": { "name": "@deephaven/babel-preset", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@babel/core": "^7.20.0", @@ -25836,7 +25836,7 @@ }, "packages/chart": { "name": "@deephaven/chart", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/icons": "file:../icons", @@ -25868,7 +25868,7 @@ }, "packages/code-studio": { "name": "@deephaven/code-studio", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/app-utils": "file:../app-utils", @@ -26077,7 +26077,7 @@ }, "packages/components": { "name": "@deephaven/components", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/icons": "file:../icons", @@ -26116,7 +26116,7 @@ }, "packages/console": { "name": "@deephaven/console", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/chart": "file:../chart", @@ -26154,7 +26154,7 @@ }, "packages/dashboard": { "name": "@deephaven/dashboard", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -26186,7 +26186,7 @@ }, "packages/dashboard-core-plugins": { "name": "@deephaven/dashboard-core-plugins", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/chart": "file:../chart", @@ -26251,7 +26251,7 @@ }, "packages/embed-chart": { "name": "@deephaven/embed-chart", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/app-utils": "file:../app-utils", @@ -26391,7 +26391,7 @@ }, "packages/embed-grid": { "name": "@deephaven/embed-grid", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/app-utils": "file:../app-utils", @@ -26531,7 +26531,7 @@ }, "packages/eslint-config": { "name": "@deephaven/eslint-config", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "eslint-config-airbnb": "^19.0.4", @@ -26550,7 +26550,7 @@ }, "packages/file-explorer": { "name": "@deephaven/file-explorer", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -26577,7 +26577,7 @@ }, "packages/filters": { "name": "@deephaven/filters", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "devDependencies": { "@deephaven/tsconfig": "file:../tsconfig" @@ -26588,7 +26588,7 @@ }, "packages/golden-layout": { "name": "@deephaven/golden-layout", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "jquery": "^3.6.0" @@ -26606,7 +26606,7 @@ }, "packages/grid": { "name": "@deephaven/grid", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/utils": "file:../utils", @@ -26631,7 +26631,7 @@ }, "packages/icons": { "name": "@deephaven/icons", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@fortawesome/fontawesome-common-types": "^6.1.1" @@ -26648,7 +26648,7 @@ }, "packages/iris-grid": { "name": "@deephaven/iris-grid", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -26694,7 +26694,7 @@ }, "packages/jsapi-bootstrap": { "name": "@deephaven/jsapi-bootstrap", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -26715,7 +26715,7 @@ }, "packages/jsapi-components": { "name": "@deephaven/jsapi-components", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -26746,7 +26746,7 @@ }, "packages/jsapi-shim": { "name": "@deephaven/jsapi-shim", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/jsapi-types": "file:../jsapi-types", @@ -26761,7 +26761,7 @@ }, "packages/jsapi-types": { "name": "@deephaven/jsapi-types", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "devDependencies": { "@deephaven/tsconfig": "file:../tsconfig" @@ -26772,7 +26772,7 @@ }, "packages/jsapi-utils": { "name": "@deephaven/jsapi-utils", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/filters": "file:../filters", @@ -26793,7 +26793,7 @@ }, "packages/log": { "name": "@deephaven/log", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "event-target-shim": "^6.0.2" @@ -26807,7 +26807,7 @@ }, "packages/mocks": { "name": "@deephaven/mocks", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "peerDependencies": { "jest": "29.x" @@ -26843,7 +26843,7 @@ }, "packages/pouch-storage": { "name": "@deephaven/pouch-storage", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/console": "file:../console", @@ -26867,7 +26867,7 @@ }, "packages/prettier-config": { "name": "@deephaven/prettier-config", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "peerDependencies": { "prettier": "^2.2.1" @@ -26875,7 +26875,7 @@ }, "packages/react-hooks": { "name": "@deephaven/react-hooks", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/log": "file:../log", @@ -26894,7 +26894,7 @@ }, "packages/redux": { "name": "@deephaven/redux", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/jsapi-types": "file:../jsapi-types", @@ -26915,7 +26915,7 @@ }, "packages/storage": { "name": "@deephaven/storage", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@deephaven/filters": "file:../filters", @@ -26934,7 +26934,7 @@ }, "packages/stylelint-config": { "name": "@deephaven/stylelint-config", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "stylelint-config-prettier-scss": "^0.0.1", @@ -26946,13 +26946,13 @@ }, "packages/tsconfig": { "name": "@deephaven/tsconfig", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0" }, "packages/util": {}, "packages/utils": { "name": "@deephaven/utils", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "engines": { "node": ">=16" diff --git a/packages/app-utils/CHANGELOG.md b/packages/app-utils/CHANGELOG.md index e5a043acc5..fdefe27369 100644 --- a/packages/app-utils/CHANGELOG.md +++ b/packages/app-utils/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/app-utils/package.json b/packages/app-utils/package.json index bfe4594df5..4e52d7acef 100644 --- a/packages/app-utils/package.json +++ b/packages/app-utils/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/app-utils", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven App Utils", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/auth-plugins/CHANGELOG.md b/packages/auth-plugins/CHANGELOG.md index ad53d0b518..991caf5f40 100644 --- a/packages/auth-plugins/CHANGELOG.md +++ b/packages/auth-plugins/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/auth-plugins + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/auth-plugins/package.json b/packages/auth-plugins/package.json index 33c4d5a200..69051cef62 100644 --- a/packages/auth-plugins/package.json +++ b/packages/auth-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/auth-plugins", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Auth Plugins", "keywords": [ "Deephaven", diff --git a/packages/babel-preset/CHANGELOG.md b/packages/babel-preset/CHANGELOG.md index 0bebd81a83..9c68286b62 100644 --- a/packages/babel-preset/CHANGELOG.md +++ b/packages/babel-preset/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/babel-preset + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/babel-preset/package.json b/packages/babel-preset/package.json index a469f3264c..d12de2bcaf 100644 --- a/packages/babel-preset/package.json +++ b/packages/babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/babel-preset", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Babel preset", "repository": { "type": "git", diff --git a/packages/chart/CHANGELOG.md b/packages/chart/CHANGELOG.md index 5a22834eef..279d4372ee 100644 --- a/packages/chart/CHANGELOG.md +++ b/packages/chart/CHANGELOG.md @@ -3,6 +3,68 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Chart package ([#1258](https://github.com/deephaven/web-client-ui/issues/1258)) ([87fa2ef](https://github.com/deephaven/web-client-ui/commit/87fa2ef76e0482a1d641d8fea2d33fdad2996ef5)) +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `ChartUtils` class now needs to be instantiated with a JSAPI object, + most of the methods converted from static to instance methods. + +* All `ChartModelFactory` methods require JSAPI object as the first + argument. +* `FigureChartModel` constructor requires JSAPI object as the first + argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/chart diff --git a/packages/chart/package.json b/packages/chart/package.json index 2ed7debabd..b394069b7c 100644 --- a/packages/chart/package.json +++ b/packages/chart/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/chart", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Chart", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/code-studio/CHANGELOG.md b/packages/code-studio/CHANGELOG.md index 2e7c0f0023..182f7caaf0 100644 --- a/packages/code-studio/CHANGELOG.md +++ b/packages/code-studio/CHANGELOG.md @@ -3,6 +3,121 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212)) ([a17cc0e](https://github.com/deephaven/web-client-ui/commit/a17cc0eb2b4e8ba9240c891a15b9d4b7659fb721)), closes [#1151](https://github.com/deephaven/web-client-ui/issues/1151) +- Added new icons and added composition example to styleguide ([#1294](https://github.com/deephaven/web-client-ui/issues/1294)) ([97c7ead](https://github.com/deephaven/web-client-ui/commit/97c7ead4174e802b977962a9ff57dded5f4dd114)) +- De-globalize JSAPI in Chart package ([#1258](https://github.com/deephaven/web-client-ui/issues/1258)) ([87fa2ef](https://github.com/deephaven/web-client-ui/commit/87fa2ef76e0482a1d641d8fea2d33fdad2996ef5)) +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) + +### Reverts + +- Revert "feat: Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212))" ([#1296](https://github.com/deephaven/web-client-ui/issues/1296)) ([a80c6fc](https://github.com/deephaven/web-client-ui/commit/a80c6fc608466351d03358f47b9c7d062b28c9cf)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + +- - `ChartUtils` class now needs to be instantiated with a JSAPI object, + most of the methods converted from static to instance methods. + +* All `ChartModelFactory` methods require JSAPI object as the first + argument. +* `FigureChartModel` constructor requires JSAPI object as the first + argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Bug Fixes diff --git a/packages/code-studio/package.json b/packages/code-studio/package.json index 37f57d5c40..9c97533b97 100644 --- a/packages/code-studio/package.json +++ b/packages/code-studio/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/code-studio", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Code Studio", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index fd9822f032..4c7c147476 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- Update @vscode/codicons to v0.0.33 ([#1259](https://github.com/deephaven/web-client-ui/issues/1259)) ([1b29af1](https://github.com/deephaven/web-client-ui/commit/1b29af18fa60411a0e16ca1df27a969b11492c56)) + +### BREAKING CHANGES + +- `vsCircleLargeOutline` icon renamed to `vsCircleLarge` + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Bug Fixes diff --git a/packages/components/package.json b/packages/components/package.json index a2694b3b2c..488356d8ad 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/components", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven React component library", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/console/CHANGELOG.md b/packages/console/CHANGELOG.md index d5a683887c..62dfe636d6 100644 --- a/packages/console/CHANGELOG.md +++ b/packages/console/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Bug Fixes diff --git a/packages/console/package.json b/packages/console/package.json index 49c405b0ee..fa5b434a53 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/console", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Console", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/dashboard-core-plugins/CHANGELOG.md b/packages/dashboard-core-plugins/CHANGELOG.md index a6ac8a538b..05896b49f7 100644 --- a/packages/dashboard-core-plugins/CHANGELOG.md +++ b/packages/dashboard-core-plugins/CHANGELOG.md @@ -3,6 +3,118 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Chart package ([#1258](https://github.com/deephaven/web-client-ui/issues/1258)) ([87fa2ef](https://github.com/deephaven/web-client-ui/commit/87fa2ef76e0482a1d641d8fea2d33fdad2996ef5)) +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) +- Update @vscode/codicons to v0.0.33 ([#1259](https://github.com/deephaven/web-client-ui/issues/1259)) ([1b29af1](https://github.com/deephaven/web-client-ui/commit/1b29af18fa60411a0e16ca1df27a969b11492c56)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + +- - `ChartUtils` class now needs to be instantiated with a JSAPI object, + most of the methods converted from static to instance methods. + +* All `ChartModelFactory` methods require JSAPI object as the first + argument. +* `FigureChartModel` constructor requires JSAPI object as the first + argument. + +- `vsCircleLargeOutline` icon renamed to `vsCircleLarge` + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/dashboard-core-plugins/package.json b/packages/dashboard-core-plugins/package.json index 44a754a95b..69784c418f 100644 --- a/packages/dashboard-core-plugins/package.json +++ b/packages/dashboard-core-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/dashboard-core-plugins", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Dashboard Core Plugins", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -62,8 +62,8 @@ "react-redux": "^7.2.4" }, "devDependencies": { - "@deephaven/mocks": "file:../mocks", "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/mocks": "file:../mocks", "@deephaven/tsconfig": "file:../tsconfig" }, "files": [ diff --git a/packages/dashboard/CHANGELOG.md b/packages/dashboard/CHANGELOG.md index 3e63ed52e2..50ba24c2d9 100644 --- a/packages/dashboard/CHANGELOG.md +++ b/packages/dashboard/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/dashboard diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index d3edcf29d5..dae5372c70 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/dashboard", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Dashboard", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/embed-chart/CHANGELOG.md b/packages/embed-chart/CHANGELOG.md index cac0c518dd..6794e466ee 100644 --- a/packages/embed-chart/CHANGELOG.md +++ b/packages/embed-chart/CHANGELOG.md @@ -3,6 +3,68 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Chart package ([#1258](https://github.com/deephaven/web-client-ui/issues/1258)) ([87fa2ef](https://github.com/deephaven/web-client-ui/commit/87fa2ef76e0482a1d641d8fea2d33fdad2996ef5)) +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `ChartUtils` class now needs to be instantiated with a JSAPI object, + most of the methods converted from static to instance methods. + +* All `ChartModelFactory` methods require JSAPI object as the first + argument. +* `FigureChartModel` constructor requires JSAPI object as the first + argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/embed-chart/package.json b/packages/embed-chart/package.json index 6484dc6f93..4b9300db2a 100644 --- a/packages/embed-chart/package.json +++ b/packages/embed-chart/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/embed-chart", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Embedded Chart", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/embed-grid/CHANGELOG.md b/packages/embed-grid/CHANGELOG.md index 17ee1fdf42..2eb901c17d 100644 --- a/packages/embed-grid/CHANGELOG.md +++ b/packages/embed-grid/CHANGELOG.md @@ -3,6 +3,80 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/embed-grid/package.json b/packages/embed-grid/package.json index c402e8289f..e75a7d9f9d 100644 --- a/packages/embed-grid/package.json +++ b/packages/embed-grid/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/embed-grid", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Embedded Grid", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/eslint-config/CHANGELOG.md b/packages/eslint-config/CHANGELOG.md index 2c13792f9a..a82a95cf29 100644 --- a/packages/eslint-config/CHANGELOG.md +++ b/packages/eslint-config/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/eslint-config + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/eslint-config diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index c1f2f57cb3..02c62d8338 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/eslint-config", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven ESLint configuration", "repository": { "type": "git", diff --git a/packages/file-explorer/CHANGELOG.md b/packages/file-explorer/CHANGELOG.md index 8b9f71e693..eb656f40bc 100644 --- a/packages/file-explorer/CHANGELOG.md +++ b/packages/file-explorer/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/file-explorer + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/file-explorer diff --git a/packages/file-explorer/package.json b/packages/file-explorer/package.json index bee4e9d54e..23143ce0a9 100644 --- a/packages/file-explorer/package.json +++ b/packages/file-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/file-explorer", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven File Explorer React component", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/filters/CHANGELOG.md b/packages/filters/CHANGELOG.md index 6a1fcbdb35..f1160437c9 100644 --- a/packages/filters/CHANGELOG.md +++ b/packages/filters/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/filters + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/filters diff --git a/packages/filters/package.json b/packages/filters/package.json index 2b3ca9444a..fffffbbf82 100644 --- a/packages/filters/package.json +++ b/packages/filters/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/filters", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Filters", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/golden-layout/CHANGELOG.md b/packages/golden-layout/CHANGELOG.md index 3df842d5d5..22aad966c2 100644 --- a/packages/golden-layout/CHANGELOG.md +++ b/packages/golden-layout/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- remove click handler setting onTabContentFocusIn ([#1263](https://github.com/deephaven/web-client-ui/issues/1263)) ([7d56f97](https://github.com/deephaven/web-client-ui/commit/7d56f97aceae6329a188b13f89a7df2e7add7395)) + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/golden-layout diff --git a/packages/golden-layout/package.json b/packages/golden-layout/package.json index ccedb49c30..707500bdb7 100644 --- a/packages/golden-layout/package.json +++ b/packages/golden-layout/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/golden-layout", - "version": "0.38.0", + "version": "0.39.0", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", "description": "A multi-screen javascript Layout manager", diff --git a/packages/grid/CHANGELOG.md b/packages/grid/CHANGELOG.md index 659f6148ca..a8e047fc19 100644 --- a/packages/grid/CHANGELOG.md +++ b/packages/grid/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212)) ([a17cc0e](https://github.com/deephaven/web-client-ui/commit/a17cc0eb2b4e8ba9240c891a15b9d4b7659fb721)), closes [#1151](https://github.com/deephaven/web-client-ui/issues/1151) + +### Reverts + +- Revert "feat: Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212))" ([#1296](https://github.com/deephaven/web-client-ui/issues/1296)) ([a80c6fc](https://github.com/deephaven/web-client-ui/commit/a80c6fc608466351d03358f47b9c7d062b28c9cf)) + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Bug Fixes diff --git a/packages/grid/package.json b/packages/grid/package.json index 001a3486ae..a3b43fed40 100644 --- a/packages/grid/package.json +++ b/packages/grid/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/grid", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven React grid component", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index 2d05cad708..0a298c3356 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- Added new icons and added composition example to styleguide ([#1294](https://github.com/deephaven/web-client-ui/issues/1294)) ([97c7ead](https://github.com/deephaven/web-client-ui/commit/97c7ead4174e802b977962a9ff57dded5f4dd114)) + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/icons diff --git a/packages/icons/package.json b/packages/icons/package.json index 0809802394..acee65ecb9 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/icons", - "version": "0.38.0", + "version": "0.39.0", "description": "Icons used in Deephaven client apps. Extends vscode-codicons to be font-awesome svg-core compatible and adds additional icons in a similar style.", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/iris-grid/CHANGELOG.md b/packages/iris-grid/CHANGELOG.md index de1703264c..b3977127c2 100644 --- a/packages/iris-grid/CHANGELOG.md +++ b/packages/iris-grid/CHANGELOG.md @@ -3,6 +3,116 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Bug Fixes + +- add word-break to long column names in column tooltip ([#1290](https://github.com/deephaven/web-client-ui/issues/1290)) ([02215b6](https://github.com/deephaven/web-client-ui/commit/02215b6323c58678ae37578ea9d0e0dda68ff880)), closes [#1283](https://github.com/deephaven/web-client-ui/issues/1283) +- Select distinct throwing for tables with multiple columns ([#1286](https://github.com/deephaven/web-client-ui/issues/1286)) ([4b40e4b](https://github.com/deephaven/web-client-ui/commit/4b40e4b831c3dae4f7b869b71c7f6185560f929e)), closes [#1275](https://github.com/deephaven/web-client-ui/issues/1275) + +### Features + +- Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212)) ([a17cc0e](https://github.com/deephaven/web-client-ui/commit/a17cc0eb2b4e8ba9240c891a15b9d4b7659fb721)), closes [#1151](https://github.com/deephaven/web-client-ui/issues/1151) +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) + +### Reverts + +- Revert "feat: Table rendering support for databars ([#1212](https://github.com/deephaven/web-client-ui/issues/1212))" ([#1296](https://github.com/deephaven/web-client-ui/issues/1296)) ([a80c6fc](https://github.com/deephaven/web-client-ui/commit/a80c6fc608466351d03358f47b9c7d062b28c9cf)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/iris-grid diff --git a/packages/iris-grid/package.json b/packages/iris-grid/package.json index 2cfa5ab3bd..4291f98b2e 100644 --- a/packages/iris-grid/package.json +++ b/packages/iris-grid/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/iris-grid", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Iris Grid", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/jsapi-bootstrap/CHANGELOG.md b/packages/jsapi-bootstrap/CHANGELOG.md index 66f6dd0116..d904e83acd 100644 --- a/packages/jsapi-bootstrap/CHANGELOG.md +++ b/packages/jsapi-bootstrap/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/jsapi-bootstrap + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/jsapi-bootstrap/package.json b/packages/jsapi-bootstrap/package.json index 75ca8e469e..27fd416e03 100644 --- a/packages/jsapi-bootstrap/package.json +++ b/packages/jsapi-bootstrap/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-bootstrap", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven JSAPI Bootstrap", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/jsapi-components/CHANGELOG.md b/packages/jsapi-components/CHANGELOG.md index e98e04608c..3c72341a6b 100644 --- a/packages/jsapi-components/CHANGELOG.md +++ b/packages/jsapi-components/CHANGELOG.md @@ -3,6 +3,95 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Bug Fixes + +- DH-14630: useDebouncedViewportSearch: memoization bug ([#1273](https://github.com/deephaven/web-client-ui/issues/1273)) ([be82b14](https://github.com/deephaven/web-client-ui/commit/be82b145501bd1af48e44f068cc157c088711823)), closes [#1272](https://github.com/deephaven/web-client-ui/issues/1272) + +### Features + +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) +- DH-14630 - ACL Editor Hooks ([#1257](https://github.com/deephaven/web-client-ui/issues/1257)) ([e0a2a36](https://github.com/deephaven/web-client-ui/commit/e0a2a369ea3c90e9c2e25b7e29823825db14d3f5)), closes [#1260](https://github.com/deephaven/web-client-ui/issues/1260) +- useTableUtils hook ([#1281](https://github.com/deephaven/web-client-ui/issues/1281)) ([ce1fe2c](https://github.com/deephaven/web-client-ui/commit/ce1fe2ce8cf28c4bc90356ebb25422835b5070df)), closes [#1280](https://github.com/deephaven/web-client-ui/issues/1280) + +### BREAKING CHANGES + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + +- `generateEmptyKeyedItemsRange` previously required a + single `count` arg, but now requires a `start` and `end` index + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/jsapi-components/package.json b/packages/jsapi-components/package.json index 2f933e4a62..00d9b0063e 100644 --- a/packages/jsapi-components/package.json +++ b/packages/jsapi-components/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-components", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven JSAPI Components", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -29,11 +29,11 @@ "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/utils": "file:../utils", - "lodash.debounce": "^4.0.8", "@react-stately/data": "^3.9.1", "@types/js-cookie": "^3.0.3", "classnames": "^2.3.2", "js-cookie": "^3.0.5", + "lodash.debounce": "^4.0.8", "prop-types": "^15.8.1" }, "devDependencies": { diff --git a/packages/jsapi-shim/CHANGELOG.md b/packages/jsapi-shim/CHANGELOG.md index 600b35a327..ac16e5efa6 100644 --- a/packages/jsapi-shim/CHANGELOG.md +++ b/packages/jsapi-shim/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Chart package ([#1258](https://github.com/deephaven/web-client-ui/issues/1258)) ([87fa2ef](https://github.com/deephaven/web-client-ui/commit/87fa2ef76e0482a1d641d8fea2d33fdad2996ef5)) + +### BREAKING CHANGES + +- - `ChartUtils` class now needs to be instantiated with a JSAPI object, + most of the methods converted from static to instance methods. + +* All `ChartModelFactory` methods require JSAPI object as the first + argument. +* `FigureChartModel` constructor requires JSAPI object as the first + argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/jsapi-shim diff --git a/packages/jsapi-shim/package.json b/packages/jsapi-shim/package.json index 0b5cdb862e..0bee4d1395 100644 --- a/packages/jsapi-shim/package.json +++ b/packages/jsapi-shim/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-shim", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven JSAPI Shim", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/jsapi-types/CHANGELOG.md b/packages/jsapi-types/CHANGELOG.md index b66275eef9..be79fc8a1e 100644 --- a/packages/jsapi-types/CHANGELOG.md +++ b/packages/jsapi-types/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/jsapi-types + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/jsapi-types diff --git a/packages/jsapi-types/package.json b/packages/jsapi-types/package.json index 03d78f94a2..f8968cda49 100644 --- a/packages/jsapi-types/package.json +++ b/packages/jsapi-types/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-types", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven JSAPI Types", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/jsapi-utils/CHANGELOG.md b/packages/jsapi-utils/CHANGELOG.md index 4dab7c616e..5d2ff896f6 100644 --- a/packages/jsapi-utils/CHANGELOG.md +++ b/packages/jsapi-utils/CHANGELOG.md @@ -3,6 +3,110 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize JSAPI in IrisGrid package ([#1262](https://github.com/deephaven/web-client-ui/issues/1262)) ([588cb8f](https://github.com/deephaven/web-client-ui/commit/588cb8fd080ac992da40e9b732d82e206032c9eb)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) +- DH-14630 - ACL Editor Hooks ([#1257](https://github.com/deephaven/web-client-ui/issues/1257)) ([e0a2a36](https://github.com/deephaven/web-client-ui/commit/e0a2a369ea3c90e9c2e25b7e29823825db14d3f5)), closes [#1260](https://github.com/deephaven/web-client-ui/issues/1260) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + +- - `DateUtils` static methods `makeDateWrapper`, `getNextDate `, + `parseDateRange` now require the JSAPI object as the first argument. + +* `IrisGridUtils` static methods `dehydrateIrisGridState`, + `hydrateIrisGridState`, `hydrateQuickFilters`, + `dehydrateAdvancedFilters`, `hydrateAdvancedFilters`, + `dehydrateAdvancedFilterOptions`, `hydrateAdvancedFilterOptions`, + `dehydratePendingDataMap`, `hydratePendingDataMap`, `dehydrateValue`, + `hydrateValue`, `dehydrateDateTime`, `hydrateDateTime`, `hydrateLong`, + `hydrateSort`, `applyTableSettings`, `getFiltersFromInputFilters`, + `rangeSetFromRanges` converted to instance methods. Consumers now need + to create an `IrisGridUtils` instance and pass the JSAPI object to the + constructor. +* `TableUtils` static methods `makeQuickFilter`, + `makeQuickFilterFromComponent`, `makeQuickNumberFilter`, + `makeQuickTextFilter`, `makeQuickBooleanFilter`, `makeQuickDateFilter`, + `makeQuickDateFilterWithOperation`, `makeQuickCharFilter`, + `makeAdvancedFilter`, `makeAdvancedValueFilter`, `makeFilterValue`, + `makeFilterRawValue`, `makeValue`, `makeSelectValueFilter` converted to + instance methods. Consumers now need to create a `TableUtils` instance + and pass the JSAPI object to the constructor. +* `IrisGridTableModel`, `IrisGridTableModelTemplate`, + `IrisGridProxyModel` constructors require the JSAPI object in the first + argument. +* `IrisGridTestUtils.makeModel`, `IrisGridModelFactory.makeModel` now + require the JSAPI object in the first argument. +* `IrisGridContextMenuHandler` constructor requires the JSAPI object in + the second argument. +* `IrisGridPanel` requires a new `makeApi` prop, a function that + resolves with the JSAPI instance. +* `CrossColumnSearch.createSearchFilter` requires the JSAPI object + argument. +* Components `AdvancedFilterCreatorSelectValue`, + `AdvancedFilterCreatorSelectValueList`, `ChartBuilder`, `GotoRow`, + `IrisGrid`, `IrisGridModelUpdater`, `IrisGridPartitionSelector`, + `PartitionSelectorSearch`, `TableCSVExporter`, `TableSaver`, + `TreeTableViewportUpdater`, `RowFormatEditor`, `ColumnFormatEditor`, + `ConditionEditor` now require the JSAPI object passed in the new prop + `dh`. +* Components `AdvancedFilterCreator`, `AdvancedFilterCreatorFilterItem` + require the `TableUtils` instance pass in the new prop `tableUtils`. +* `ConditionalFormattingUtils` static methods `getFormatColumns`, + `isDateConditionValid` require the JSAPI object in the first argument. +* `ConditionalFormattingAPIUtils` static method `makeRowFormatColumn` + requires the JSAPI object in the first argument. + +- `generateEmptyKeyedItemsRange` previously required a + single `count` arg, but now requires a `start` and `end` index + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/jsapi-utils/package.json b/packages/jsapi-utils/package.json index 95fd65d539..c53766bd0c 100644 --- a/packages/jsapi-utils/package.json +++ b/packages/jsapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-utils", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven JSAPI Utils", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/log/CHANGELOG.md b/packages/log/CHANGELOG.md index b5b1c9ad95..223c2c1e8c 100644 --- a/packages/log/CHANGELOG.md +++ b/packages/log/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- add uncaught rejections to support logs ([#1293](https://github.com/deephaven/web-client-ui/issues/1293)) ([29ed459](https://github.com/deephaven/web-client-ui/commit/29ed459c130dae9d6a1f3876716d25fb2f0a5fea)), closes [#1253](https://github.com/deephaven/web-client-ui/issues/1253) + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/log diff --git a/packages/log/package.json b/packages/log/package.json index b15a3cbc6f..2d479b9b52 100644 --- a/packages/log/package.json +++ b/packages/log/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/log", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Logger", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/mocks/CHANGELOG.md b/packages/mocks/CHANGELOG.md index d6096049ba..41492a74e7 100644 --- a/packages/mocks/CHANGELOG.md +++ b/packages/mocks/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/mocks + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/mocks diff --git a/packages/mocks/package.json b/packages/mocks/package.json index c5cc0ffb32..e7f0bcd9da 100644 --- a/packages/mocks/package.json +++ b/packages/mocks/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/mocks", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Mocks for common libraries", "repository": { "type": "git", diff --git a/packages/pouch-storage/CHANGELOG.md b/packages/pouch-storage/CHANGELOG.md index b3d78a5faa..a6738b91d3 100644 --- a/packages/pouch-storage/CHANGELOG.md +++ b/packages/pouch-storage/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/pouch-storage + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/pouch-storage diff --git a/packages/pouch-storage/package.json b/packages/pouch-storage/package.json index 0fca138ff4..60f960a520 100644 --- a/packages/pouch-storage/package.json +++ b/packages/pouch-storage/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/pouch-storage", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Storage based on PouchDB", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/prettier-config/CHANGELOG.md b/packages/prettier-config/CHANGELOG.md index e1f52caea5..fe1c716b68 100644 --- a/packages/prettier-config/CHANGELOG.md +++ b/packages/prettier-config/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/prettier-config + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/prettier-config diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index 71e2829c0b..6a5420a028 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/prettier-config", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Prettier configuration", "repository": { "type": "git", diff --git a/packages/react-hooks/CHANGELOG.md b/packages/react-hooks/CHANGELOG.md index 4da36483cf..830dde375f 100644 --- a/packages/react-hooks/CHANGELOG.md +++ b/packages/react-hooks/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- DH-14630 - ACL Editor Hooks ([#1257](https://github.com/deephaven/web-client-ui/issues/1257)) ([e0a2a36](https://github.com/deephaven/web-client-ui/commit/e0a2a369ea3c90e9c2e25b7e29823825db14d3f5)), closes [#1260](https://github.com/deephaven/web-client-ui/issues/1260) + +### BREAKING CHANGES + +- `generateEmptyKeyedItemsRange` previously required a + single `count` arg, but now requires a `start` and `end` index + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Bug Fixes diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index 8687c7efac..5ecfa60931 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/react-hooks", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven React hooks library", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/redux/CHANGELOG.md b/packages/redux/CHANGELOG.md index a35260d1e9..18b54b53f1 100644 --- a/packages/redux/CHANGELOG.md +++ b/packages/redux/CHANGELOG.md @@ -3,6 +3,59 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- De-globalize JSAPI in Console package ([#1292](https://github.com/deephaven/web-client-ui/issues/1292)) ([3f12dd3](https://github.com/deephaven/web-client-ui/commit/3f12dd38a4db172697b3a7b39e6fbbd83d9f8519)) +- De-globalize utils, formatters, linker ([#1278](https://github.com/deephaven/web-client-ui/issues/1278)) ([cb0e9ba](https://github.com/deephaven/web-client-ui/commit/cb0e9ba432a096cdb61c76787cff66c09a337372)) + +### BREAKING CHANGES + +- - Components `IrisGrid`, `Chart`, `ChartBuilder`, + `AdvancedFilterCreator`, `GotoRow`, `IrisGridModelUpdater`, + `TableCSVExporter` get the JSAPI reference from the `model` prop. `dh` + prop removed. + +* `makeApi` props in `IrisGridPanel` and `ChartPanel` removed. +* Components `Console`, `ConsoleMenu`, `ConsoleStatusBar` now require + the JSAPI instance in the `dh` prop. +* `ConsoleUtils`: static methods `isTableType`, `isWidgetType`, + `isOpenableType`, `isFigureType`, `isPandas` require JSAPI instance + passed in the first argument. +* `SessionUtils`: static methods `createSessionWrapper`, + `loadSessionWrapper` require JSAPI instance passed in the first + argument. +* Class `IrisGridModel` requires JSAPI instance passed in the + constructor args. +* Components `DashboardLayout`, `ObjectIcon` has to be wrapped in + `ApiContext.Provider` passing the JSAPI instance. + +- - Class `Formatter` requires the JSAPI instance as the first argument. + +* Classes `DateTimeColumnFormatter`, `DecimalColumnFormatter`, + `IntegerColumnFormatter`, `TableColumnFormatter`: static method + `isValid` and constructor require the JSAPI instance in the first + argument. +* Component `Chart` requires the JSAPI instance passed in the new prop + `dh`. +* `WidgetUtils`: methods `createChartModel`, `createGridModel` methods + require the JSAPI instance passed in the first argument. +* Components `DateTimeOptions`, `TableInput`, `useViewportData` have to + be wrapped in `ApiContext.Provider` passing the JSAPI instance. +* `SettingsUtils`: methods `isValidFormat` and + `isFormatRuleValidForSave` require the JSAPI instance passed in the + first argument. +* `SessionUtils`: methods `createConnection`, `createCoreClient` require + the JSAPI instance passed in the first argument. +* `TableUtils` static methods `applyCustomColumns`, `applyFilter`, + `applyNeverFilter`, `applySort` converted to instance methods. +* Components `DropdownFilterPanel`, `Linker` now get the JSAPI instance + from redux store. +* `DecimalFormatContextMenu.getOptions`, + `IntegerFormatContextMenu.getOptions` now require the JSAPI instance in + the first argument. + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/redux/package.json b/packages/redux/package.json index 8b1e4a12e3..94decb98a6 100644 --- a/packages/redux/package.json +++ b/packages/redux/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/redux", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Redux", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/storage/CHANGELOG.md b/packages/storage/CHANGELOG.md index b6dafa36d2..51403aac45 100644 --- a/packages/storage/CHANGELOG.md +++ b/packages/storage/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/storage + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/storage diff --git a/packages/storage/package.json b/packages/storage/package.json index b34a1f2dda..b4926349d4 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/storage", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Storage abstract classes for storing app data", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/stylelint-config/CHANGELOG.md b/packages/stylelint-config/CHANGELOG.md index 5a25991b7b..0abd67dced 100644 --- a/packages/stylelint-config/CHANGELOG.md +++ b/packages/stylelint-config/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/stylelint-config + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/stylelint-config diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index bacec26517..477ba4781b 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/stylelint-config", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Stylelint configuration", "repository": { "type": "git", diff --git a/packages/tsconfig/CHANGELOG.md b/packages/tsconfig/CHANGELOG.md index d05c5caf27..e337892718 100644 --- a/packages/tsconfig/CHANGELOG.md +++ b/packages/tsconfig/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +**Note:** Version bump only for package @deephaven/tsconfig + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) **Note:** Version bump only for package @deephaven/tsconfig diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index 6ed6879e0e..e3bf6dc436 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/tsconfig", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven TypeScript configuration", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 1077dea7c1..63d5275595 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.39.0](https://github.com/deephaven/web-client-ui/compare/v0.38.0...v0.39.0) (2023-05-15) + +### Features + +- DH-14630 - ACL Editor Hooks ([#1257](https://github.com/deephaven/web-client-ui/issues/1257)) ([e0a2a36](https://github.com/deephaven/web-client-ui/commit/e0a2a369ea3c90e9c2e25b7e29823825db14d3f5)), closes [#1260](https://github.com/deephaven/web-client-ui/issues/1260) + +### BREAKING CHANGES + +- `generateEmptyKeyedItemsRange` previously required a + single `count` arg, but now requires a `start` and `end` index + # [0.38.0](https://github.com/deephaven/web-client-ui/compare/v0.37.3...v0.38.0) (2023-05-03) ### Features diff --git a/packages/utils/package.json b/packages/utils/package.json index 184492f0ea..1b06fbe87c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/utils", - "version": "0.38.0", + "version": "0.39.0", "description": "Deephaven Utils", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", From 0d02ab9b3d1284edfbce08e7650a1aea875012f3 Mon Sep 17 00:00:00 2001 From: Don Date: Mon, 15 May 2023 16:33:07 -0400 Subject: [PATCH 06/10] fix: Search icon styleguide using prefixed string (#1300) Changes from searching the kebab case icon name to the component name. Also strip spaces and dashes before searching, so kebab case search still works. --- packages/code-studio/src/styleguide/Icons.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/code-studio/src/styleguide/Icons.tsx b/packages/code-studio/src/styleguide/Icons.tsx index e5d56ac6cd..8f311977a9 100644 --- a/packages/code-studio/src/styleguide/Icons.tsx +++ b/packages/code-studio/src/styleguide/Icons.tsx @@ -70,9 +70,11 @@ function Icons(): React.ReactElement { const renderIcons = Object.values(dh) .filter((icon: IconDefinition): boolean => { const matchesFilter = - (icon.prefix.toLowerCase() + icon.iconName.toLowerCase()).indexOf( - search.toLowerCase() - ) !== -1; + getPrefixedName(icon.iconName, icon.prefix) + .toLowerCase() + .indexOf( + search.replace(/\s/g, '').replace(/-/g, '').toLowerCase() + ) !== -1; const isDH = dhFilter && (icon.prefix as string) === DH_PREFIX; const isVS = vsFilter && (icon.prefix as string) === VS_PREFIX; return matchesFilter && (isDH || isVS); From a635aebdb9310d7c976744ef3c968f832faa6985 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Tue, 16 May 2023 12:40:53 -0500 Subject: [PATCH 07/10] docs: Add info about debugging in VSCode from Linux (#1298) --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55a4209ccb..7b7eba4e28 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ In order to use the UI, you must also be running a [deephaven-core](https://gith We recommend using [Visual Studio Code](https://code.visualstudio.com/) and installing the [recommended workspace extensions](https://github.com/deephaven/web-client-ui/blob/main/.vscode/extensions.json) which VS Code will suggest when you open the repo or when you browse the extensions panel. There are a few [workspace settings](https://github.com/deephaven/web-client-ui/tree/main/.vscode) configured with the repo. +If using Linux, we recommend installing directly from the deb or rpm file from the VSCode website rather than through a package manager or store such as `snap` or `flatpak`. The other install methods (for example, apt on Ubuntu installs via snap) may end up in a sandboxed environment that cannot use the debug launch configs properly. + We use Chrome for development with the React and Redux extensions. - [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi): Allows inspection/changing the props/state of react components. @@ -62,10 +64,17 @@ VITE_PROXY_URL=http://: We have a pre-defined launch config that lets you set breakpoints directly in VSCode for debugging browser code. The `Launch Deephaven` config will launch a new Chrome window that stores its data in your repo workspace. With this setup, you only need to install the React and Redux devtool extensions once. They will persist to future launches using the launch config. -If you are not using Chrome (e.g. Chromium on Linux), then you add a new configuration to VSCode and copy the launch config from [`settings.json`](./.vscode/settings.json). Then add the `runtimeExecutable` prop to point to your browser executable. VSCode unfortnuately does not merge workspace `settings.launch` with workspace `launch.json`, so if we add more launch configs you would need to copy to your `.vscode/launch.json` file to get the configs. - We prefer launching a new window instead of attaching to existing windows because it provides a cleaner debug environment (only development extensions). You would also need to launch Chrome with the remote debugging flag in order to attach to an existing instance. +### Linux +If you are using Linux, you will likely need to use the direct install from the VSCode website (deb or rpm file) and not through a package manager. On Ubuntu, apt installs via `snap` and some Linux flavors may use `flatpak`. Both of these sandbox the VSCode instance in such a way that the launch debug configs will likely not work. + +If you are not using Chrome (e.g. Chromium), you may need to do one of the following if the launch config is not working. + +1. Alias `google-chrome-stable` to launch `chromium-browser`. The launch config by default should try to launch `google-chrome-stable`, so if you can launch the browser with `google-chrome-stable` from a terminal, it should work. + +2. Add a new configuration to VSCode and copy the launch config from [`settings.json`](./.vscode/settings.json). Then add the `runtimeExecutable` prop to point to your browser executable. VSCode unfortnuately does not merge workspace `settings.launch` with workspace `launch.json`, so if we add more launch configs you would need to copy to your `.vscode/launch.json` file to get the configs. + ## Creating a New Package Depending on what your package is, there are a couple of different templates that may be appropriate. From 5e23e4a9f69eaf6fcb55e0e30ceb490ad913966e Mon Sep 17 00:00:00 2001 From: Don Date: Tue, 16 May 2023 14:07:03 -0400 Subject: [PATCH 08/10] fix: drag to re-arrange custom columns not working (#1299) resolves: #1282 Broken by #1013. Can't use prop spreading with our Button component, added support for spreading. Needs silverheels cherry-pick. --- packages/components/src/Button.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/components/src/Button.tsx b/packages/components/src/Button.tsx index 1b35377997..2bc454045d 100644 --- a/packages/components/src/Button.tsx +++ b/packages/components/src/Button.tsx @@ -106,6 +106,7 @@ const Button = React.forwardRef( tabIndex, 'data-testid': dataTestId, 'aria-label': ariaLabel, + ...rest } = props; const iconOnly = Boolean(icon && children == null); @@ -167,6 +168,8 @@ const Button = React.forwardRef( disabled={disabled} tabIndex={tabIndex} aria-label={ariaLabelString} + // eslint-disable-next-line react/jsx-props-no-spreading + {...rest} > {icon && iconElem} {children} From 837d4950bfbc5430824ec8b10037d423cf34f5d1 Mon Sep 17 00:00:00 2001 From: ethanalvizo <55671206+ethanalvizo@users.noreply.github.com> Date: Tue, 16 May 2023 14:12:30 -0400 Subject: [PATCH 09/10] chore: consolidate git ignore files (#1297) Closes #1236 --- .gitignore | 17 +++++------ packages/app-utils/.gitignore | 31 ------------------- packages/auth-plugins/.gitignore | 31 ------------------- packages/babel-preset/.gitignore | 2 -- packages/chart/.gitignore | 31 ------------------- packages/code-studio/.gitignore | 31 ------------------- packages/components/.gitignore | 32 -------------------- packages/console/.gitignore | 31 ------------------- packages/dashboard-core-plugins/.gitignore | 35 ---------------------- packages/dashboard/.gitignore | 31 ------------------- packages/embed-chart/.gitignore | 31 ------------------- packages/embed-grid/.gitignore | 31 ------------------- packages/eslint-config/.gitignore | 2 -- packages/file-explorer/.gitignore | 31 ------------------- packages/filters/.gitignore | 31 ------------------- packages/golden-layout/.gitignore | 6 ---- packages/grid/.gitignore | 22 -------------- packages/icons/.gitignore | 30 ------------------- packages/iris-grid/.gitignore | 31 ------------------- packages/jsapi-bootstrap/.gitignore | 31 ------------------- packages/jsapi-components/.gitignore | 31 ------------------- packages/jsapi-shim/.gitignore | 31 ------------------- packages/jsapi-types/.gitignore | 31 ------------------- packages/jsapi-utils/.gitignore | 31 ------------------- packages/log/.gitignore | 31 ------------------- packages/mocks/.gitignore | 2 -- packages/pouch-storage/.gitignore | 31 ------------------- packages/prettier-config/.gitignore | 2 -- packages/react-hooks/.gitignore | 31 ------------------- packages/redux/.gitignore | 31 ------------------- packages/storage/.gitignore | 31 ------------------- packages/stylelint-config/.gitignore | 2 -- packages/tsconfig/.gitignore | 2 -- packages/utils/.gitignore | 31 ------------------- 34 files changed, 7 insertions(+), 829 deletions(-) delete mode 100644 packages/app-utils/.gitignore delete mode 100644 packages/auth-plugins/.gitignore delete mode 100644 packages/babel-preset/.gitignore delete mode 100644 packages/chart/.gitignore delete mode 100644 packages/code-studio/.gitignore delete mode 100644 packages/components/.gitignore delete mode 100644 packages/console/.gitignore delete mode 100644 packages/dashboard-core-plugins/.gitignore delete mode 100644 packages/dashboard/.gitignore delete mode 100644 packages/embed-chart/.gitignore delete mode 100644 packages/embed-grid/.gitignore delete mode 100644 packages/eslint-config/.gitignore delete mode 100644 packages/file-explorer/.gitignore delete mode 100644 packages/filters/.gitignore delete mode 100644 packages/golden-layout/.gitignore delete mode 100644 packages/grid/.gitignore delete mode 100644 packages/icons/.gitignore delete mode 100644 packages/iris-grid/.gitignore delete mode 100644 packages/jsapi-bootstrap/.gitignore delete mode 100644 packages/jsapi-components/.gitignore delete mode 100644 packages/jsapi-shim/.gitignore delete mode 100644 packages/jsapi-types/.gitignore delete mode 100644 packages/jsapi-utils/.gitignore delete mode 100644 packages/log/.gitignore delete mode 100644 packages/mocks/.gitignore delete mode 100644 packages/pouch-storage/.gitignore delete mode 100644 packages/prettier-config/.gitignore delete mode 100644 packages/react-hooks/.gitignore delete mode 100644 packages/redux/.gitignore delete mode 100644 packages/storage/.gitignore delete mode 100644 packages/stylelint-config/.gitignore delete mode 100644 packages/tsconfig/.gitignore delete mode 100644 packages/utils/.gitignore diff --git a/.gitignore b/.gitignore index aa11382c2e..61d93d6005 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ # See https://help.github.com/ignore-files/ for more about ignoring files. # dependencies -/node_modules +node_modules/ # testing -/coverage +coverage/ # production -/build -/dist +build/ +dist/ # misc .vscode/* @@ -17,10 +17,7 @@ !.vscode/extensions.json !.vscode/*.code-snippets .DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local +.env*local .project .settings/ .eslintcache @@ -28,13 +25,13 @@ lerna-debug.log Lerna-Profile-*.json -/public/vs +.idea npm-debug.log* yarn-debug.log* yarn-error.log* -src/**/*.css +css tsconfig.tsbuildinfo packages/*/package-lock.json diff --git a/packages/app-utils/.gitignore b/packages/app-utils/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/app-utils/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/auth-plugins/.gitignore b/packages/auth-plugins/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/auth-plugins/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/babel-preset/.gitignore b/packages/babel-preset/.gitignore deleted file mode 100644 index ac9b5b414a..0000000000 --- a/packages/babel-preset/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. -/node_modules diff --git a/packages/chart/.gitignore b/packages/chart/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/chart/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/code-studio/.gitignore b/packages/code-studio/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/code-studio/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/components/.gitignore b/packages/components/.gitignore deleted file mode 100644 index c697a512f7..0000000000 --- a/packages/components/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist -/css - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/console/.gitignore b/packages/console/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/console/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/dashboard-core-plugins/.gitignore b/packages/dashboard-core-plugins/.gitignore deleted file mode 100644 index 41e01c09da..0000000000 --- a/packages/dashboard-core-plugins/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css - -cypress/screenshots -cypress/videos -cypress.env.json diff --git a/packages/dashboard/.gitignore b/packages/dashboard/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/dashboard/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/embed-chart/.gitignore b/packages/embed-chart/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/embed-chart/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/embed-grid/.gitignore b/packages/embed-grid/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/embed-grid/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/eslint-config/.gitignore b/packages/eslint-config/.gitignore deleted file mode 100644 index ac9b5b414a..0000000000 --- a/packages/eslint-config/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. -/node_modules diff --git a/packages/file-explorer/.gitignore b/packages/file-explorer/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/file-explorer/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/filters/.gitignore b/packages/filters/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/filters/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/golden-layout/.gitignore b/packages/golden-layout/.gitignore deleted file mode 100644 index d0753bd476..0000000000 --- a/packages/golden-layout/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules -.idea -npm-debug.log -.DS_Store -dist -css diff --git a/packages/grid/.gitignore b/packages/grid/.gitignore deleted file mode 100644 index 7005be7a6a..0000000000 --- a/packages/grid/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ - -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -node_modules - -# builds -build -dist -.rpt2_cache - -# misc -.DS_Store -.env -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/packages/icons/.gitignore b/packages/icons/.gitignore deleted file mode 100644 index 2746f089ba..0000000000 --- a/packages/icons/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.cssqq \ No newline at end of file diff --git a/packages/iris-grid/.gitignore b/packages/iris-grid/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/iris-grid/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/jsapi-bootstrap/.gitignore b/packages/jsapi-bootstrap/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/jsapi-bootstrap/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/jsapi-components/.gitignore b/packages/jsapi-components/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/jsapi-components/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/jsapi-shim/.gitignore b/packages/jsapi-shim/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/jsapi-shim/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/jsapi-types/.gitignore b/packages/jsapi-types/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/jsapi-types/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/jsapi-utils/.gitignore b/packages/jsapi-utils/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/jsapi-utils/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/log/.gitignore b/packages/log/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/log/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/mocks/.gitignore b/packages/mocks/.gitignore deleted file mode 100644 index ac9b5b414a..0000000000 --- a/packages/mocks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. -/node_modules diff --git a/packages/pouch-storage/.gitignore b/packages/pouch-storage/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/pouch-storage/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/prettier-config/.gitignore b/packages/prettier-config/.gitignore deleted file mode 100644 index ac9b5b414a..0000000000 --- a/packages/prettier-config/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. -/node_modules diff --git a/packages/react-hooks/.gitignore b/packages/react-hooks/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/react-hooks/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/redux/.gitignore b/packages/redux/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/redux/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/storage/.gitignore b/packages/storage/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/storage/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css diff --git a/packages/stylelint-config/.gitignore b/packages/stylelint-config/.gitignore deleted file mode 100644 index ac9b5b414a..0000000000 --- a/packages/stylelint-config/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. -/node_modules diff --git a/packages/tsconfig/.gitignore b/packages/tsconfig/.gitignore deleted file mode 100644 index ac9b5b414a..0000000000 --- a/packages/tsconfig/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. -/node_modules diff --git a/packages/utils/.gitignore b/packages/utils/.gitignore deleted file mode 100644 index 742a2cf9d2..0000000000 --- a/packages/utils/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build -/dist - -# misc -.vscode -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local -.project -.settings/ -.eslintcache -.stylelintcache - -/public/vs - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -src/**/*.css From d30430098361aa6c07f7bba39e43112dcafa7793 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Tue, 16 May 2023 13:24:10 -0500 Subject: [PATCH 10/10] build: Update to Vite 4.3.5 (#1279) Fixes #1209 Pulled the Vite dependency to the root since we use the same version in any apps like we do with TypeScript --- package-lock.json | 1339 ++++++++++++++--------------- package.json | 5 +- packages/code-studio/package.json | 4 +- packages/embed-chart/package.json | 4 +- packages/embed-grid/package.json | 4 +- 5 files changed, 655 insertions(+), 701 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39edaf9f6c..be5dd39e11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -92,6 +92,7 @@ "@types/react-window": "^1.8.5", "@types/shell-quote": "^1.7.1", "@types/shortid": "0.0.29", + "@vitejs/plugin-react-swc": "^3.3.0", "@vscode/codicons": "0.0.33", "chokidar-cli": "^2.1.0", "cross-env": "^7.0.2", @@ -122,7 +123,8 @@ "sass": "^1.39.0", "source-map-explorer": "^2.5.2", "stylelint": "^14.5.1", - "typescript": "~4.9.4" + "typescript": "~4.9.4", + "vite": "^4.3.5" }, "engines": { "node": ">=16", @@ -2108,9 +2110,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", - "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", + "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", "cpu": [ "arm" ], @@ -2124,9 +2126,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", - "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", + "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", "cpu": [ "arm64" ], @@ -2140,9 +2142,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", - "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", + "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", "cpu": [ "x64" ], @@ -2156,9 +2158,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", + "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", "cpu": [ "arm64" ], @@ -2172,9 +2174,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", - "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", + "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", "cpu": [ "x64" ], @@ -2188,9 +2190,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", - "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", + "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", "cpu": [ "arm64" ], @@ -2204,9 +2206,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", - "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", + "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", "cpu": [ "x64" ], @@ -2220,9 +2222,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", - "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", + "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", "cpu": [ "arm" ], @@ -2236,9 +2238,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", - "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", + "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", "cpu": [ "arm64" ], @@ -2252,9 +2254,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", - "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", + "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", "cpu": [ "ia32" ], @@ -2268,9 +2270,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", - "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", + "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", "cpu": [ "loong64" ], @@ -2284,9 +2286,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", - "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", + "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", "cpu": [ "mips64el" ], @@ -2300,9 +2302,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", - "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", + "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", "cpu": [ "ppc64" ], @@ -2316,9 +2318,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", - "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", + "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", "cpu": [ "riscv64" ], @@ -2332,9 +2334,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", - "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", + "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", "cpu": [ "s390x" ], @@ -2348,9 +2350,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", - "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", + "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", "cpu": [ "x64" ], @@ -2364,9 +2366,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", - "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", + "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", "cpu": [ "x64" ], @@ -2380,9 +2382,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", - "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", + "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", "cpu": [ "x64" ], @@ -2396,9 +2398,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", - "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", + "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", "cpu": [ "x64" ], @@ -2412,9 +2414,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", - "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", + "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", "cpu": [ "arm64" ], @@ -2428,9 +2430,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", - "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", + "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", "cpu": [ "ia32" ], @@ -2444,9 +2446,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", - "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", + "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", "cpu": [ "x64" ], @@ -5941,6 +5943,8 @@ "integrity": "sha512-AiEVehRFws//AiiLx9DPDp1WDXt+yAoGD1kMYewhoF6QLdTz8AtYu6i8j/yAxk26L8xnegy0CDwcNnub9qenyQ==", "dev": true, "hasInstallScript": true, + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -7206,6 +7210,223 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@vitejs/plugin-react-swc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.3.1.tgz", + "integrity": "sha512-ZoYjGxMniXP7X+5ry/W1tpY7w0OeLUEsBF5RHFPmAhpgwwNWie8OF4056MRXRi9QgvYYoZPDzdOXGK3wlCoTfQ==", + "dev": true, + "dependencies": { + "@swc/core": "^1.3.56" + }, + "peerDependencies": { + "vite": "^4" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.56.tgz", + "integrity": "sha512-yz/EeXT+PMZucUNrYceRUaTfuNS4IIu5EDZSOlvCEvm4jAmZi7CYH1B/kvzEzoAOzr7zkQiDPNJftcQXLkjbjA==", + "dev": true, + "hasInstallScript": true, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.56", + "@swc/core-darwin-x64": "1.3.56", + "@swc/core-linux-arm-gnueabihf": "1.3.56", + "@swc/core-linux-arm64-gnu": "1.3.56", + "@swc/core-linux-arm64-musl": "1.3.56", + "@swc/core-linux-x64-gnu": "1.3.56", + "@swc/core-linux-x64-musl": "1.3.56", + "@swc/core-win32-arm64-msvc": "1.3.56", + "@swc/core-win32-ia32-msvc": "1.3.56", + "@swc/core-win32-x64-msvc": "1.3.56" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-darwin-arm64": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.56.tgz", + "integrity": "sha512-DZcu7BzDaLEdWHabz9DRTP0yEBLqkrWmskFcD5BX0lGAvoIvE4duMnAqi5F2B3X7630QioHRCYFoRw2WkeE3Cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-darwin-x64": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.56.tgz", + "integrity": "sha512-VH5saqYFasdRXJy6RAT+MXm0+IjkMZvOkohJwUei+oA65cKJofQwrJ1jZro8yOJFYvUSI3jgNRGsdBkmo/4hMw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.56.tgz", + "integrity": "sha512-LWwPo6NnJkH01+ukqvkoNIOpMdw+Zundm4vBeicwyVrkP+mC3kwVfi03TUFpQUz3kRKdw/QEnxGTj+MouCPbtw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.56.tgz", + "integrity": "sha512-GzsUy/4egJ4cMlxbM+Ub7AMi5CKAc+pxBxrh8MUPQbyStW8jGgnQsJouTnGy0LHawtdEnsCOl6PcO6OgvktXuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.56.tgz", + "integrity": "sha512-9gxL09BIiAv8zY0DjfnFf19bo8+P4T9tdhzPwcm+1yPJcY5yr1+YFWLNFzz01agtOj6VlZ2/wUJTaOfdjjtc+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.56.tgz", + "integrity": "sha512-n0ORNknl50vMRkll3BDO1E4WOqY6iISlPV1ZQCRLWQ6YQ2q8/WAryBxc2OAybcGHBUFkxyACpJukeU1QZ/9tNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.56.tgz", + "integrity": "sha512-r+D34WLAOAlJtfw1gaVWpHRwCncU9nzW9i7w9kSw4HpWYnHJOz54jLGSEmNsrhdTCz1VK2ar+V2ktFUsrlGlDA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.56.tgz", + "integrity": "sha512-29Yt75Is6X24z3x8h/xZC1HnDPkPpyLH9mDQiM6Cuc0I9mVr1XSriPEUB2N/awf5IE4SA8c+3IVq1DtKWbkJIw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.56.tgz", + "integrity": "sha512-mplp0zbYDrcHtfvkniXlXdB04e2qIjz2Gq/XHKr4Rnc6xVORJjjXF91IemXKpavx2oZYJws+LNJL7UFQ8jyCdQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.56.tgz", + "integrity": "sha512-zp8MBnrw/bjdLenO/ifYzHrImSjKunqL0C2IF4LXYNRfcbYFh2NwobsVQMZ20IT0474lKRdlP8Oxdt+bHuXrzA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@vitejs/plugin-react-swc/node_modules/@swc/helpers": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", + "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@vscode/codicons": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@vscode/codicons/-/codicons-0.0.33.tgz", @@ -11181,6 +11402,43 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/esbuild": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", + "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.17.18", + "@esbuild/android-arm64": "0.17.18", + "@esbuild/android-x64": "0.17.18", + "@esbuild/darwin-arm64": "0.17.18", + "@esbuild/darwin-x64": "0.17.18", + "@esbuild/freebsd-arm64": "0.17.18", + "@esbuild/freebsd-x64": "0.17.18", + "@esbuild/linux-arm": "0.17.18", + "@esbuild/linux-arm64": "0.17.18", + "@esbuild/linux-ia32": "0.17.18", + "@esbuild/linux-loong64": "0.17.18", + "@esbuild/linux-mips64el": "0.17.18", + "@esbuild/linux-ppc64": "0.17.18", + "@esbuild/linux-riscv64": "0.17.18", + "@esbuild/linux-s390x": "0.17.18", + "@esbuild/linux-x64": "0.17.18", + "@esbuild/netbsd-x64": "0.17.18", + "@esbuild/openbsd-x64": "0.17.18", + "@esbuild/sunos-x64": "0.17.18", + "@esbuild/win32-arm64": "0.17.18", + "@esbuild/win32-ia32": "0.17.18", + "@esbuild/win32-x64": "0.17.18" + } + }, "node_modules/escalade": { "version": "3.1.1", "license": "MIT", @@ -18647,8 +18905,15 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.4", - "license": "MIT", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -21208,9 +21473,9 @@ } }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", + "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", "funding": [ { "type": "opencollective", @@ -21219,10 +21484,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -22731,6 +23000,22 @@ "inherits": "^2.0.1" } }, + "node_modules/rollup": { + "version": "3.21.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.5.tgz", + "integrity": "sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -25186,6 +25471,54 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/vite": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", + "dev": true, + "dependencies": { + "esbuild": "^0.17.5", + "postcss": "^8.4.23", + "rollup": "^3.21.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, "node_modules/vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", @@ -25924,21 +26257,7 @@ "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", - "autoprefixer": "^10.4.8", - "vite": "^4.1.4" - } - }, - "packages/code-studio/node_modules/@vitejs/plugin-react-swc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.2.0.tgz", - "integrity": "sha512-IcBoXL/mcH7JdQr/nfDlDwTdIaH8Rg7LpfQDF4nAht+juHWIuv6WhpKPCSfY4+zztAaB07qdBoFz1XCZsgo3pQ==", - "dev": true, - "dependencies": { - "@swc/core": "^1.3.35" - }, - "peerDependencies": { - "vite": "^4" + "autoprefixer": "^10.4.8" } }, "packages/code-studio/node_modules/autoprefixer": { @@ -25973,108 +26292,6 @@ "postcss": "^8.1.0" } }, - "packages/code-studio/node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "packages/code-studio/node_modules/rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "packages/code-studio/node_modules/vite": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz", - "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==", - "dev": true, - "dependencies": { - "esbuild": "^0.16.14", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, "packages/components": { "name": "@deephaven/components", "version": "0.39.0", @@ -26270,123 +26487,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", - "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", - "vite": "^4.1.4" - } - }, - "packages/embed-chart/node_modules/@vitejs/plugin-react-swc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.2.0.tgz", - "integrity": "sha512-IcBoXL/mcH7JdQr/nfDlDwTdIaH8Rg7LpfQDF4nAht+juHWIuv6WhpKPCSfY4+zztAaB07qdBoFz1XCZsgo3pQ==", - "dev": true, - "dependencies": { - "@swc/core": "^1.3.35" - }, - "peerDependencies": { - "vite": "^4" - } - }, - "packages/embed-chart/node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "packages/embed-chart/node_modules/rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "packages/embed-chart/node_modules/vite": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz", - "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==", - "dev": true, - "dependencies": { - "esbuild": "^0.16.14", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } + "@deephaven/tsconfig": "file:../tsconfig" } }, "packages/embed-grid": { @@ -26410,123 +26511,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", - "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", - "vite": "^4.1.4" - } - }, - "packages/embed-grid/node_modules/@vitejs/plugin-react-swc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.2.0.tgz", - "integrity": "sha512-IcBoXL/mcH7JdQr/nfDlDwTdIaH8Rg7LpfQDF4nAht+juHWIuv6WhpKPCSfY4+zztAaB07qdBoFz1XCZsgo3pQ==", - "dev": true, - "dependencies": { - "@swc/core": "^1.3.35" - }, - "peerDependencies": { - "vite": "^4" - } - }, - "packages/embed-grid/node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "packages/embed-grid/node_modules/rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "packages/embed-grid/node_modules/vite": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz", - "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==", - "dev": true, - "dependencies": { - "esbuild": "^0.16.14", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } + "@deephaven/tsconfig": "file:../tsconfig" } }, "packages/eslint-config": { @@ -28235,7 +28220,6 @@ "@deephaven/utils": "file:../utils", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/react-fontawesome": "^0.2.0", - "@vitejs/plugin-react-swc": "^3.2.0", "autoprefixer": "^10.4.8", "classnames": "^2.3.1", "event-target-shim": "^6.0.2", @@ -28256,19 +28240,9 @@ "react-transition-group": "^4.4.2", "redux": "^4.2.0", "redux-thunk": "^2.4.1", - "shortid": "^2.2.16", - "vite": "^4.1.4" + "shortid": "^2.2.16" }, "dependencies": { - "@vitejs/plugin-react-swc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.2.0.tgz", - "integrity": "sha512-IcBoXL/mcH7JdQr/nfDlDwTdIaH8Rg7LpfQDF4nAht+juHWIuv6WhpKPCSfY4+zztAaB07qdBoFz1XCZsgo3pQ==", - "dev": true, - "requires": { - "@swc/core": "^1.3.35" - } - }, "autoprefixer": { "version": "10.4.8", "dev": true, @@ -28280,58 +28254,6 @@ "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" } - }, - "esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "vite": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz", - "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==", - "dev": true, - "requires": { - "esbuild": "^0.16.14", - "fsevents": "~2.3.2", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - } } } }, @@ -28478,74 +28400,9 @@ "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", "fira": "mozilla/fira#4.202", "react": "^17.0.2", - "react-dom": "^17.0.2", - "vite": "^4.1.4" - }, - "dependencies": { - "@vitejs/plugin-react-swc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.2.0.tgz", - "integrity": "sha512-IcBoXL/mcH7JdQr/nfDlDwTdIaH8Rg7LpfQDF4nAht+juHWIuv6WhpKPCSfY4+zztAaB07qdBoFz1XCZsgo3pQ==", - "dev": true, - "requires": { - "@swc/core": "^1.3.35" - } - }, - "esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "vite": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz", - "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==", - "dev": true, - "requires": { - "esbuild": "^0.16.14", - "fsevents": "~2.3.2", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - } - } + "react-dom": "^17.0.2" } }, "@deephaven/embed-grid": { @@ -28563,74 +28420,9 @@ "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", "fira": "mozilla/fira#4.202", "react": "^17.0.2", - "react-dom": "^17.0.2", - "vite": "^4.1.4" - }, - "dependencies": { - "@vitejs/plugin-react-swc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.2.0.tgz", - "integrity": "sha512-IcBoXL/mcH7JdQr/nfDlDwTdIaH8Rg7LpfQDF4nAht+juHWIuv6WhpKPCSfY4+zztAaB07qdBoFz1XCZsgo3pQ==", - "dev": true, - "requires": { - "@swc/core": "^1.3.35" - } - }, - "esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "vite": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.4.tgz", - "integrity": "sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==", - "dev": true, - "requires": { - "esbuild": "^0.16.14", - "fsevents": "~2.3.2", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" - } - } + "react-dom": "^17.0.2" } }, "@deephaven/eslint-config": { @@ -28900,156 +28692,156 @@ } }, "@esbuild/android-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", - "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", + "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", - "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", + "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", - "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", + "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", + "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", - "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", + "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", - "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", + "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", - "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", + "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", - "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", + "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", - "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", + "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", - "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", + "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", - "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", + "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", - "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", + "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", - "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", + "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", - "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", + "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", - "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", + "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", - "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", + "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", - "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", + "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", - "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", + "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", - "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", + "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", - "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", + "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", - "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", + "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", - "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", + "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", "dev": true, "optional": true }, @@ -31711,6 +31503,8 @@ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.38.tgz", "integrity": "sha512-AiEVehRFws//AiiLx9DPDp1WDXt+yAoGD1kMYewhoF6QLdTz8AtYu6i8j/yAxk26L8xnegy0CDwcNnub9qenyQ==", "dev": true, + "optional": true, + "peer": true, "requires": { "@swc/core-darwin-arm64": "1.3.38", "@swc/core-darwin-x64": "1.3.38", @@ -32597,6 +32391,116 @@ } } }, + "@vitejs/plugin-react-swc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.3.1.tgz", + "integrity": "sha512-ZoYjGxMniXP7X+5ry/W1tpY7w0OeLUEsBF5RHFPmAhpgwwNWie8OF4056MRXRi9QgvYYoZPDzdOXGK3wlCoTfQ==", + "dev": true, + "requires": { + "@swc/core": "^1.3.56" + }, + "dependencies": { + "@swc/core": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.56.tgz", + "integrity": "sha512-yz/EeXT+PMZucUNrYceRUaTfuNS4IIu5EDZSOlvCEvm4jAmZi7CYH1B/kvzEzoAOzr7zkQiDPNJftcQXLkjbjA==", + "dev": true, + "requires": { + "@swc/core-darwin-arm64": "1.3.56", + "@swc/core-darwin-x64": "1.3.56", + "@swc/core-linux-arm-gnueabihf": "1.3.56", + "@swc/core-linux-arm64-gnu": "1.3.56", + "@swc/core-linux-arm64-musl": "1.3.56", + "@swc/core-linux-x64-gnu": "1.3.56", + "@swc/core-linux-x64-musl": "1.3.56", + "@swc/core-win32-arm64-msvc": "1.3.56", + "@swc/core-win32-ia32-msvc": "1.3.56", + "@swc/core-win32-x64-msvc": "1.3.56" + } + }, + "@swc/core-darwin-arm64": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.56.tgz", + "integrity": "sha512-DZcu7BzDaLEdWHabz9DRTP0yEBLqkrWmskFcD5BX0lGAvoIvE4duMnAqi5F2B3X7630QioHRCYFoRw2WkeE3Cw==", + "dev": true, + "optional": true + }, + "@swc/core-darwin-x64": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.56.tgz", + "integrity": "sha512-VH5saqYFasdRXJy6RAT+MXm0+IjkMZvOkohJwUei+oA65cKJofQwrJ1jZro8yOJFYvUSI3jgNRGsdBkmo/4hMw==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm-gnueabihf": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.56.tgz", + "integrity": "sha512-LWwPo6NnJkH01+ukqvkoNIOpMdw+Zundm4vBeicwyVrkP+mC3kwVfi03TUFpQUz3kRKdw/QEnxGTj+MouCPbtw==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-gnu": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.56.tgz", + "integrity": "sha512-GzsUy/4egJ4cMlxbM+Ub7AMi5CKAc+pxBxrh8MUPQbyStW8jGgnQsJouTnGy0LHawtdEnsCOl6PcO6OgvktXuQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-musl": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.56.tgz", + "integrity": "sha512-9gxL09BIiAv8zY0DjfnFf19bo8+P4T9tdhzPwcm+1yPJcY5yr1+YFWLNFzz01agtOj6VlZ2/wUJTaOfdjjtc+A==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-gnu": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.56.tgz", + "integrity": "sha512-n0ORNknl50vMRkll3BDO1E4WOqY6iISlPV1ZQCRLWQ6YQ2q8/WAryBxc2OAybcGHBUFkxyACpJukeU1QZ/9tNw==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-musl": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.56.tgz", + "integrity": "sha512-r+D34WLAOAlJtfw1gaVWpHRwCncU9nzW9i7w9kSw4HpWYnHJOz54jLGSEmNsrhdTCz1VK2ar+V2ktFUsrlGlDA==", + "dev": true, + "optional": true + }, + "@swc/core-win32-arm64-msvc": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.56.tgz", + "integrity": "sha512-29Yt75Is6X24z3x8h/xZC1HnDPkPpyLH9mDQiM6Cuc0I9mVr1XSriPEUB2N/awf5IE4SA8c+3IVq1DtKWbkJIw==", + "dev": true, + "optional": true + }, + "@swc/core-win32-ia32-msvc": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.56.tgz", + "integrity": "sha512-mplp0zbYDrcHtfvkniXlXdB04e2qIjz2Gq/XHKr4Rnc6xVORJjjXF91IemXKpavx2oZYJws+LNJL7UFQ8jyCdQ==", + "dev": true, + "optional": true + }, + "@swc/core-win32-x64-msvc": { + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.56.tgz", + "integrity": "sha512-zp8MBnrw/bjdLenO/ifYzHrImSjKunqL0C2IF4LXYNRfcbYFh2NwobsVQMZ20IT0474lKRdlP8Oxdt+bHuXrzA==", + "dev": true, + "optional": true + }, + "@swc/helpers": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", + "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "tslib": "^2.4.0" + } + } + } + }, "@vscode/codicons": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@vscode/codicons/-/codicons-0.0.33.tgz", @@ -35607,6 +35511,36 @@ "es6-symbol": "^3.1.1" } }, + "esbuild": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", + "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.17.18", + "@esbuild/android-arm64": "0.17.18", + "@esbuild/android-x64": "0.17.18", + "@esbuild/darwin-arm64": "0.17.18", + "@esbuild/darwin-x64": "0.17.18", + "@esbuild/freebsd-arm64": "0.17.18", + "@esbuild/freebsd-x64": "0.17.18", + "@esbuild/linux-arm": "0.17.18", + "@esbuild/linux-arm64": "0.17.18", + "@esbuild/linux-ia32": "0.17.18", + "@esbuild/linux-loong64": "0.17.18", + "@esbuild/linux-mips64el": "0.17.18", + "@esbuild/linux-ppc64": "0.17.18", + "@esbuild/linux-riscv64": "0.17.18", + "@esbuild/linux-s390x": "0.17.18", + "@esbuild/linux-x64": "0.17.18", + "@esbuild/netbsd-x64": "0.17.18", + "@esbuild/openbsd-x64": "0.17.18", + "@esbuild/sunos-x64": "0.17.18", + "@esbuild/win32-arm64": "0.17.18", + "@esbuild/win32-ia32": "0.17.18", + "@esbuild/win32-x64": "0.17.18" + } + }, "escalade": { "version": "3.1.1" }, @@ -40758,7 +40692,9 @@ "dev": true }, "nanoid": { - "version": "3.3.4" + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" }, "native-promise-only": { "version": "0.8.1" @@ -42623,11 +42559,11 @@ "version": "1.16.1" }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", + "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -43719,6 +43655,15 @@ "inherits": "^2.0.1" } }, + "rollup": { + "version": "3.21.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.5.tgz", + "integrity": "sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -45445,6 +45390,18 @@ "unist-util-stringify-position": "^2.0.0" } }, + "vite": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", + "dev": true, + "requires": { + "esbuild": "^0.17.5", + "fsevents": "~2.3.2", + "postcss": "^8.4.23", + "rollup": "^3.21.0" + } + }, "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", diff --git a/package.json b/package.json index 3c8c2356f8..c298e1dad5 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "clean:cache:eslint": "rimraf .eslintcache", "clean:cache:jest": "jest --clearCache", "clean:cache:nx": "nx clear-cache", + "clean:cache:vite": "rimraf **/node_modules/.vite", "clean:modules": "lerna clean --yes", "clean:types": "tsc --build --clean", "clean:root": "rimraf ./node_modules", @@ -102,6 +103,7 @@ "@types/react-window": "^1.8.5", "@types/shell-quote": "^1.7.1", "@types/shortid": "0.0.29", + "@vitejs/plugin-react-swc": "^3.3.0", "@vscode/codicons": "0.0.33", "chokidar-cli": "^2.1.0", "cross-env": "^7.0.2", @@ -132,7 +134,8 @@ "sass": "^1.39.0", "source-map-explorer": "^2.5.2", "stylelint": "^14.5.1", - "typescript": "~4.9.4" + "typescript": "~4.9.4", + "vite": "^4.3.5" }, "prettier": "@deephaven/prettier-config", "stylelint": { diff --git a/packages/code-studio/package.json b/packages/code-studio/package.json index 9c97533b97..a5a9e81158 100644 --- a/packages/code-studio/package.json +++ b/packages/code-studio/package.json @@ -80,9 +80,7 @@ "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", - "autoprefixer": "^10.4.8", - "vite": "^4.1.4" + "autoprefixer": "^10.4.8" }, "publishConfig": { "access": "public" diff --git a/packages/embed-chart/package.json b/packages/embed-chart/package.json index 4b9300db2a..79ef92bd54 100644 --- a/packages/embed-chart/package.json +++ b/packages/embed-chart/package.json @@ -38,9 +38,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", - "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", - "vite": "^4.1.4" + "@deephaven/tsconfig": "file:../tsconfig" }, "publishConfig": { "access": "public" diff --git a/packages/embed-grid/package.json b/packages/embed-grid/package.json index e75a7d9f9d..868e9259fe 100644 --- a/packages/embed-grid/package.json +++ b/packages/embed-grid/package.json @@ -38,9 +38,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", - "@deephaven/tsconfig": "file:../tsconfig", - "@vitejs/plugin-react-swc": "^3.2.0", - "vite": "^4.1.4" + "@deephaven/tsconfig": "file:../tsconfig" }, "publishConfig": { "access": "public"