@deephaven/iris-grid 0.85.9 → 0.85.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IrisGrid.d.ts +10 -3
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +36 -7
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridCellRendererUtils.d.ts.map +1 -1
- package/dist/IrisGridCellRendererUtils.js +13 -4
- package/dist/IrisGridCellRendererUtils.js.map +1 -1
- package/dist/IrisGridIcons.d.ts +1 -2
- package/dist/IrisGridIcons.d.ts.map +1 -1
- package/dist/IrisGridIcons.js +7 -8
- package/dist/IrisGridIcons.js.map +1 -1
- package/dist/IrisGridProxyModel.d.ts.map +1 -1
- package/dist/IrisGridProxyModel.js +2 -1
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridRenderer.d.ts +2 -2
- package/dist/IrisGridRenderer.d.ts.map +1 -1
- package/dist/IrisGridRenderer.js +26 -18
- package/dist/IrisGridRenderer.js.map +1 -1
- package/dist/IrisGridTextCellRenderer.d.ts +3 -2
- package/dist/IrisGridTextCellRenderer.d.ts.map +1 -1
- package/dist/IrisGridTextCellRenderer.js +3 -3
- package/dist/IrisGridTextCellRenderer.js.map +1 -1
- package/dist/IrisGridTheme.d.ts +9 -2
- package/dist/IrisGridTheme.d.ts.map +1 -1
- package/dist/IrisGridTheme.js +23 -4
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridThemeProvider.d.ts +6 -2
- package/dist/IrisGridThemeProvider.d.ts.map +1 -1
- package/dist/IrisGridThemeProvider.js +15 -4
- package/dist/IrisGridThemeProvider.js.map +1 -1
- package/dist/LazyIrisGrid.d.ts +2 -1
- package/dist/LazyIrisGrid.d.ts.map +1 -1
- package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js +1 -1
- package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridRenderer.js","names":["DEFAULT_FONT_WIDTH","GridRenderer","GridUtils","TableUtils","assertNotNull","getOrThrow","IrisGridTextCellRenderer","IrisGridDataBarCellRenderer","getIcon","ICON_NAMES","Object","freeze","SORT_UP","SORT_DOWN","CARET_DOWN","CARET_RIGHT","CELL_OVERFLOW","EXPAND_ICON_SIZE","IrisGridRenderer","constructor","arguments","_defineProperty","isFilterValid","advancedFilter","quickFilter","isAdvancedFilterValid","filter","isQuickFilterValid","getSortIcon","sort","direction","sortDirection","ascending","descending","drawCanvas","state","drawScrim","drawGrid","context","drawCellOverflowButton","drawGridLines","drawGroupedColumnLine","drawPendingRowLine","drawCellContent","column","row","metrics","model","modelColumns","modelRows","modelColumn","get","modelRow","undefined","renderType","renderTypeForCell","cellRenderer","getCellRenderer","getCellOverflowButtonPosition","_ref","mouseX","mouseY","theme","textCellRenderer","shouldRenderOverflowButton","left","buttonLeft","top","buttonTop","width","buttonWidth","height","buttonHeight","cellHorizontalPadding","overflowButtonColor","overflowButtonHoverColor","save","fillStyle","icon","translate","fill","restore","groupedColumns","maxY","allColumnWidths","allColumnXs","length","groupedColumnDividerColor","lastVisibleGroupColumnIndex","columnX","columnWidth","x","strokeStyle","lineWidth","beginPath","moveTo","lineTo","stroke","allRowYs","maxX","pendingRowCount","firstPendingRow","rowCount","floatingBottomRowCount","y","setLineDash","pendingTextColor","drawMouseColumnHover","hoverSelectColumn","linkerColumnHoverBackgroundColor","fillRect","drawMouseRowHover","isSelectingColumn","loadingScrimProgress","gridY","scrimBlurSize","scrimColor","globalCompositeOperation","concat","rect","clip","drawColumnHeaders","reverseType","columnHeaderHeight","drawFilterHeaders","hasReverse","REVERSE_TYPE","NONE","color","headerReverseBarColor","headerSortBarColor","drawHeaderBar","reverseHeaderBarHeight","sortHeaderBarHeight","barHeight","interior","offset","headerBarCasingColor","columnHeaderMaxDepth","drawColumnHeadersAtDepth","range","boundsProp","depth","isMenuShown","bounds","_objectSpread","drawColumnHeaderAtIndex","index","_model$columns$modelC","_fontWidths$get","gridX","fontWidths","headerHorizontalPadding","columnName","columns","name","getSortForColumn","text","textForColumnHeader","fontWidth","font","textWidth","textRight","defaultX","Math","min","yOffset","isFilterBarShown","quickFilters","advancedFilters","drawExpandedFilterHeaders","size","drawCollapsedFilterHeaders","filterBarHeight","visibleColumns","textAlign","filterBarExpandedActiveBackgroundColor","filterBarExpandedBackgroundColor","y1","filterBarSeparatorColor","i","isFilterable","x1","drawExpandedFilterHeader","filterBarExpandedActiveCellBackgroundColor","filterBarErrorColor","filterBarHorizontalPadding","headerColor","filterText","getFilterText","measureText","maxLength","substring","rectLeft","rectTop","rectWidth","rectHeight","strokeRect","textX","textY","fillText","headerSeparatorColor","filterBarCollapsedHeight","drawCollapsedFilterHeader","filterBarActiveColor","filterBarActiveBackgroundColor","drawRowFooters","floatingTopHeight","floatingBottomHeight","floatingRows","rowFooterWidth","horizontalBarHeight","verticalBarWidth","allRowHeights","floatingGridRowColor","floatingRowBackgroundColors","rowHoverBackgroundColor","mouseRow","getRowAtY","includes","rowHeight","rowY","textForRowFooter","getExpandButtonPosition","_ref2","NULL_POSITION","getCellInfoFromXY","max"],"sources":["../src/IrisGridRenderer.ts"],"sourcesContent":["/* eslint react/destructuring-assignment: \"off\" */\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-param-reassign: \"off\" */\nimport {\n BoundedAxisRange,\n Coordinate,\n DEFAULT_FONT_WIDTH,\n GridMetrics,\n GridRangeIndex,\n GridRenderer,\n GridRenderState,\n GridThemeType,\n GridUtils,\n VisibleIndex,\n} from '@deephaven/grid';\nimport type { dh } from '@deephaven/jsapi-types';\nimport { TableUtils, ReverseType } from '@deephaven/jsapi-utils';\nimport { assertNotNull, getOrThrow } from '@deephaven/utils';\nimport {\n ReadonlyAdvancedFilterMap,\n ReadonlyQuickFilterMap,\n AdvancedFilter,\n QuickFilter,\n} from './CommonTypes';\nimport { IrisGridThemeType } from './IrisGridTheme';\nimport IrisGridModel from './IrisGridModel';\nimport IrisGridTextCellRenderer from './IrisGridTextCellRenderer';\nimport IrisGridDataBarCellRenderer from './IrisGridDataBarCellRenderer';\nimport { getIcon } from './IrisGridIcons';\n\nconst ICON_NAMES = Object.freeze({\n SORT_UP: 'sortUp',\n SORT_DOWN: 'sortDown',\n CARET_DOWN: 'caretDown',\n CARET_RIGHT: 'caretRight',\n CELL_OVERFLOW: 'cellOverflow',\n});\n\nconst EXPAND_ICON_SIZE = 10;\n\nexport type IrisGridRenderState = GridRenderState & {\n model: IrisGridModel;\n theme: IrisGridThemeType;\n hoverSelectColumn: GridRangeIndex;\n isSelectingColumn: boolean;\n loadingScrimProgress: number;\n reverseType: ReverseType;\n isFilterBarShown: boolean;\n advancedFilters: ReadonlyAdvancedFilterMap;\n quickFilters: ReadonlyQuickFilterMap;\n isMenuShown: boolean;\n};\n/**\n * Handles rendering some of the Iris specific features, such as sorting icons, sort bar display\n * */\nexport class IrisGridRenderer extends GridRenderer {\n static isFilterValid(\n advancedFilter: AdvancedFilter | undefined | null,\n quickFilter: QuickFilter | undefined | null\n ): boolean {\n const isAdvancedFilterValid =\n advancedFilter == null || advancedFilter.filter != null;\n const isQuickFilterValid =\n quickFilter == null || quickFilter.filter != null;\n return isAdvancedFilterValid && isQuickFilterValid;\n }\n\n protected textCellRenderer = new IrisGridTextCellRenderer();\n\n protected dataBarCellRenderer = new IrisGridDataBarCellRenderer();\n\n getSortIcon(sort: dh.Sort | null): Path2D | null {\n if (!sort) {\n return null;\n }\n if (sort.direction === TableUtils.sortDirection.ascending) {\n return getIcon(ICON_NAMES.SORT_UP);\n }\n if (sort.direction === TableUtils.sortDirection.descending) {\n return getIcon(ICON_NAMES.SORT_DOWN);\n }\n return null;\n }\n\n drawCanvas(state: IrisGridRenderState): void {\n super.drawCanvas(state);\n\n this.drawScrim(state);\n }\n\n drawGrid(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n super.drawGrid(context, state);\n this.drawCellOverflowButton(state);\n }\n\n drawGridLines(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n super.drawGridLines(context, state);\n\n this.drawGroupedColumnLine(context, state);\n\n this.drawPendingRowLine(context, state);\n }\n\n drawCellContent(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n row: VisibleIndex\n ): void {\n const { metrics, model } = state;\n const { modelColumns, modelRows } = metrics;\n const modelColumn = modelColumns.get(column);\n const modelRow = getOrThrow(modelRows, row);\n if (modelColumn === undefined) {\n return;\n }\n\n const renderType = model.renderTypeForCell(modelColumn, modelRow);\n const cellRenderer = this.getCellRenderer(renderType);\n cellRenderer.drawCellContent(context, state, column, row);\n }\n\n getCellOverflowButtonPosition({\n mouseX,\n mouseY,\n metrics,\n theme,\n }: {\n mouseX: Coordinate | null;\n mouseY: Coordinate | null;\n metrics: GridMetrics | undefined;\n theme: GridThemeType;\n }): {\n left: Coordinate | null;\n top: Coordinate | null;\n width: number | null;\n height: number | null;\n } {\n return this.textCellRenderer.getCellOverflowButtonPosition(\n mouseX,\n mouseY,\n metrics,\n theme\n );\n }\n\n shouldRenderOverflowButton(state: IrisGridRenderState): boolean {\n return this.textCellRenderer.shouldRenderOverflowButton(state);\n }\n\n drawCellOverflowButton(state: IrisGridRenderState): void {\n const { context, mouseX, mouseY, theme } = state;\n if (mouseX == null || mouseY == null) return;\n\n if (!this.shouldRenderOverflowButton(state)) {\n return;\n }\n\n const {\n left: buttonLeft,\n top: buttonTop,\n width: buttonWidth,\n height: buttonHeight,\n } = this.getCellOverflowButtonPosition(state);\n\n const {\n cellHorizontalPadding,\n overflowButtonColor,\n overflowButtonHoverColor,\n } = theme;\n\n context.save();\n if (\n overflowButtonHoverColor != null &&\n buttonLeft != null &&\n buttonWidth != null &&\n buttonTop != null &&\n buttonHeight != null &&\n mouseX >= buttonLeft &&\n mouseX <= buttonLeft + buttonWidth &&\n mouseY >= buttonTop &&\n mouseY <= buttonTop + buttonHeight\n ) {\n context.fillStyle = overflowButtonHoverColor;\n } else if (overflowButtonColor != null) {\n context.fillStyle = overflowButtonColor;\n }\n const icon = getIcon(ICON_NAMES.CELL_OVERFLOW);\n if (buttonLeft != null && buttonTop != null) {\n context.translate(buttonLeft + cellHorizontalPadding, buttonTop + 2);\n }\n context.fill(icon);\n\n context.restore();\n }\n\n drawGroupedColumnLine(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, theme } = state;\n const { groupedColumns } = model;\n const { maxY, allColumnWidths, allColumnXs } = metrics;\n if (\n groupedColumns.length === 0 ||\n theme.groupedColumnDividerColor == null\n ) {\n return;\n }\n\n // This assumes that the engine puts the grouped columns at the start of the\n // model, so model and visible index match for grouped columns. If we ever\n // add freeze support for tree tables or allow moving the grouped columns,\n // this assumption may no longer hold true. If such a change occurs, we'll\n // need to revisit this since a single vertical divider may no longer make\n // sense.\n const lastVisibleGroupColumnIndex = groupedColumns.length - 1;\n\n const columnX = allColumnXs.get(lastVisibleGroupColumnIndex);\n const columnWidth = allColumnWidths.get(lastVisibleGroupColumnIndex);\n if (columnX == null || columnWidth == null) {\n return;\n }\n\n const x = columnX + columnWidth + 0.5;\n\n context.strokeStyle = theme.groupedColumnDividerColor;\n context.lineWidth = 1;\n context.beginPath();\n context.moveTo(x, 0);\n context.lineTo(x, maxY);\n context.stroke();\n }\n\n drawPendingRowLine(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, theme } = state;\n const { allRowYs, maxX } = metrics;\n const { pendingRowCount } = model;\n if (pendingRowCount <= 0) {\n return;\n }\n\n const firstPendingRow =\n model.rowCount - model.pendingRowCount - model.floatingBottomRowCount;\n let y = allRowYs.get(firstPendingRow);\n if (y == null) {\n return;\n }\n\n y -= 0.5;\n context.save();\n context.setLineDash([4, 2]);\n context.strokeStyle = theme.pendingTextColor;\n\n context.lineWidth = 1;\n context.beginPath();\n context.moveTo(0, y);\n context.lineTo(maxX, y);\n context.stroke();\n context.restore();\n }\n\n drawMouseColumnHover(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { theme, metrics, hoverSelectColumn } = state;\n if (\n hoverSelectColumn == null ||\n theme.linkerColumnHoverBackgroundColor == null\n ) {\n return;\n }\n\n const { allColumnWidths, allColumnXs, maxY } = metrics;\n\n const x = getOrThrow(allColumnXs, hoverSelectColumn);\n const columnWidth = getOrThrow(allColumnWidths, hoverSelectColumn);\n\n context.fillStyle = theme.linkerColumnHoverBackgroundColor;\n context.fillRect(x, 0, columnWidth, maxY);\n }\n\n drawMouseRowHover(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { isSelectingColumn } = state;\n if (!isSelectingColumn) {\n super.drawMouseRowHover(context, state);\n }\n }\n\n drawScrim(state: IrisGridRenderState): void {\n const { context, loadingScrimProgress, metrics, theme } = state;\n if (loadingScrimProgress == null) {\n return;\n }\n\n const { width, height, gridY } = metrics;\n const { scrimBlurSize, scrimColor } = theme;\n\n context.save();\n\n // Use global composite so we can change the underlying layer to grayscale\n context.globalCompositeOperation = 'color';\n context.filter = `blur(${scrimBlurSize}px)`;\n if (scrimColor != null) {\n context.fillStyle = scrimColor;\n }\n\n // Clip the path so the top edge is hard edge, bottom edge is soft/blurry\n context.beginPath();\n context.rect(0, gridY, width, height - gridY);\n context.clip();\n\n // Extend the edges beyond the clip area so they're hard edges\n context.fillRect(\n -scrimBlurSize,\n -scrimBlurSize + gridY,\n scrimBlurSize * 2 + width,\n (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress\n );\n\n // add an overlay of the scrim color to darken things a bit\n context.globalCompositeOperation = 'source-over';\n context.filter = `blur(${scrimBlurSize}px) opacity(15%)`;\n context.fillRect(\n -scrimBlurSize,\n -scrimBlurSize + gridY,\n scrimBlurSize * 2 + width,\n (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress\n );\n\n context.restore();\n }\n\n drawColumnHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n super.drawColumnHeaders(context, state);\n\n const { theme, metrics, model, reverseType } = state;\n const { columnHeaderHeight } = metrics;\n\n this.drawFilterHeaders(context, state);\n\n if (columnHeaderHeight <= 0) {\n return;\n }\n\n const { sort } = model;\n // if there is only one sort bar, it is interior to the header to save space\n if (sort.length === 1) {\n const hasReverse = reverseType !== TableUtils.REVERSE_TYPE.NONE;\n\n let color;\n if (hasReverse) {\n color = theme.headerReverseBarColor;\n } else {\n color = theme.headerSortBarColor;\n }\n this.drawHeaderBar(\n context,\n state,\n color,\n hasReverse ? theme.reverseHeaderBarHeight : theme.sortHeaderBarHeight\n );\n } else if (sort.length > 1) {\n // if there's multiple bars, the sort is interior to header\n // and the reverse claims space in the table\n if (\n // has table reverse\n reverseType !== TableUtils.REVERSE_TYPE.NONE\n ) {\n this.drawHeaderBar(\n context,\n state,\n theme.headerReverseBarColor,\n theme.reverseHeaderBarHeight,\n false\n );\n }\n this.drawHeaderBar(\n context,\n state,\n theme.headerSortBarColor,\n theme.sortHeaderBarHeight\n );\n }\n }\n\n drawHeaderBar(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n color: string | CanvasGradient | CanvasPattern,\n barHeight: number,\n interior = true\n ): void {\n const { theme, metrics, model } = state;\n const { columnHeaderHeight, width } = metrics;\n // Draw casing with 1 pixel above and below the bar,\n // 1px falls on the existing split between grid/headers\n // so don't need to be accounnted for in math elsewhere\n let offset = 0;\n if (!interior) {\n offset = barHeight;\n }\n context.fillStyle = theme.headerBarCasingColor;\n context.fillRect(\n 0,\n model.columnHeaderMaxDepth * columnHeaderHeight - barHeight - 2 + offset,\n width,\n barHeight + 2\n );\n\n context.fillStyle = color;\n context.fillRect(\n 0,\n model.columnHeaderMaxDepth * columnHeaderHeight - barHeight - 1 + offset,\n width,\n barHeight\n );\n }\n\n drawColumnHeadersAtDepth(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n range: BoundedAxisRange,\n boundsProp: { minX: number; maxX: number },\n depth: number\n ): void {\n const { metrics, model, isMenuShown } = state;\n const { columnHeaderMaxDepth } = model;\n const { width } = metrics;\n const bounds = {\n ...boundsProp,\n maxX:\n depth === columnHeaderMaxDepth - 1 && boundsProp.maxX === width\n ? width - (isMenuShown ? 0 : 30) // Account for the menu button\n : boundsProp.maxX,\n };\n super.drawColumnHeadersAtDepth(context, state, range, bounds, depth);\n }\n\n drawColumnHeaderAtIndex(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n index: VisibleIndex,\n bounds: { minX: number; maxX: number }\n ): void {\n super.drawColumnHeaderAtIndex(context, state, index, bounds);\n const { metrics, model, theme } = state;\n const {\n modelColumns,\n allColumnWidths,\n allColumnXs,\n gridX,\n columnHeaderHeight,\n fontWidths,\n } = metrics;\n\n const { headerHorizontalPadding } = theme;\n const columnWidth = getOrThrow(allColumnWidths, index, 0);\n const columnX = getOrThrow(allColumnXs, index) + gridX;\n const modelColumn = modelColumns.get(index);\n\n if (modelColumn == null) {\n return;\n }\n\n const columnName = model.columns[modelColumn]?.name;\n\n if (columnName == null) {\n return;\n }\n\n const sort = TableUtils.getSortForColumn(model.sort, columnName);\n\n if (!sort) {\n return;\n }\n\n const icon = this.getSortIcon(sort);\n if (!icon) {\n return;\n }\n\n const text = model.textForColumnHeader(modelColumn);\n if (text === undefined) {\n return;\n }\n\n const fontWidth = fontWidths.get(context.font) ?? DEFAULT_FONT_WIDTH;\n assertNotNull(fontWidth);\n const textWidth = text.length * fontWidth;\n const textRight = gridX + columnX + textWidth + headerHorizontalPadding;\n let { maxX } = bounds;\n maxX -= headerHorizontalPadding;\n const defaultX =\n gridX + columnX + columnWidth - headerHorizontalPadding - 1;\n\n const x = textRight > maxX ? textRight + 1 : Math.min(maxX, defaultX);\n const yOffset =\n sort.direction === TableUtils.sortDirection.ascending ? -6 : -12;\n const y = columnHeaderHeight * 0.5 + yOffset;\n\n context.save();\n\n context.beginPath();\n context.rect(columnX, 0, columnWidth, columnHeaderHeight);\n context.clip();\n\n context.fillStyle = theme.headerSortBarColor;\n context.translate(x, y);\n context.fill(icon);\n\n context.restore();\n }\n\n drawFilterHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { isFilterBarShown, quickFilters, advancedFilters } = state;\n\n if (isFilterBarShown) {\n this.drawExpandedFilterHeaders(context, state);\n } else if (\n (quickFilters != null && quickFilters.size > 0) ||\n (advancedFilters != null && advancedFilters.size > 0)\n ) {\n this.drawCollapsedFilterHeaders(context, state);\n }\n }\n\n drawExpandedFilterHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, theme, quickFilters, advancedFilters } = state;\n const { filterBarHeight } = theme;\n\n if (filterBarHeight <= 0) {\n return;\n }\n\n const {\n gridX,\n gridY,\n maxX,\n modelColumns,\n visibleColumns,\n allColumnWidths,\n allColumnXs,\n } = metrics;\n\n const columnHeaderHeight = gridY - filterBarHeight;\n\n context.save();\n\n context.font = theme.font;\n context.textAlign = 'left';\n\n if (\n (quickFilters != null && quickFilters.size > 0) ||\n (advancedFilters != null && advancedFilters.size > 0)\n ) {\n // fill style if a fiter is set on any column\n context.fillStyle = theme.filterBarExpandedActiveBackgroundColor;\n } else {\n // fill style with no filters set\n context.fillStyle = theme.filterBarExpandedBackgroundColor;\n }\n\n // Draw the background\n context.fillRect(gridX, columnHeaderHeight, maxX, filterBarHeight - 1);\n\n // Draw the bottom border\n context.fillStyle = theme.headerBarCasingColor;\n\n context.fillRect(gridX, columnHeaderHeight + filterBarHeight - 1, maxX, 1);\n\n // Draw the filter input boxes\n const y1 = columnHeaderHeight;\n context.strokeStyle = theme.filterBarSeparatorColor;\n context.beginPath();\n\n for (let i = 0; i < visibleColumns.length; i += 1) {\n const column = visibleColumns[i];\n const modelColumn = getOrThrow(modelColumns, column);\n const columnX = getOrThrow(allColumnXs, column);\n const columnWidth = getOrThrow(allColumnWidths, column);\n if (model.isFilterable(modelColumn) && columnWidth > 0) {\n const x1 = gridX + (columnX ?? 0);\n context.rect(x1 + 0.5, y1 + 0.5, columnWidth, filterBarHeight - 2); // 1 for the border, 1 for the casing\n }\n }\n context.stroke();\n\n for (let i = 0; i < visibleColumns.length; i += 1) {\n const column = visibleColumns[i];\n const columnWidth = getOrThrow(allColumnWidths, column);\n const columnX = getOrThrow(allColumnXs, column);\n const x = columnX + gridX;\n this.drawExpandedFilterHeader(context, state, column, x, columnWidth);\n }\n\n context.restore();\n }\n\n drawExpandedFilterHeader(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n columnX: Coordinate,\n columnWidth: number\n ): void {\n if (columnWidth <= 0) {\n return;\n }\n\n const { metrics, theme, quickFilters, advancedFilters } = state;\n const { modelColumns, gridY } = metrics;\n const {\n filterBarHeight,\n filterBarExpandedActiveCellBackgroundColor,\n filterBarErrorColor,\n filterBarHorizontalPadding,\n headerColor,\n } = theme;\n const columnHeaderHeight = gridY - filterBarHeight;\n const modelColumn = modelColumns.get(column);\n if (modelColumn === undefined) return;\n const quickFilter = quickFilters.get(modelColumn);\n const advancedFilter = advancedFilters.get(modelColumn);\n if (quickFilter == null && advancedFilter == null) {\n return;\n }\n\n let text = null;\n if (quickFilter != null) {\n const { text: filterText } = quickFilter;\n text = filterText;\n if (!text) {\n text = TableUtils.getFilterText(quickFilter.filter);\n }\n\n if (text != null) {\n const { fontWidths } = metrics;\n let fontWidth = fontWidths.get(context.font);\n if (fontWidth == null || fontWidth === 0) {\n fontWidth = context.measureText('8').width;\n if (!fontWidth) {\n fontWidth = 10;\n }\n }\n\n const maxLength =\n (columnWidth - filterBarHorizontalPadding * 2) / fontWidth;\n if (maxLength <= 0) {\n text = '';\n } else if (text.length > maxLength) {\n text = `${text.substring(0, maxLength - 1)}…`;\n }\n }\n }\n\n context.save();\n\n const isFilterValid = IrisGridRenderer.isFilterValid(\n advancedFilter,\n quickFilter\n );\n if (isFilterValid && filterBarExpandedActiveCellBackgroundColor != null) {\n // draw active filter background inside cell\n context.fillStyle = filterBarExpandedActiveCellBackgroundColor;\n context.fillRect(\n columnX + 1, // +1 left border\n columnHeaderHeight + 1, // +1 top border\n columnWidth - 1, // -1 right border\n filterBarHeight - 3 // -3 top, bottom border and bottom casing\n );\n } else if (filterBarErrorColor != null) {\n // draw error box inside cell\n context.fillStyle = filterBarErrorColor;\n context.lineWidth = 2;\n context.strokeStyle = filterBarErrorColor;\n // Because this is drawn with a strokeRect, we have to add/subtract half the,\n // linewidth from each side to make interior, in addition to accounting for any borders/casings\n const rectLeft = columnX + 2; // 1 for strokeRect, 1 for border\n const rectTop = columnHeaderHeight + 2; // 1 for strokeRect, 1 for border\n const rectWidth = columnWidth - 3; // for 2 border and 1 for strokeRect\n const rectHeight = filterBarHeight - 5; // -2 for strokeRect, -3 for top, bottom border and bottom casing\n context.strokeRect(rectLeft, rectTop, rectWidth, rectHeight);\n }\n\n if (text != null && text !== '') {\n const textX = columnX + filterBarHorizontalPadding;\n const textY = columnHeaderHeight + filterBarHeight * 0.5 + 1; // + 1 for border\n context.fillStyle = headerColor;\n context.fillText(text, textX, textY);\n }\n\n context.restore();\n }\n\n drawCollapsedFilterHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, theme } = state;\n const { headerSeparatorColor, filterBarCollapsedHeight } = theme;\n\n if (filterBarCollapsedHeight <= 0) {\n return;\n }\n\n const { gridX, gridY, maxX, visibleColumns, allColumnWidths, allColumnXs } =\n metrics;\n const columnHeaderHeight = gridY - filterBarCollapsedHeight;\n\n context.save();\n\n // Draw the background of the collapsed filter bar\n context.fillStyle = headerSeparatorColor;\n context.fillRect(gridX, columnHeaderHeight, maxX, filterBarCollapsedHeight);\n\n for (let i = 0; i < visibleColumns.length; i += 1) {\n const column = visibleColumns[i];\n const columnWidth = allColumnWidths.get(column);\n const columnX = allColumnXs.get(column);\n if (columnX != null && columnWidth != null) {\n const x = columnX + gridX;\n // draw the collapsed cells\n this.drawCollapsedFilterHeader(context, state, column, x, columnWidth);\n }\n }\n\n context.restore();\n }\n\n drawCollapsedFilterHeader(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n columnX: Coordinate,\n columnWidth: number\n ): void {\n if (columnWidth <= 0) {\n return;\n }\n\n const { metrics, theme, quickFilters, advancedFilters } = state;\n const { modelColumns, gridY } = metrics;\n const modelColumn = modelColumns.get(column);\n\n if (modelColumn === undefined) return;\n const quickFilter = quickFilters.get(modelColumn);\n const advancedFilter = advancedFilters.get(modelColumn);\n\n const {\n filterBarCollapsedHeight,\n filterBarActiveColor,\n filterBarActiveBackgroundColor,\n filterBarErrorColor,\n } = theme;\n\n context.save();\n\n const isFilterValid = IrisGridRenderer.isFilterValid(\n advancedFilter,\n quickFilter\n );\n\n if (\n filterBarActiveBackgroundColor != null &&\n quickFilter == null &&\n advancedFilter == null\n ) {\n context.fillStyle = filterBarActiveBackgroundColor;\n } else if (filterBarActiveColor != null && isFilterValid) {\n context.fillStyle = filterBarActiveColor;\n } else if (filterBarErrorColor != null) {\n context.fillStyle = filterBarErrorColor;\n }\n\n const x = columnX + 1; // for gap between columns\n const y = gridY - filterBarCollapsedHeight;\n const rectWidth = columnWidth - 1; // for gap between columns\n const rectHeight = filterBarCollapsedHeight - 1; // for casing bottom\n context.fillRect(x, y, rectWidth, rectHeight);\n\n context.restore();\n }\n\n drawRowFooters(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, mouseX, mouseY, theme } = state;\n const {\n gridY,\n gridX,\n maxX,\n modelRows,\n floatingTopHeight,\n floatingBottomHeight,\n floatingRows,\n rowFooterWidth,\n height,\n horizontalBarHeight,\n verticalBarWidth,\n allRowHeights,\n allRowYs,\n width,\n } = metrics;\n // Only draw the footers on the floating rows\n if (rowFooterWidth <= 0 || floatingRows.length === 0) {\n return;\n }\n\n const {\n cellHorizontalPadding,\n floatingGridRowColor,\n floatingRowBackgroundColors,\n headerColor,\n rowHoverBackgroundColor,\n } = theme;\n\n context.translate(gridX, gridY);\n\n context.beginPath();\n const x = Math.min(maxX, width - rowFooterWidth - verticalBarWidth - gridX);\n context.fillStyle = floatingRowBackgroundColors;\n if (floatingTopHeight > 0) {\n context.rect(x, 0, rowFooterWidth, floatingTopHeight);\n }\n if (floatingBottomHeight > 0) {\n context.rect(\n x,\n height - gridY - horizontalBarHeight - floatingBottomHeight,\n rowFooterWidth,\n floatingBottomHeight\n );\n }\n context.fill();\n\n const mouseRow =\n mouseX != null &&\n mouseY != null &&\n mouseX >= gridX &&\n mouseX <= maxX + rowFooterWidth\n ? GridUtils.getRowAtY(mouseY, metrics)\n : null;\n if (\n rowHoverBackgroundColor != null &&\n mouseRow !== null &&\n floatingRows.includes(mouseRow)\n ) {\n context.fillStyle = rowHoverBackgroundColor;\n const y = allRowYs.get(mouseRow);\n const rowHeight = allRowHeights.get(mouseRow);\n assertNotNull(y);\n assertNotNull(rowHeight);\n context.fillRect(x, y, rowFooterWidth, rowHeight);\n }\n\n context.beginPath();\n if (floatingGridRowColor != null) {\n context.strokeStyle = floatingGridRowColor;\n }\n if (floatingTopHeight > 0) {\n context.moveTo(x + 0.5, 0.5);\n context.lineTo(x + 0.5, floatingTopHeight - 0.5);\n }\n if (floatingBottomHeight > 0) {\n const y = height - gridY - horizontalBarHeight - floatingBottomHeight;\n context.moveTo(x - 0.5, y + 0.5);\n context.lineTo(x - 0.5, y + floatingBottomHeight - 0.5);\n }\n context.stroke();\n\n context.fillStyle = headerColor;\n context.textAlign = 'left';\n\n const textX = x + cellHorizontalPadding;\n for (let i = 0; i < floatingRows.length; i += 1) {\n const row = floatingRows[i];\n const rowHeight = allRowHeights.get(row);\n const rowY = allRowYs.get(row);\n const modelRow = modelRows.get(row);\n if (rowY != null && rowHeight != null && modelRow != null) {\n const textY = rowY + rowHeight * 0.5;\n context.fillText(model.textForRowFooter(modelRow), textX, textY);\n }\n }\n\n context.translate(-gridX, -gridY);\n }\n\n getExpandButtonPosition(\n {\n mouseX,\n mouseY,\n metrics,\n theme,\n }: {\n mouseX: Coordinate | null;\n mouseY: Coordinate | null;\n metrics: GridMetrics | undefined;\n theme: GridThemeType;\n },\n depth: number | null\n ): {\n left: Coordinate | null;\n top: Coordinate | null;\n width: number | null;\n height: number | null;\n } {\n const NULL_POSITION = { left: null, top: null, width: null, height: null };\n if (mouseX == null || mouseY == null || depth == null || !metrics) {\n return NULL_POSITION;\n }\n const { rowHeight, left, top } = GridUtils.getCellInfoFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n assertNotNull(left);\n assertNotNull(rowHeight);\n assertNotNull(top);\n const { cellHorizontalPadding } = theme;\n\n const width = EXPAND_ICON_SIZE + 2 * cellHorizontalPadding;\n\n const buttonLeft = Math.max(left + EXPAND_ICON_SIZE * depth, metrics.gridX);\n const buttonTop = metrics.gridY + top;\n\n return {\n left: buttonLeft,\n top: buttonTop,\n width,\n height: rowHeight,\n };\n }\n}\n\nexport default IrisGridRenderer;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA,SAGEA,kBAAkB,EAGlBC,YAAY,EAGZC,SAAS,QAEJ,iBAAiB;AAExB,SAASC,UAAU,QAAqB,wBAAwB;AAChE,SAASC,aAAa,EAAEC,UAAU,QAAQ,kBAAkB;AAAC,OAStDC,wBAAwB;AAAA,OACxBC,2BAA2B;AAAA,SACzBC,OAAO;AAEhB,IAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;EAC/BC,OAAO,EAAE,QAAQ;EACjBC,SAAS,EAAE,UAAU;EACrBC,UAAU,EAAE,WAAW;EACvBC,WAAW,EAAE,YAAY;EACzBC,aAAa,EAAE;AACjB,CAAC,CAAC;AAEF,IAAMC,gBAAgB,GAAG,EAAE;AAc3B;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,SAASjB,YAAY,CAAC;EAAAkB,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,2BAYpB,IAAIf,wBAAwB,CAAC,CAAC;IAAAe,eAAA,8BAE3B,IAAId,2B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|
|
1
|
+
{"version":3,"file":"IrisGridRenderer.js","names":["DEFAULT_FONT_WIDTH","GridRenderer","GridUtils","TableUtils","assertNotNull","getOrThrow","IrisGridTextCellRenderer","IrisGridDataBarCellRenderer","getIcon","ICON_NAMES","Object","freeze","SORT_UP","SORT_DOWN","CARET_DOWN","CARET_RIGHT","CELL_OVERFLOW","EXPAND_ICON_SIZE","IrisGridRenderer","constructor","arguments","_defineProperty","isFilterValid","advancedFilter","quickFilter","isAdvancedFilterValid","filter","isQuickFilterValid","getSortIcon","sort","size","direction","sortDirection","ascending","descending","drawCanvas","state","drawScrim","drawGrid","context","drawCellOverflowButton","drawGridLines","drawGroupedColumnLine","drawPendingRowLine","drawCellContent","column","row","metrics","model","modelColumns","modelRows","modelColumn","get","modelRow","undefined","renderType","renderTypeForCell","cellRenderer","getCellRenderer","getCellOverflowButtonPosition","_ref","mouseX","mouseY","theme","textCellRenderer","shouldRenderOverflowButton","left","buttonLeft","top","buttonTop","width","buttonWidth","height","buttonHeight","cellHorizontalPadding","overflowButtonColor","overflowButtonHoverColor","iconSize","save","fillStyle","icon","translate","fill","restore","groupedColumns","maxY","allColumnWidths","allColumnXs","length","groupedColumnDividerColor","lastVisibleGroupColumnIndex","columnX","columnWidth","x","strokeStyle","lineWidth","beginPath","moveTo","lineTo","stroke","allRowYs","maxX","pendingRowCount","firstPendingRow","rowCount","floatingBottomRowCount","y","setLineDash","pendingTextColor","drawMouseColumnHover","hoverSelectColumn","linkerColumnHoverBackgroundColor","fillRect","drawMouseRowHover","isSelectingColumn","loadingScrimProgress","gridY","scrimBlurSize","scrimColor","globalCompositeOperation","concat","rect","clip","drawColumnHeaders","reverseType","columnHeaderHeight","drawFilterHeaders","hasReverse","REVERSE_TYPE","NONE","color","headerReverseBarColor","headerSortBarColor","drawHeaderBar","reverseHeaderBarHeight","sortHeaderBarHeight","barHeight","interior","offset","headerBarCasingColor","columnHeaderMaxDepth","drawColumnHeadersAtDepth","range","boundsProp","depth","isMenuShown","bounds","_objectSpread","drawColumnHeaderAtIndex","index","_model$columns$modelC","_fontWidths$get","gridX","fontWidths","headerHorizontalPadding","themeIconSize","Math","round","columnName","columns","name","getSortForColumn","text","textForColumnHeader","fontWidth","font","textWidth","textRight","defaultX","min","isFilterBarShown","quickFilters","advancedFilters","drawExpandedFilterHeaders","drawCollapsedFilterHeaders","filterBarHeight","visibleColumns","filterBarFont","textAlign","filterBarExpandedActiveBackgroundColor","filterBarExpandedBackgroundColor","y1","filterBarSeparatorColor","i","isFilterable","x1","drawExpandedFilterHeader","filterBarExpandedActiveCellBackgroundColor","filterBarErrorColor","filterBarHorizontalPadding","headerColor","filterText","getFilterText","measureText","maxLength","substring","rectLeft","rectTop","rectWidth","rectHeight","strokeRect","textX","textY","fillText","headerSeparatorColor","filterBarCollapsedHeight","drawCollapsedFilterHeader","filterBarActiveColor","filterBarActiveBackgroundColor","drawRowFooters","floatingTopHeight","floatingBottomHeight","floatingRows","rowFooterWidth","horizontalBarHeight","verticalBarWidth","allRowHeights","floatingGridRowColor","floatingRowBackgroundColors","rowHoverBackgroundColor","mouseRow","getRowAtY","includes","rowHeight","rowY","textForRowFooter","getExpandButtonPosition","_ref2","NULL_POSITION","getCellInfoFromXY","max"],"sources":["../src/IrisGridRenderer.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport {\n BoundedAxisRange,\n Coordinate,\n DEFAULT_FONT_WIDTH,\n GridMetrics,\n GridRangeIndex,\n GridRenderer,\n GridRenderState,\n GridThemeType,\n GridUtils,\n VisibleIndex,\n} from '@deephaven/grid';\nimport type { dh } from '@deephaven/jsapi-types';\nimport { TableUtils, ReverseType } from '@deephaven/jsapi-utils';\nimport { assertNotNull, getOrThrow } from '@deephaven/utils';\nimport {\n ReadonlyAdvancedFilterMap,\n ReadonlyQuickFilterMap,\n AdvancedFilter,\n QuickFilter,\n} from './CommonTypes';\nimport { IrisGridThemeType } from './IrisGridTheme';\nimport IrisGridModel from './IrisGridModel';\nimport IrisGridTextCellRenderer from './IrisGridTextCellRenderer';\nimport IrisGridDataBarCellRenderer from './IrisGridDataBarCellRenderer';\nimport { getIcon } from './IrisGridIcons';\n\nconst ICON_NAMES = Object.freeze({\n SORT_UP: 'sortUp',\n SORT_DOWN: 'sortDown',\n CARET_DOWN: 'caretDown',\n CARET_RIGHT: 'caretRight',\n CELL_OVERFLOW: 'cellOverflow',\n});\n\nconst EXPAND_ICON_SIZE = 10;\n\nexport type IrisGridRenderState = GridRenderState & {\n model: IrisGridModel;\n theme: IrisGridThemeType;\n hoverSelectColumn: GridRangeIndex;\n isSelectingColumn: boolean;\n loadingScrimProgress: number;\n reverseType: ReverseType;\n isFilterBarShown: boolean;\n advancedFilters: ReadonlyAdvancedFilterMap;\n quickFilters: ReadonlyQuickFilterMap;\n isMenuShown: boolean;\n};\n/**\n * Handles rendering some of the Iris specific features, such as sorting icons, sort bar display\n * */\nexport class IrisGridRenderer extends GridRenderer {\n static isFilterValid(\n advancedFilter: AdvancedFilter | undefined | null,\n quickFilter: QuickFilter | undefined | null\n ): boolean {\n const isAdvancedFilterValid =\n advancedFilter == null || advancedFilter.filter != null;\n const isQuickFilterValid =\n quickFilter == null || quickFilter.filter != null;\n return isAdvancedFilterValid && isQuickFilterValid;\n }\n\n protected textCellRenderer = new IrisGridTextCellRenderer();\n\n protected dataBarCellRenderer = new IrisGridDataBarCellRenderer();\n\n getSortIcon(sort: dh.Sort | null, size: number): Path2D | null {\n if (!sort) {\n return null;\n }\n if (sort.direction === TableUtils.sortDirection.ascending) {\n return getIcon(ICON_NAMES.SORT_UP, size);\n }\n if (sort.direction === TableUtils.sortDirection.descending) {\n return getIcon(ICON_NAMES.SORT_DOWN, size);\n }\n return null;\n }\n\n drawCanvas(state: IrisGridRenderState): void {\n super.drawCanvas(state);\n\n this.drawScrim(state);\n }\n\n drawGrid(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n super.drawGrid(context, state);\n this.drawCellOverflowButton(state);\n }\n\n drawGridLines(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n super.drawGridLines(context, state);\n\n this.drawGroupedColumnLine(context, state);\n\n this.drawPendingRowLine(context, state);\n }\n\n drawCellContent(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n row: VisibleIndex\n ): void {\n const { metrics, model } = state;\n const { modelColumns, modelRows } = metrics;\n const modelColumn = modelColumns.get(column);\n const modelRow = getOrThrow(modelRows, row);\n if (modelColumn === undefined) {\n return;\n }\n\n const renderType = model.renderTypeForCell(modelColumn, modelRow);\n const cellRenderer = this.getCellRenderer(renderType);\n cellRenderer.drawCellContent(context, state, column, row);\n }\n\n getCellOverflowButtonPosition({\n mouseX,\n mouseY,\n metrics,\n theme,\n }: {\n mouseX: Coordinate | null;\n mouseY: Coordinate | null;\n metrics: GridMetrics | undefined;\n theme: IrisGridThemeType;\n }): {\n left: Coordinate | null;\n top: Coordinate | null;\n width: number | null;\n height: number | null;\n } {\n return this.textCellRenderer.getCellOverflowButtonPosition(\n mouseX,\n mouseY,\n metrics,\n theme\n );\n }\n\n shouldRenderOverflowButton(state: IrisGridRenderState): boolean {\n return this.textCellRenderer.shouldRenderOverflowButton(state);\n }\n\n drawCellOverflowButton(state: IrisGridRenderState): void {\n const { context, mouseX, mouseY, theme } = state;\n if (mouseX == null || mouseY == null) return;\n\n if (!this.shouldRenderOverflowButton(state)) {\n return;\n }\n\n const {\n left: buttonLeft,\n top: buttonTop,\n width: buttonWidth,\n height: buttonHeight,\n } = this.getCellOverflowButtonPosition(state);\n\n const {\n cellHorizontalPadding,\n overflowButtonColor,\n overflowButtonHoverColor,\n iconSize,\n } = theme;\n\n context.save();\n if (\n overflowButtonHoverColor != null &&\n buttonLeft != null &&\n buttonWidth != null &&\n buttonTop != null &&\n buttonHeight != null &&\n mouseX >= buttonLeft &&\n mouseX <= buttonLeft + buttonWidth &&\n mouseY >= buttonTop &&\n mouseY <= buttonTop + buttonHeight\n ) {\n context.fillStyle = overflowButtonHoverColor;\n } else if (overflowButtonColor != null) {\n context.fillStyle = overflowButtonColor;\n }\n const icon = getIcon(ICON_NAMES.CELL_OVERFLOW, iconSize);\n if (buttonLeft != null && buttonTop != null && buttonHeight != null) {\n context.translate(\n buttonLeft + cellHorizontalPadding,\n buttonTop + (buttonHeight - iconSize) / 2\n );\n }\n context.fill(icon);\n\n context.restore();\n }\n\n drawGroupedColumnLine(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, theme } = state;\n const { groupedColumns } = model;\n const { maxY, allColumnWidths, allColumnXs } = metrics;\n if (\n groupedColumns.length === 0 ||\n theme.groupedColumnDividerColor == null\n ) {\n return;\n }\n\n // This assumes that the engine puts the grouped columns at the start of the\n // model, so model and visible index match for grouped columns. If we ever\n // add freeze support for tree tables or allow moving the grouped columns,\n // this assumption may no longer hold true. If such a change occurs, we'll\n // need to revisit this since a single vertical divider may no longer make\n // sense.\n const lastVisibleGroupColumnIndex = groupedColumns.length - 1;\n\n const columnX = allColumnXs.get(lastVisibleGroupColumnIndex);\n const columnWidth = allColumnWidths.get(lastVisibleGroupColumnIndex);\n if (columnX == null || columnWidth == null) {\n return;\n }\n\n const x = columnX + columnWidth + 0.5;\n\n context.strokeStyle = theme.groupedColumnDividerColor;\n context.lineWidth = 1;\n context.beginPath();\n context.moveTo(x, 0);\n context.lineTo(x, maxY);\n context.stroke();\n }\n\n drawPendingRowLine(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, theme } = state;\n const { allRowYs, maxX } = metrics;\n const { pendingRowCount } = model;\n if (pendingRowCount <= 0) {\n return;\n }\n\n const firstPendingRow =\n model.rowCount - model.pendingRowCount - model.floatingBottomRowCount;\n let y = allRowYs.get(firstPendingRow);\n if (y == null) {\n return;\n }\n\n y -= 0.5;\n context.save();\n context.setLineDash([4, 2]);\n context.strokeStyle = theme.pendingTextColor;\n\n context.lineWidth = 1;\n context.beginPath();\n context.moveTo(0, y);\n context.lineTo(maxX, y);\n context.stroke();\n context.restore();\n }\n\n drawMouseColumnHover(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { theme, metrics, hoverSelectColumn } = state;\n if (\n hoverSelectColumn == null ||\n theme.linkerColumnHoverBackgroundColor == null\n ) {\n return;\n }\n\n const { allColumnWidths, allColumnXs, maxY } = metrics;\n\n const x = getOrThrow(allColumnXs, hoverSelectColumn);\n const columnWidth = getOrThrow(allColumnWidths, hoverSelectColumn);\n\n context.fillStyle = theme.linkerColumnHoverBackgroundColor;\n context.fillRect(x, 0, columnWidth, maxY);\n }\n\n drawMouseRowHover(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { isSelectingColumn } = state;\n if (!isSelectingColumn) {\n super.drawMouseRowHover(context, state);\n }\n }\n\n drawScrim(state: IrisGridRenderState): void {\n const { context, loadingScrimProgress, metrics, theme } = state;\n if (loadingScrimProgress == null) {\n return;\n }\n\n const { width, height, gridY } = metrics;\n const { scrimBlurSize, scrimColor } = theme;\n\n context.save();\n\n // Use global composite so we can change the underlying layer to grayscale\n context.globalCompositeOperation = 'color';\n context.filter = `blur(${scrimBlurSize}px)`;\n if (scrimColor != null) {\n context.fillStyle = scrimColor;\n }\n\n // Clip the path so the top edge is hard edge, bottom edge is soft/blurry\n context.beginPath();\n context.rect(0, gridY, width, height - gridY);\n context.clip();\n\n // Extend the edges beyond the clip area so they're hard edges\n context.fillRect(\n -scrimBlurSize,\n -scrimBlurSize + gridY,\n scrimBlurSize * 2 + width,\n (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress\n );\n\n // add an overlay of the scrim color to darken things a bit\n context.globalCompositeOperation = 'source-over';\n context.filter = `blur(${scrimBlurSize}px) opacity(15%)`;\n context.fillRect(\n -scrimBlurSize,\n -scrimBlurSize + gridY,\n scrimBlurSize * 2 + width,\n (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress\n );\n\n context.restore();\n }\n\n drawColumnHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n super.drawColumnHeaders(context, state);\n\n const { theme, metrics, model, reverseType } = state;\n const { columnHeaderHeight } = metrics;\n\n this.drawFilterHeaders(context, state);\n\n if (columnHeaderHeight <= 0) {\n return;\n }\n\n const { sort } = model;\n // if there is only one sort bar, it is interior to the header to save space\n if (sort.length === 1) {\n const hasReverse = reverseType !== TableUtils.REVERSE_TYPE.NONE;\n\n let color;\n if (hasReverse) {\n color = theme.headerReverseBarColor;\n } else {\n color = theme.headerSortBarColor;\n }\n this.drawHeaderBar(\n context,\n state,\n color,\n hasReverse ? theme.reverseHeaderBarHeight : theme.sortHeaderBarHeight\n );\n } else if (sort.length > 1) {\n // if there's multiple bars, the sort is interior to header\n // and the reverse claims space in the table\n if (\n // has table reverse\n reverseType !== TableUtils.REVERSE_TYPE.NONE\n ) {\n this.drawHeaderBar(\n context,\n state,\n theme.headerReverseBarColor,\n theme.reverseHeaderBarHeight,\n false\n );\n }\n this.drawHeaderBar(\n context,\n state,\n theme.headerSortBarColor,\n theme.sortHeaderBarHeight\n );\n }\n }\n\n drawHeaderBar(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n color: string | CanvasGradient | CanvasPattern,\n barHeight: number,\n interior = true\n ): void {\n const { theme, metrics, model } = state;\n const { columnHeaderHeight, width } = metrics;\n // Draw casing with 1 pixel above and below the bar,\n // 1px falls on the existing split between grid/headers\n // so don't need to be accounnted for in math elsewhere\n let offset = 0;\n if (!interior) {\n offset = barHeight;\n }\n context.fillStyle = theme.headerBarCasingColor;\n context.fillRect(\n 0,\n model.columnHeaderMaxDepth * columnHeaderHeight - barHeight - 2 + offset,\n width,\n barHeight + 2\n );\n\n context.fillStyle = color;\n context.fillRect(\n 0,\n model.columnHeaderMaxDepth * columnHeaderHeight - barHeight - 1 + offset,\n width,\n barHeight\n );\n }\n\n drawColumnHeadersAtDepth(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n range: BoundedAxisRange,\n boundsProp: { minX: number; maxX: number },\n depth: number\n ): void {\n const { metrics, model, isMenuShown, theme } = state;\n const { columnHeaderMaxDepth } = model;\n const { width } = metrics;\n const { columnHeaderHeight } = theme;\n const bounds = {\n ...boundsProp,\n maxX:\n depth === columnHeaderMaxDepth - 1 && boundsProp.maxX === width\n ? width - (isMenuShown ? 0 : columnHeaderHeight) // Account for the menu button\n : boundsProp.maxX,\n };\n super.drawColumnHeadersAtDepth(context, state, range, bounds, depth);\n }\n\n drawColumnHeaderAtIndex(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n index: VisibleIndex,\n bounds: { minX: number; maxX: number }\n ): void {\n super.drawColumnHeaderAtIndex(context, state, index, bounds);\n const { metrics, model, theme } = state;\n const {\n modelColumns,\n allColumnWidths,\n allColumnXs,\n gridX,\n columnHeaderHeight,\n fontWidths,\n } = metrics;\n\n const { headerHorizontalPadding, iconSize: themeIconSize } = theme;\n const iconSize = Math.round(themeIconSize * 0.75); // The vsTriangle icons are a bit bigger than we want\n const columnWidth = getOrThrow(allColumnWidths, index, 0);\n const columnX = getOrThrow(allColumnXs, index) + gridX;\n const modelColumn = modelColumns.get(index);\n\n if (modelColumn == null) {\n return;\n }\n\n const columnName = model.columns[modelColumn]?.name;\n\n if (columnName == null) {\n return;\n }\n\n const sort = TableUtils.getSortForColumn(model.sort, columnName);\n\n if (!sort) {\n return;\n }\n\n const icon = this.getSortIcon(sort, iconSize);\n if (!icon) {\n return;\n }\n\n const text = model.textForColumnHeader(modelColumn);\n if (text === undefined) {\n return;\n }\n\n const fontWidth = fontWidths.get(context.font) ?? DEFAULT_FONT_WIDTH;\n assertNotNull(fontWidth);\n const textWidth = text.length * fontWidth;\n const textRight = gridX + columnX + textWidth + headerHorizontalPadding;\n let { maxX } = bounds;\n maxX -= headerHorizontalPadding; // Right visible edge of the headers\n // Right edge of the column. The icon has its own horizontal padding\n const defaultX = gridX + columnX + columnWidth - iconSize;\n\n // If the text is partially off the screen, put the icon to the right of the text\n // else put it at the right edge of the column/grid (whichever is smaller)\n const x = textRight > maxX ? textRight + 1 : Math.min(maxX, defaultX);\n const y = (columnHeaderHeight - iconSize) * 0.5;\n\n context.save();\n\n context.beginPath();\n context.rect(columnX, 0, columnWidth, columnHeaderHeight);\n context.clip();\n\n context.fillStyle = theme.headerSortBarColor;\n context.translate(x, y);\n context.fill(icon);\n\n context.restore();\n }\n\n drawFilterHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { isFilterBarShown, quickFilters, advancedFilters } = state;\n\n if (isFilterBarShown) {\n this.drawExpandedFilterHeaders(context, state);\n } else if (\n (quickFilters != null && quickFilters.size > 0) ||\n (advancedFilters != null && advancedFilters.size > 0)\n ) {\n this.drawCollapsedFilterHeaders(context, state);\n }\n }\n\n drawExpandedFilterHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, theme, quickFilters, advancedFilters } = state;\n const { filterBarHeight } = theme;\n\n if (filterBarHeight <= 0) {\n return;\n }\n\n const {\n gridX,\n gridY,\n maxX,\n modelColumns,\n visibleColumns,\n allColumnWidths,\n allColumnXs,\n } = metrics;\n\n const columnHeaderHeight = gridY - filterBarHeight;\n\n context.save();\n\n context.font = theme.filterBarFont;\n context.textAlign = 'left';\n\n if (\n (quickFilters != null && quickFilters.size > 0) ||\n (advancedFilters != null && advancedFilters.size > 0)\n ) {\n // fill style if a fiter is set on any column\n context.fillStyle = theme.filterBarExpandedActiveBackgroundColor;\n } else {\n // fill style with no filters set\n context.fillStyle = theme.filterBarExpandedBackgroundColor;\n }\n\n // Draw the background\n context.fillRect(gridX, columnHeaderHeight, maxX, filterBarHeight - 1);\n\n // Draw the bottom border\n context.fillStyle = theme.headerBarCasingColor;\n\n context.fillRect(gridX, columnHeaderHeight + filterBarHeight - 1, maxX, 1);\n\n // Draw the filter input boxes\n const y1 = columnHeaderHeight;\n context.strokeStyle = theme.filterBarSeparatorColor;\n context.beginPath();\n\n for (let i = 0; i < visibleColumns.length; i += 1) {\n const column = visibleColumns[i];\n const modelColumn = getOrThrow(modelColumns, column);\n const columnX = getOrThrow(allColumnXs, column);\n const columnWidth = getOrThrow(allColumnWidths, column);\n if (model.isFilterable(modelColumn) && columnWidth > 0) {\n const x1 = gridX + (columnX ?? 0);\n context.rect(x1 + 0.5, y1 + 0.5, columnWidth, filterBarHeight - 2); // 1 for the border, 1 for the casing\n }\n }\n context.stroke();\n\n for (let i = 0; i < visibleColumns.length; i += 1) {\n const column = visibleColumns[i];\n const columnWidth = getOrThrow(allColumnWidths, column);\n const columnX = getOrThrow(allColumnXs, column);\n const x = columnX + gridX;\n this.drawExpandedFilterHeader(context, state, column, x, columnWidth);\n }\n\n context.restore();\n }\n\n drawExpandedFilterHeader(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n columnX: Coordinate,\n columnWidth: number\n ): void {\n if (columnWidth <= 0) {\n return;\n }\n\n const { metrics, theme, quickFilters, advancedFilters } = state;\n const { modelColumns, gridY } = metrics;\n const {\n filterBarHeight,\n filterBarExpandedActiveCellBackgroundColor,\n filterBarErrorColor,\n filterBarHorizontalPadding,\n headerColor,\n } = theme;\n const columnHeaderHeight = gridY - filterBarHeight;\n const modelColumn = modelColumns.get(column);\n if (modelColumn === undefined) return;\n const quickFilter = quickFilters.get(modelColumn);\n const advancedFilter = advancedFilters.get(modelColumn);\n if (quickFilter == null && advancedFilter == null) {\n return;\n }\n\n let text = null;\n if (quickFilter != null) {\n const { text: filterText } = quickFilter;\n text = filterText;\n if (!text) {\n text = TableUtils.getFilterText(quickFilter.filter);\n }\n\n if (text != null) {\n const { fontWidths } = metrics;\n let fontWidth = fontWidths.get(context.font);\n if (fontWidth == null || fontWidth === 0) {\n fontWidth = context.measureText('8').width;\n if (!fontWidth) {\n fontWidth = 10;\n }\n }\n\n const maxLength =\n (columnWidth - filterBarHorizontalPadding * 2) / fontWidth;\n if (maxLength <= 0) {\n text = '';\n } else if (text.length > maxLength) {\n text = `${text.substring(0, maxLength - 1)}…`;\n }\n }\n }\n\n context.save();\n\n const isFilterValid = IrisGridRenderer.isFilterValid(\n advancedFilter,\n quickFilter\n );\n if (isFilterValid && filterBarExpandedActiveCellBackgroundColor != null) {\n // draw active filter background inside cell\n context.fillStyle = filterBarExpandedActiveCellBackgroundColor;\n context.fillRect(\n columnX + 1, // +1 left border\n columnHeaderHeight + 1, // +1 top border\n columnWidth - 1, // -1 right border\n filterBarHeight - 3 // -3 top, bottom border and bottom casing\n );\n } else if (filterBarErrorColor != null) {\n // draw error box inside cell\n context.fillStyle = filterBarErrorColor;\n context.lineWidth = 2;\n context.strokeStyle = filterBarErrorColor;\n // Because this is drawn with a strokeRect, we have to add/subtract half the,\n // linewidth from each side to make interior, in addition to accounting for any borders/casings\n const rectLeft = columnX + 2; // 1 for strokeRect, 1 for border\n const rectTop = columnHeaderHeight + 2; // 1 for strokeRect, 1 for border\n const rectWidth = columnWidth - 3; // for 2 border and 1 for strokeRect\n const rectHeight = filterBarHeight - 5; // -2 for strokeRect, -3 for top, bottom border and bottom casing\n context.strokeRect(rectLeft, rectTop, rectWidth, rectHeight);\n }\n\n if (text != null && text !== '') {\n const textX = columnX + filterBarHorizontalPadding;\n const textY = columnHeaderHeight + filterBarHeight * 0.5 + 1; // + 1 for border\n context.fillStyle = headerColor;\n context.fillText(text, textX, textY);\n }\n\n context.restore();\n }\n\n drawCollapsedFilterHeaders(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, theme } = state;\n const { headerSeparatorColor, filterBarCollapsedHeight } = theme;\n\n if (filterBarCollapsedHeight <= 0) {\n return;\n }\n\n const { gridX, gridY, maxX, visibleColumns, allColumnWidths, allColumnXs } =\n metrics;\n const columnHeaderHeight = gridY - filterBarCollapsedHeight;\n\n context.save();\n\n // Draw the background of the collapsed filter bar\n context.fillStyle = headerSeparatorColor;\n context.fillRect(gridX, columnHeaderHeight, maxX, filterBarCollapsedHeight);\n\n for (let i = 0; i < visibleColumns.length; i += 1) {\n const column = visibleColumns[i];\n const columnWidth = allColumnWidths.get(column);\n const columnX = allColumnXs.get(column);\n if (columnX != null && columnWidth != null) {\n const x = columnX + gridX;\n // draw the collapsed cells\n this.drawCollapsedFilterHeader(context, state, column, x, columnWidth);\n }\n }\n\n context.restore();\n }\n\n drawCollapsedFilterHeader(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n columnX: Coordinate,\n columnWidth: number\n ): void {\n if (columnWidth <= 0) {\n return;\n }\n\n const { metrics, theme, quickFilters, advancedFilters } = state;\n const { modelColumns, gridY } = metrics;\n const modelColumn = modelColumns.get(column);\n\n if (modelColumn === undefined) return;\n const quickFilter = quickFilters.get(modelColumn);\n const advancedFilter = advancedFilters.get(modelColumn);\n\n const {\n filterBarCollapsedHeight,\n filterBarActiveColor,\n filterBarActiveBackgroundColor,\n filterBarErrorColor,\n } = theme;\n\n context.save();\n\n const isFilterValid = IrisGridRenderer.isFilterValid(\n advancedFilter,\n quickFilter\n );\n\n if (\n filterBarActiveBackgroundColor != null &&\n quickFilter == null &&\n advancedFilter == null\n ) {\n context.fillStyle = filterBarActiveBackgroundColor;\n } else if (filterBarActiveColor != null && isFilterValid) {\n context.fillStyle = filterBarActiveColor;\n } else if (filterBarErrorColor != null) {\n context.fillStyle = filterBarErrorColor;\n }\n\n const x = columnX + 1; // for gap between columns\n const y = gridY - filterBarCollapsedHeight;\n const rectWidth = columnWidth - 1; // for gap between columns\n const rectHeight = filterBarCollapsedHeight - 1; // for casing bottom\n context.fillRect(x, y, rectWidth, rectHeight);\n\n context.restore();\n }\n\n drawRowFooters(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState\n ): void {\n const { metrics, model, mouseX, mouseY, theme } = state;\n const {\n gridY,\n gridX,\n maxX,\n modelRows,\n floatingTopHeight,\n floatingBottomHeight,\n floatingRows,\n rowFooterWidth,\n height,\n horizontalBarHeight,\n verticalBarWidth,\n allRowHeights,\n allRowYs,\n width,\n } = metrics;\n // Only draw the footers on the floating rows\n if (rowFooterWidth <= 0 || floatingRows.length === 0) {\n return;\n }\n\n const {\n cellHorizontalPadding,\n floatingGridRowColor,\n floatingRowBackgroundColors,\n headerColor,\n rowHoverBackgroundColor,\n } = theme;\n\n context.translate(gridX, gridY);\n\n context.beginPath();\n const x = Math.min(maxX, width - rowFooterWidth - verticalBarWidth - gridX);\n context.fillStyle = floatingRowBackgroundColors;\n if (floatingTopHeight > 0) {\n context.rect(x, 0, rowFooterWidth, floatingTopHeight);\n }\n if (floatingBottomHeight > 0) {\n context.rect(\n x,\n height - gridY - horizontalBarHeight - floatingBottomHeight,\n rowFooterWidth,\n floatingBottomHeight\n );\n }\n context.fill();\n\n const mouseRow =\n mouseX != null &&\n mouseY != null &&\n mouseX >= gridX &&\n mouseX <= maxX + rowFooterWidth\n ? GridUtils.getRowAtY(mouseY, metrics)\n : null;\n if (\n rowHoverBackgroundColor != null &&\n mouseRow !== null &&\n floatingRows.includes(mouseRow)\n ) {\n context.fillStyle = rowHoverBackgroundColor;\n const y = allRowYs.get(mouseRow);\n const rowHeight = allRowHeights.get(mouseRow);\n assertNotNull(y);\n assertNotNull(rowHeight);\n context.fillRect(x, y, rowFooterWidth, rowHeight);\n }\n\n context.beginPath();\n if (floatingGridRowColor != null) {\n context.strokeStyle = floatingGridRowColor;\n }\n if (floatingTopHeight > 0) {\n context.moveTo(x + 0.5, 0.5);\n context.lineTo(x + 0.5, floatingTopHeight - 0.5);\n }\n if (floatingBottomHeight > 0) {\n const y = height - gridY - horizontalBarHeight - floatingBottomHeight;\n context.moveTo(x - 0.5, y + 0.5);\n context.lineTo(x - 0.5, y + floatingBottomHeight - 0.5);\n }\n context.stroke();\n\n context.fillStyle = headerColor;\n context.textAlign = 'left';\n\n const textX = x + cellHorizontalPadding;\n for (let i = 0; i < floatingRows.length; i += 1) {\n const row = floatingRows[i];\n const rowHeight = allRowHeights.get(row);\n const rowY = allRowYs.get(row);\n const modelRow = modelRows.get(row);\n if (rowY != null && rowHeight != null && modelRow != null) {\n const textY = rowY + rowHeight * 0.5;\n context.fillText(model.textForRowFooter(modelRow), textX, textY);\n }\n }\n\n context.translate(-gridX, -gridY);\n }\n\n getExpandButtonPosition(\n {\n mouseX,\n mouseY,\n metrics,\n theme,\n }: {\n mouseX: Coordinate | null;\n mouseY: Coordinate | null;\n metrics: GridMetrics | undefined;\n theme: GridThemeType;\n },\n depth: number | null\n ): {\n left: Coordinate | null;\n top: Coordinate | null;\n width: number | null;\n height: number | null;\n } {\n const NULL_POSITION = { left: null, top: null, width: null, height: null };\n if (mouseX == null || mouseY == null || depth == null || !metrics) {\n return NULL_POSITION;\n }\n const { rowHeight, left, top } = GridUtils.getCellInfoFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n assertNotNull(left);\n assertNotNull(rowHeight);\n assertNotNull(top);\n const { cellHorizontalPadding } = theme;\n\n const width = EXPAND_ICON_SIZE + 2 * cellHorizontalPadding;\n\n const buttonLeft = Math.max(left + EXPAND_ICON_SIZE * depth, metrics.gridX);\n const buttonTop = metrics.gridY + top;\n\n return {\n left: buttonLeft,\n top: buttonTop,\n width,\n height: rowHeight,\n };\n }\n}\n\nexport default IrisGridRenderer;\n"],"mappings":";;;;;AAAA;AACA,SAGEA,kBAAkB,EAGlBC,YAAY,EAGZC,SAAS,QAEJ,iBAAiB;AAExB,SAASC,UAAU,QAAqB,wBAAwB;AAChE,SAASC,aAAa,EAAEC,UAAU,QAAQ,kBAAkB;AAAC,OAStDC,wBAAwB;AAAA,OACxBC,2BAA2B;AAAA,SACzBC,OAAO;AAEhB,IAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;EAC/BC,OAAO,EAAE,QAAQ;EACjBC,SAAS,EAAE,UAAU;EACrBC,UAAU,EAAE,WAAW;EACvBC,WAAW,EAAE,YAAY;EACzBC,aAAa,EAAE;AACjB,CAAC,CAAC;AAEF,IAAMC,gBAAgB,GAAG,EAAE;AAc3B;AACA;AACA;AAC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K;IAEvC,IAAMO,KAAK,GAAGrD,gBAAgB,GAAG,CAAC,GAAGyD,qBAAqB;IAE1D,IAAMP,UAAU,GAAGyF,IAAI,CAAC0E,GAAG,CAACpK,IAAI,GAAGjD,gBAAgB,GAAG+H,KAAK,EAAEjG,OAAO,CAACyG,KAAK,CAAC;IAC3E,IAAMnF,SAAS,GAAGtB,OAAO,CAACqE,KAAK,GAAGhD,GAAG;IAErC,OAAO;MACLF,IAAI,EAAEC,UAAU;MAChBC,GAAG,EAAEC,SAAS;MACdC,KAAK;MACLE,MAAM,EAAEuJ;IACV,CAAC;EACH;AACF;AAEA,eAAe7M,gBAAgB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BoxCoordinates, Coordinate, GridMetrics,
|
|
1
|
+
import { BoxCoordinates, Coordinate, GridMetrics, TextCellRenderer, VisibleIndex } from '@deephaven/grid';
|
|
2
2
|
import { IrisGridRenderState } from './IrisGridRenderer';
|
|
3
|
+
import type { IrisGridThemeType } from './IrisGridTheme';
|
|
3
4
|
declare class IrisGridTextCellRenderer extends TextCellRenderer {
|
|
4
5
|
drawCellContent(context: CanvasRenderingContext2D, state: IrisGridRenderState, column: VisibleIndex, row: VisibleIndex): void;
|
|
5
6
|
getTextRenderMetrics(state: IrisGridRenderState, column: VisibleIndex, row: VisibleIndex): {
|
|
@@ -7,7 +8,7 @@ declare class IrisGridTextCellRenderer extends TextCellRenderer {
|
|
|
7
8
|
x: Coordinate;
|
|
8
9
|
y: Coordinate;
|
|
9
10
|
};
|
|
10
|
-
getCellOverflowButtonPosition(mouseX: Coordinate | null, mouseY: Coordinate | null, metrics: GridMetrics | undefined, theme:
|
|
11
|
+
getCellOverflowButtonPosition(mouseX: Coordinate | null, mouseY: Coordinate | null, metrics: GridMetrics | undefined, theme: IrisGridThemeType): {
|
|
11
12
|
left: Coordinate | null;
|
|
12
13
|
top: Coordinate | null;
|
|
13
14
|
width: number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridTextCellRenderer.d.ts","sourceRoot":"","sources":["../src/IrisGridTextCellRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,UAAU,EAGV,WAAW,
|
|
1
|
+
{"version":3,"file":"IrisGridTextCellRenderer.d.ts","sourceRoot":"","sources":["../src/IrisGridTextCellRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,UAAU,EAGV,WAAW,EAEX,gBAAgB,EAChB,YAAY,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,cAAM,wBAAyB,SAAQ,gBAAgB;IACrD,eAAe,CACb,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,YAAY,GAChB,IAAI;IAuBP,oBAAoB,CAClB,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,YAAY,GAChB;QACD,KAAK,EAAE,MAAM,CAAC;QACd,CAAC,EAAE,UAAU,CAAC;QACd,CAAC,EAAE,UAAU,CAAC;KACf;IA6BD,6BAA6B,CAC3B,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,KAAK,EAAE,iBAAiB,GACvB;QACD,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;QACxB,GAAG,EAAE,UAAU,GAAG,IAAI,CAAC;QACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IA+BD,0BAA0B,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO;IA6C/D,cAAc,CACZ,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,OAAO,GAClB,IAAI;CAWR;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable class-methods-use-this */
|
|
2
2
|
import { DEFAULT_FONT_WIDTH, getOrThrow, GridUtils, TextCellRenderer } from '@deephaven/grid';
|
|
3
3
|
import { TableUtils } from '@deephaven/jsapi-utils';
|
|
4
|
-
import { ICON_SIZE } from "./IrisGridIcons.js";
|
|
5
4
|
import IrisGridCellRendererUtils from "./IrisGridCellRendererUtils.js";
|
|
6
5
|
class IrisGridTextCellRenderer extends TextCellRenderer {
|
|
7
6
|
drawCellContent(context, state, column, row) {
|
|
@@ -83,9 +82,10 @@ class IrisGridTextCellRenderer extends TextCellRenderer {
|
|
|
83
82
|
verticalBarWidth
|
|
84
83
|
} = metrics;
|
|
85
84
|
var {
|
|
86
|
-
cellHorizontalPadding
|
|
85
|
+
cellHorizontalPadding,
|
|
86
|
+
iconSize
|
|
87
87
|
} = theme;
|
|
88
|
-
var width =
|
|
88
|
+
var width = iconSize + 2 * cellHorizontalPadding;
|
|
89
89
|
var height = rowHeight;
|
|
90
90
|
// Right edge of column or of visible grid, whichever is smaller
|
|
91
91
|
var right = Math.min(metrics.gridX + left + columnWidth, gridWidth - verticalBarWidth);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridTextCellRenderer.js","names":["DEFAULT_FONT_WIDTH","getOrThrow","GridUtils","TextCellRenderer","TableUtils","ICON_SIZE","IrisGridCellRendererUtils","IrisGridTextCellRenderer","drawCellContent","context","state","column","row","_model$columns$modelC","metrics","model","modelColumns","modelRows","modelRow","modelColumn","get","undefined","value","valueForCell","isTextType","columns","type","originalFont","font","concat","getTextRenderMetrics","textMetrics","mouseX","mouseY","theme","mouseColumn","mouseRow","getGridPointFromXY","left","getCellOverflowButtonPosition","shouldRenderOverflowButton","width","gridX","x","NULL_POSITION","top","height","rowHeight","columnWidth","getCellInfoFromXY","gridWidth","verticalBarWidth","cellHorizontalPadding","right","Math","min","buttonLeft","buttonTop","gridY","_model$textForCell","_metrics$fontWidths$g","isStringType","text","textForCell","textWidth","fontWidth","fontWidths","save","truncatedText","getCachedTruncatedString","truncationCharForCell","restore","drawTreeMarker","columnX","rowY","treeBox","color","isExpanded"],"sources":["../src/IrisGridTextCellRenderer.ts"],"sourcesContent":["/* eslint-disable class-methods-use-this */\nimport {\n BoxCoordinates,\n Coordinate,\n DEFAULT_FONT_WIDTH,\n getOrThrow,\n GridMetrics,\n GridThemeType,\n GridUtils,\n TextCellRenderer,\n VisibleIndex,\n} from '@deephaven/grid';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { IrisGridRenderState } from './IrisGridRenderer';\nimport { ICON_SIZE } from './IrisGridIcons';\nimport IrisGridCellRendererUtils from './IrisGridCellRendererUtils';\n\nclass IrisGridTextCellRenderer extends TextCellRenderer {\n drawCellContent(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n row: VisibleIndex\n ): void {\n const { metrics, model } = state;\n const { modelColumns, modelRows } = metrics;\n const modelRow = getOrThrow(modelRows, row);\n const modelColumn = modelColumns.get(column);\n if (modelColumn === undefined) {\n return;\n }\n const value = model.valueForCell(modelColumn, modelRow);\n if (TableUtils.isTextType(model.columns[modelColumn]?.type)) {\n if (value === null || value === '') {\n const originalFont = context.font;\n context.font = `italic ${originalFont}`;\n super.drawCellContent(context, state, column, row);\n context.font = originalFont;\n return;\n }\n }\n super.drawCellContent(context, state, column, row);\n }\n\n // This will shrink the size the text may take when the overflow button is rendered\n // The text will truncate to a smaller width and won't overlap the button\n getTextRenderMetrics(\n state: IrisGridRenderState,\n column: VisibleIndex,\n row: VisibleIndex\n ): {\n width: number;\n x: Coordinate;\n y: Coordinate;\n } {\n const textMetrics = GridUtils.getTextRenderMetrics(state, column, row);\n\n const { mouseX, mouseY, metrics, theme } = state;\n\n if (mouseX == null || mouseY == null) {\n return textMetrics;\n }\n\n const { column: mouseColumn, row: mouseRow } = GridUtils.getGridPointFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n if (column === mouseColumn && row === mouseRow) {\n const { left } = this.getCellOverflowButtonPosition(\n mouseX,\n mouseY,\n metrics,\n theme\n );\n if (this.shouldRenderOverflowButton(state) && left != null) {\n textMetrics.width = left - metrics.gridX - textMetrics.x;\n }\n }\n return textMetrics;\n }\n\n getCellOverflowButtonPosition(\n mouseX: Coordinate | null,\n mouseY: Coordinate | null,\n metrics: GridMetrics | undefined,\n theme: GridThemeType\n ): {\n left: Coordinate | null;\n top: Coordinate | null;\n width: number | null;\n height: number | null;\n } {\n const NULL_POSITION = { left: null, top: null, width: null, height: null };\n if (mouseX == null || mouseY == null || metrics == null) {\n return NULL_POSITION;\n }\n const { rowHeight, columnWidth, left, top } = GridUtils.getCellInfoFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n if (left == null || columnWidth == null || top == null) {\n return NULL_POSITION;\n }\n\n const { width: gridWidth, verticalBarWidth } = metrics;\n const { cellHorizontalPadding } = theme;\n\n const width = ICON_SIZE + 2 * cellHorizontalPadding;\n const height = rowHeight;\n // Right edge of column or of visible grid, whichever is smaller\n const right = Math.min(\n metrics.gridX + left + columnWidth,\n gridWidth - verticalBarWidth\n );\n const buttonLeft = right - width;\n const buttonTop = metrics.gridY + top;\n\n return { left: buttonLeft, top: buttonTop, width, height };\n }\n\n shouldRenderOverflowButton(state: IrisGridRenderState): boolean {\n const { context, mouseX, mouseY, metrics, model, theme } = state;\n if (mouseX == null || mouseY == null) {\n return false;\n }\n\n const { row, column, modelRow, modelColumn } = GridUtils.getCellInfoFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n if (\n row == null ||\n column == null ||\n modelRow == null ||\n modelColumn == null ||\n !TableUtils.isStringType(model.columns[modelColumn].type)\n ) {\n return false;\n }\n\n const text = model.textForCell(modelColumn, modelRow) ?? '';\n const { width: textWidth } = GridUtils.getTextRenderMetrics(\n state,\n column,\n row\n );\n const fontWidth = metrics.fontWidths.get(theme.font) ?? DEFAULT_FONT_WIDTH;\n\n context.save();\n context.font = theme.font;\n\n const truncatedText = this.getCachedTruncatedString(\n context,\n text,\n textWidth,\n fontWidth,\n model.truncationCharForCell(modelColumn, modelRow)\n );\n context.restore();\n\n return text !== '' && truncatedText !== text;\n }\n\n drawTreeMarker(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n columnX: Coordinate,\n rowY: Coordinate,\n treeBox: BoxCoordinates,\n color: string,\n isExpanded: boolean\n ): void {\n IrisGridCellRendererUtils.drawTreeMarker(\n context,\n state,\n columnX,\n rowY,\n treeBox,\n color,\n isExpanded\n );\n }\n}\n\nexport default IrisGridTextCellRenderer;\n"],"mappings":"AAAA;AACA,SAGEA,kBAAkB,EAClBC,UAAU,EAGVC,SAAS,EACTC,gBAAgB,QAEX,iBAAiB;AACxB,SAASC,UAAU,QAAQ,wBAAwB;AAAC,SAE3CC,SAAS;AAAA,OACXC,yBAAyB;AAEhC,MAAMC,wBAAwB,SAASJ,gBAAgB,CAAC;EACtDK,eAAeA,CACbC,OAAiC,EACjCC,KAA0B,EAC1BC,MAAoB,EACpBC,GAAiB,EACX;IAAA,IAAAC,qBAAA;IACN,IAAM;MAAEC,OAAO;MAAEC;IAAM,CAAC,GAAGL,KAAK;IAChC,IAAM;MAAEM,YAAY;MAAEC;IAAU,CAAC,GAAGH,OAAO;IAC3C,IAAMI,QAAQ,GAAGjB,UAAU,CAACgB,SAAS,EAAEL,GAAG,CAAC;IAC3C,IAAMO,WAAW,GAAGH,YAAY,CAACI,GAAG,CAACT,MAAM,CAAC;IAC5C,IAAIQ,WAAW,KAAKE,SAAS,EAAE;MAC7B;IACF;IACA,IAAMC,KAAK,GAAGP,KAAK,CAACQ,YAAY,CAACJ,WAAW,EAAED,QAAQ,C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O,CAAC0D,IAAI,CAAC,CAAC;IACd1D,OAAO,CAACmB,IAAI,GAAGM,KAAK,CAACN,IAAI;IAEzB,IAAMwC,aAAa,GAAG,IAAI,CAACC,wBAAwB,CACjD5D,OAAO,EACPqD,IAAI,EACJE,SAAS,EACTC,SAAS,EACTlD,KAAK,CAACuD,qBAAqB,CAACnD,WAAW,EAAED,QAAQ,CACnD,CAAC;IACDT,OAAO,CAAC8D,OAAO,CAAC,CAAC;IAEjB,OAAOT,IAAI,KAAK,EAAE,IAAIM,aAAa,KAAKN,IAAI;EAC9C;EAEAU,cAAcA,CACZ/D,OAAiC,EACjCC,KAA0B,EAC1B+D,OAAmB,EACnBC,IAAgB,EAChBC,OAAuB,EACvBC,KAAa,EACbC,UAAmB,EACb;IACNvE,yBAAyB,CAACkE,cAAc,CACtC/D,OAAO,EACPC,KAAK,EACL+D,OAAO,EACPC,IAAI,EACJC,OAAO,EACPC,KAAK,EACLC,UACF,CAAC;EACH;AACF;AAEA,eAAetE,wBAAwB"}
|
|
1
|
+
{"version":3,"file":"IrisGridTextCellRenderer.js","names":["DEFAULT_FONT_WIDTH","getOrThrow","GridUtils","TextCellRenderer","TableUtils","IrisGridCellRendererUtils","IrisGridTextCellRenderer","drawCellContent","context","state","column","row","_model$columns$modelC","metrics","model","modelColumns","modelRows","modelRow","modelColumn","get","undefined","value","valueForCell","isTextType","columns","type","originalFont","font","concat","getTextRenderMetrics","textMetrics","mouseX","mouseY","theme","mouseColumn","mouseRow","getGridPointFromXY","left","getCellOverflowButtonPosition","shouldRenderOverflowButton","width","gridX","x","NULL_POSITION","top","height","rowHeight","columnWidth","getCellInfoFromXY","gridWidth","verticalBarWidth","cellHorizontalPadding","iconSize","right","Math","min","buttonLeft","buttonTop","gridY","_model$textForCell","_metrics$fontWidths$g","isStringType","text","textForCell","textWidth","fontWidth","fontWidths","save","truncatedText","getCachedTruncatedString","truncationCharForCell","restore","drawTreeMarker","columnX","rowY","treeBox","color","isExpanded"],"sources":["../src/IrisGridTextCellRenderer.ts"],"sourcesContent":["/* eslint-disable class-methods-use-this */\nimport {\n BoxCoordinates,\n Coordinate,\n DEFAULT_FONT_WIDTH,\n getOrThrow,\n GridMetrics,\n GridUtils,\n TextCellRenderer,\n VisibleIndex,\n} from '@deephaven/grid';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { IrisGridRenderState } from './IrisGridRenderer';\nimport IrisGridCellRendererUtils from './IrisGridCellRendererUtils';\nimport type { IrisGridThemeType } from './IrisGridTheme';\n\nclass IrisGridTextCellRenderer extends TextCellRenderer {\n drawCellContent(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n column: VisibleIndex,\n row: VisibleIndex\n ): void {\n const { metrics, model } = state;\n const { modelColumns, modelRows } = metrics;\n const modelRow = getOrThrow(modelRows, row);\n const modelColumn = modelColumns.get(column);\n if (modelColumn === undefined) {\n return;\n }\n const value = model.valueForCell(modelColumn, modelRow);\n if (TableUtils.isTextType(model.columns[modelColumn]?.type)) {\n if (value === null || value === '') {\n const originalFont = context.font;\n context.font = `italic ${originalFont}`;\n super.drawCellContent(context, state, column, row);\n context.font = originalFont;\n return;\n }\n }\n super.drawCellContent(context, state, column, row);\n }\n\n // This will shrink the size the text may take when the overflow button is rendered\n // The text will truncate to a smaller width and won't overlap the button\n getTextRenderMetrics(\n state: IrisGridRenderState,\n column: VisibleIndex,\n row: VisibleIndex\n ): {\n width: number;\n x: Coordinate;\n y: Coordinate;\n } {\n const textMetrics = GridUtils.getTextRenderMetrics(state, column, row);\n\n const { mouseX, mouseY, metrics, theme } = state;\n\n if (mouseX == null || mouseY == null) {\n return textMetrics;\n }\n\n const { column: mouseColumn, row: mouseRow } = GridUtils.getGridPointFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n if (column === mouseColumn && row === mouseRow) {\n const { left } = this.getCellOverflowButtonPosition(\n mouseX,\n mouseY,\n metrics,\n theme\n );\n if (this.shouldRenderOverflowButton(state) && left != null) {\n textMetrics.width = left - metrics.gridX - textMetrics.x;\n }\n }\n return textMetrics;\n }\n\n getCellOverflowButtonPosition(\n mouseX: Coordinate | null,\n mouseY: Coordinate | null,\n metrics: GridMetrics | undefined,\n theme: IrisGridThemeType\n ): {\n left: Coordinate | null;\n top: Coordinate | null;\n width: number | null;\n height: number | null;\n } {\n const NULL_POSITION = { left: null, top: null, width: null, height: null };\n if (mouseX == null || mouseY == null || metrics == null) {\n return NULL_POSITION;\n }\n const { rowHeight, columnWidth, left, top } = GridUtils.getCellInfoFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n if (left == null || columnWidth == null || top == null) {\n return NULL_POSITION;\n }\n\n const { width: gridWidth, verticalBarWidth } = metrics;\n const { cellHorizontalPadding, iconSize } = theme;\n\n const width = iconSize + 2 * cellHorizontalPadding;\n const height = rowHeight;\n // Right edge of column or of visible grid, whichever is smaller\n const right = Math.min(\n metrics.gridX + left + columnWidth,\n gridWidth - verticalBarWidth\n );\n const buttonLeft = right - width;\n const buttonTop = metrics.gridY + top;\n\n return { left: buttonLeft, top: buttonTop, width, height };\n }\n\n shouldRenderOverflowButton(state: IrisGridRenderState): boolean {\n const { context, mouseX, mouseY, metrics, model, theme } = state;\n if (mouseX == null || mouseY == null) {\n return false;\n }\n\n const { row, column, modelRow, modelColumn } = GridUtils.getCellInfoFromXY(\n mouseX,\n mouseY,\n metrics\n );\n\n if (\n row == null ||\n column == null ||\n modelRow == null ||\n modelColumn == null ||\n !TableUtils.isStringType(model.columns[modelColumn].type)\n ) {\n return false;\n }\n\n const text = model.textForCell(modelColumn, modelRow) ?? '';\n const { width: textWidth } = GridUtils.getTextRenderMetrics(\n state,\n column,\n row\n );\n const fontWidth = metrics.fontWidths.get(theme.font) ?? DEFAULT_FONT_WIDTH;\n\n context.save();\n context.font = theme.font;\n\n const truncatedText = this.getCachedTruncatedString(\n context,\n text,\n textWidth,\n fontWidth,\n model.truncationCharForCell(modelColumn, modelRow)\n );\n context.restore();\n\n return text !== '' && truncatedText !== text;\n }\n\n drawTreeMarker(\n context: CanvasRenderingContext2D,\n state: IrisGridRenderState,\n columnX: Coordinate,\n rowY: Coordinate,\n treeBox: BoxCoordinates,\n color: string,\n isExpanded: boolean\n ): void {\n IrisGridCellRendererUtils.drawTreeMarker(\n context,\n state,\n columnX,\n rowY,\n treeBox,\n color,\n isExpanded\n );\n }\n}\n\nexport default IrisGridTextCellRenderer;\n"],"mappings":"AAAA;AACA,SAGEA,kBAAkB,EAClBC,UAAU,EAEVC,SAAS,EACTC,gBAAgB,QAEX,iBAAiB;AACxB,SAASC,UAAU,QAAQ,wBAAwB;AAAC,OAE7CC,yBAAyB;AAGhC,MAAMC,wBAAwB,SAASH,gBAAgB,CAAC;EACtDI,eAAeA,CACbC,OAAiC,EACjCC,KAA0B,EAC1BC,MAAoB,EACpBC,GAAiB,EACX;IAAA,IAAAC,qBAAA;IACN,IAAM;MAAEC,OAAO;MAAEC;IAAM,CAAC,GAAGL,KAAK;IAChC,IAAM;MAAEM,YAAY;MAAEC;IAAU,CAAC,GAAGH,OAAO;IAC3C,IAAMI,QAAQ,GAAGhB,UAAU,CAACe,SAAS,EAAEL,GAAG,CAAC;IAC3C,IAAMO,WAAW,GAAGH,YAAY,CAACI,GAAG,CAACT,MAAM,CAAC;IAC5C,IAAIQ,WAAW,KAAKE,SAAS,EAAE;MAC7B;IACF;IACA,IAAMC,KAAK,GAAGP,KAAK,CAACQ,YAAY,CAACJ,WAAW,EAAED,QAAQ,CAAC;IACvD,IAAIb,UAAU,CAACmB,UAAU,EAAAX,qBAAA,GAACE,KAAK,CAACU,OAAO,CAACN,WAAW,CAAC,cAAAN,qBAAA,uBAA1BA,qBAAA,CAA4Ba,IAAI,CAAC,EAAE;MAC3D,IAAIJ,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,EAAE,EAAE;QAClC,IAAMK,YAAY,GAAGlB,OAAO,CAACmB,IAAI;QACjCnB,OAAO,CAACmB,IAAI,aAAAC,MAAA,CAAaF,YAAY,CAAE;QACvC,KAAK,C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AIM,aAAa,KAAKN,IAAI;EAC9C;EAEAU,cAAcA,CACZhE,OAAiC,EACjCC,KAA0B,EAC1BgE,OAAmB,EACnBC,IAAgB,EAChBC,OAAuB,EACvBC,KAAa,EACbC,UAAmB,EACb;IACNxE,yBAAyB,CAACmE,cAAc,CACtChE,OAAO,EACPC,KAAK,EACLgE,OAAO,EACPC,IAAI,EACJC,OAAO,EACPC,KAAK,EACLC,UACF,CAAC;EACH;AACF;AAEA,eAAevE,wBAAwB"}
|
package/dist/IrisGridTheme.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GridThemeType } from '@deephaven/grid';
|
|
2
2
|
import { GridColor, NullableGridColor } from '@deephaven/grid/src/GridTheme';
|
|
3
3
|
export type IrisGridThemeType = GridThemeType & {
|
|
4
|
+
filterBarFont: string;
|
|
4
5
|
filterBarCollapsedHeight: number;
|
|
5
6
|
filterBarHeight: number;
|
|
6
7
|
reverseHeaderBarHeight: number;
|
|
@@ -35,12 +36,18 @@ export type IrisGridThemeType = GridThemeType & {
|
|
|
35
36
|
overflowButtonColor: GridColor;
|
|
36
37
|
overflowButtonHoverColor: GridColor;
|
|
37
38
|
floatingGridRowColor: NullableGridColor;
|
|
39
|
+
iconSize: number;
|
|
40
|
+
density: {
|
|
41
|
+
compact: Partial<Omit<IrisGridThemeType, 'density'>>;
|
|
42
|
+
spacious: Partial<Omit<IrisGridThemeType, 'density'>>;
|
|
43
|
+
};
|
|
38
44
|
};
|
|
39
45
|
/**
|
|
40
46
|
* Derive default Iris grid theme from IrisGridThemeRaw. Note that CSS variables
|
|
41
47
|
* contained in IrisGridThemeRaw are resolved to their actual values. This means
|
|
42
|
-
* that the returned theme is statically defined
|
|
43
|
-
*
|
|
48
|
+
* that the returned theme is statically defined based on the CSS variable values
|
|
49
|
+
* at the time this function is called. They will not automatically update if the
|
|
50
|
+
* CSS variables change.
|
|
44
51
|
*/
|
|
45
52
|
export declare function createDefaultIrisGridTheme(): IrisGridThemeType;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IAC9B,oBAAoB,EAAE,SAAS,CAAC;IAChC,sCAAsC,EAAE,SAAS,CAAC;IAClD,gCAAgC,EAAE,SAAS,CAAC;IAC5C,uBAAuB,EAAE,SAAS,CAAC;IACnC,0CAA0C,EAAE,SAAS,CAAC;IACtD,mBAAmB,EAAE,SAAS,CAAC;IAC/B,0BAA0B,EAAE,MAAM,CAAC;IACnC,8BAA8B,EAAE,SAAS,CAAC;IAC1C,mBAAmB,EAAE,SAAS,CAAC;IAC/B,wBAAwB,EAAE,SAAS,CAAC;IACpC,oBAAoB,EAAE,iBAAiB,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QACP,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;QACrD,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;KACvD,CAAC;CACH,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,iBAAiB,CAmJ9D"}
|
package/dist/IrisGridTheme.js
CHANGED
|
@@ -12,13 +12,13 @@ var log = Log.module('IrisGridTheme');
|
|
|
12
12
|
/**
|
|
13
13
|
* Derive default Iris grid theme from IrisGridThemeRaw. Note that CSS variables
|
|
14
14
|
* contained in IrisGridThemeRaw are resolved to their actual values. This means
|
|
15
|
-
* that the returned theme is statically defined
|
|
16
|
-
*
|
|
15
|
+
* that the returned theme is statically defined based on the CSS variable values
|
|
16
|
+
* at the time this function is called. They will not automatically update if the
|
|
17
|
+
* CSS variables change.
|
|
17
18
|
*/
|
|
18
19
|
export function createDefaultIrisGridTheme() {
|
|
19
20
|
var _IrisGridTheme$rowBa;
|
|
20
21
|
var IrisGridTheme = resolveCssVariablesInRecord(IrisGridThemeRaw);
|
|
21
|
-
|
|
22
22
|
// row-background-colors is a space-separated list of colors, so we need to
|
|
23
23
|
// normalize each color expression in the list individually
|
|
24
24
|
IrisGridTheme['row-background-colors'] = getExpressionRanges((_IrisGridTheme$rowBa = IrisGridTheme['row-background-colors']) !== null && _IrisGridTheme$rowBa !== void 0 ? _IrisGridTheme$rowBa : '').map(_ref => {
|
|
@@ -32,6 +32,7 @@ export function createDefaultIrisGridTheme() {
|
|
|
32
32
|
white: IrisGridTheme.white,
|
|
33
33
|
black: IrisGridTheme.black,
|
|
34
34
|
font: IrisGridTheme.font,
|
|
35
|
+
filterBarFont: IrisGridTheme.font,
|
|
35
36
|
headerBackgroundColor: IrisGridTheme['header-bg'],
|
|
36
37
|
headerColor: IrisGridTheme['header-color'],
|
|
37
38
|
headerSeparatorColor: IrisGridTheme['header-separator-color'],
|
|
@@ -100,6 +101,7 @@ export function createDefaultIrisGridTheme() {
|
|
|
100
101
|
sortHeaderBarHeight: 2,
|
|
101
102
|
reverseHeaderBarHeight: 4,
|
|
102
103
|
filterBarHorizontalPadding: 4,
|
|
104
|
+
iconSize: 16,
|
|
103
105
|
activeCellSelectionBorderWidth: parseInt(IrisGridTheme['active-cell-selection-border-width'], 10) || 2,
|
|
104
106
|
shadowAlpha: parseFloat(IrisGridTheme['row-shadow-alpha']) || 0.15,
|
|
105
107
|
// Amount of blur to apply to the bottom of the scrim while animating in
|
|
@@ -121,7 +123,24 @@ export function createDefaultIrisGridTheme() {
|
|
|
121
123
|
zeroLineColor: IrisGridTheme['zero-line-color'],
|
|
122
124
|
positiveBarColor: IrisGridTheme['positive-bar-color'],
|
|
123
125
|
negativeBarColor: IrisGridTheme['negative-bar-color'],
|
|
124
|
-
markerBarColor: IrisGridTheme['marker-bar-color']
|
|
126
|
+
markerBarColor: IrisGridTheme['marker-bar-color'],
|
|
127
|
+
density: {
|
|
128
|
+
compact: {
|
|
129
|
+
cellHorizontalPadding: 5,
|
|
130
|
+
// Same as regular set in GridTheme
|
|
131
|
+
headerHorizontalPadding: 10,
|
|
132
|
+
minColumnWidth: 10,
|
|
133
|
+
rowHeight: 16,
|
|
134
|
+
font: '11px Fira Sans, sans-serif',
|
|
135
|
+
iconSize: 14,
|
|
136
|
+
columnHeaderHeight: 26
|
|
137
|
+
},
|
|
138
|
+
spacious: {
|
|
139
|
+
cellHorizontalPadding: 7,
|
|
140
|
+
headerHorizontalPadding: 15,
|
|
141
|
+
rowHeight: 28
|
|
142
|
+
}
|
|
143
|
+
}
|
|
125
144
|
}));
|
|
126
145
|
}
|
|
127
146
|
//# sourceMappingURL=IrisGridTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridTheme.js","names":["getExpressionRanges","resolveCssVariablesInRecord","GridTheme","Log","ColorUtils","IrisGridThemeRaw","log","module","createDefaultIrisGridTheme","_IrisGridTheme$rowBa","IrisGridTheme","map","_ref","start","end","normalizeCssColor","substring","join","debug2","Object","freeze","_objectSpread","backgroundColor","white","black","font","headerBackgroundColor","headerColor","headerSeparatorColor","headerSeparatorHoverColor","headerHiddenSeparatorHoverColor","headerSortBarColor","headerReverseBarColor","headerBarCasingColor","headerFont","rowBackgroundColors","rowHoverBackgroundColor","selectionColor","selectionOutlineColor","selectionOutlineCasingColor","selectedRowHoverBackgroundColor","scrollBarBackgroundColor","scrollBarHoverBackgroundColor","scrollBarCasingColor","scrollBarCornerColor","scrollBarColor","scrollBarHoverColor","scrollBarActiveColor","scrollBarSelectionTickColor","scrollBarActiveSelectionTickColor","textColor","hyperlinkColor","positiveNumberColor","negativeNumberColor","zeroNumberColor","dateColor","pendingTextColor","errorTextColor","nullStringColor","filterBarActiveBackgroundColor","filterBarExpandedBackgroundColor","filterBarExpandedActiveBackgroundColor","filterBarExpandedActiveCellBackgroundColor","filterBarSeparatorColor","filterBarActiveColor","filterBarErrorColor","filterIconColor","scrimColor","contextMenuSortIconColor","contextMenuReverseIconColor","allowRowResize","autoSelectRow","gridColumnColor","gridRowColor","groupedColumnDividerColor","columnHoverBackgroundColor","headerHorizontalPadding","scrollBarSize","scrollBarHoverSize","minScrollHandleSize","rowHeight","parseInt","columnWidth","rowHeaderWidth","rowFooterWidth","columnHeaderHeight","filterBarHeight","filterBarCollapsedHeight","sortHeaderBarHeight","reverseHeaderBarHeight","filterBarHorizontalPadding","activeCellSelectionBorderWidth","shadowAlpha","parseFloat","scrimBlurSize","minScrimTransitionTime","maxScrimTransitionTime","scrollSnapToRow","linkerColumnHoverBackgroundColor","treeLineColor","treeMarkerColor","treeMarkerHoverColor","floatingGridColumnColor","floatingGridRowColor","floatingRowBackgroundColors","floatingDividerInnerColor","floatingDividerOuterColor","overflowButtonColor","overflowButtonHoverColor","zeroLineColor","positiveBarColor","negativeBarColor","markerBarColor"],"sources":["../src/IrisGridTheme.ts"],"sourcesContent":["import {\n getExpressionRanges,\n resolveCssVariablesInRecord,\n} from '@deephaven/components';\nimport type { GridThemeType } from '@deephaven/grid';\nimport { GridTheme } from '@deephaven/grid';\nimport Log from '@deephaven/log';\nimport { GridColor, NullableGridColor } from '@deephaven/grid/src/GridTheme';\nimport { ColorUtils } from '@deephaven/utils';\nimport IrisGridThemeRaw from './IrisGridTheme.module.scss';\n\nconst log = Log.module('IrisGridTheme');\n\nexport type IrisGridThemeType = GridThemeType & {\n filterBarCollapsedHeight: number;\n filterBarHeight: number;\n reverseHeaderBarHeight: number;\n filterIconColor: string;\n filterBarActiveColor: GridColor;\n contextMenuSortIconColor: GridColor;\n contextMenuReverseIconColor: GridColor;\n minScrimTransitionTime: number;\n maxScrimTransitionTime: number;\n nullStringColor: GridColor;\n pendingTextColor: GridColor;\n dateColor: GridColor;\n positiveNumberColor: GridColor;\n negativeNumberColor: GridColor;\n zeroNumberColor: GridColor;\n errorTextColor: GridColor;\n groupedColumnDividerColor: GridColor;\n linkerColumnHoverBackgroundColor: GridColor;\n scrimBlurSize: number;\n scrimColor: GridColor;\n headerReverseBarColor: GridColor;\n sortHeaderBarHeight: number;\n headerSortBarColor: GridColor;\n headerBarCasingColor: GridColor;\n filterBarExpandedActiveBackgroundColor: GridColor;\n filterBarExpandedBackgroundColor: GridColor;\n filterBarSeparatorColor: GridColor;\n filterBarExpandedActiveCellBackgroundColor: GridColor;\n filterBarErrorColor: GridColor;\n filterBarHorizontalPadding: number;\n filterBarActiveBackgroundColor: GridColor;\n overflowButtonColor: GridColor;\n overflowButtonHoverColor: GridColor;\n floatingGridRowColor: NullableGridColor;\n};\n\n/**\n * Derive default Iris grid theme from IrisGridThemeRaw. Note that CSS variables\n * contained in IrisGridThemeRaw are resolved to their actual values. This means\n * that the returned theme is statically defined and does not change when CSS\n * variables change.\n */\nexport function createDefaultIrisGridTheme(): IrisGridThemeType {\n const IrisGridTheme = resolveCssVariablesInRecord(IrisGridThemeRaw);\n\n // row-background-colors is a space-separated list of colors, so we need to\n // normalize each color expression in the list individually\n IrisGridTheme['row-background-colors'] = getExpressionRanges(\n IrisGridTheme['row-background-colors'] ?? ''\n )\n .map(([start, end]) =>\n ColorUtils.normalizeCssColor(\n IrisGridTheme['row-background-colors'].substring(start, end + 1)\n )\n )\n .join(' ');\n\n log.debug2('Iris grid theme:', IrisGridThemeRaw);\n log.debug2('Iris grid theme derived:', IrisGridTheme);\n\n return Object.freeze({\n ...GridTheme,\n backgroundColor: IrisGridTheme['grid-bg'],\n white: IrisGridTheme.white,\n black: IrisGridTheme.black,\n font: IrisGridTheme.font,\n headerBackgroundColor: IrisGridTheme['header-bg'],\n headerColor: IrisGridTheme['header-color'],\n headerSeparatorColor: IrisGridTheme['header-separator-color'],\n headerSeparatorHoverColor: IrisGridTheme['header-separator-hover-color'],\n headerHiddenSeparatorHoverColor:\n IrisGridTheme['header-hidden-separator-hover-color'],\n headerSortBarColor: IrisGridTheme['header-sort-bar-color'],\n headerReverseBarColor: IrisGridTheme['header-reverse-bar-color'],\n headerBarCasingColor: IrisGridTheme['header-bar-casing-color'],\n headerFont: IrisGridTheme['header-font'],\n rowBackgroundColors: IrisGridTheme['row-background-colors'],\n rowHoverBackgroundColor: IrisGridTheme['row-hover-bg'],\n selectionColor: IrisGridTheme['selection-color'],\n selectionOutlineColor: IrisGridTheme['selection-outline-color'],\n selectionOutlineCasingColor:\n IrisGridTheme['selection-outline-casing-color'],\n selectedRowHoverBackgroundColor: IrisGridTheme['selected-row-hover-bg'],\n scrollBarBackgroundColor: IrisGridTheme['scroll-bar-bg'],\n scrollBarHoverBackgroundColor: IrisGridTheme['scroll-bar-hover-bg'],\n scrollBarCasingColor: IrisGridTheme['scroll-bar-casing-color'],\n scrollBarCornerColor: IrisGridTheme['scroll-bar-corner-color'],\n scrollBarColor: IrisGridTheme['scroll-bar-color'],\n scrollBarHoverColor: IrisGridTheme['scroll-bar-hover-color'],\n scrollBarActiveColor: IrisGridTheme['scroll-bar-active-color'],\n scrollBarSelectionTickColor: IrisGridTheme['selected-row-hover-bg'],\n scrollBarActiveSelectionTickColor:\n IrisGridTheme['scroll-bar-active-selection-tick-color'],\n textColor: IrisGridTheme['text-color'],\n hyperlinkColor: IrisGridTheme['hyperlink-color'],\n positiveNumberColor: IrisGridTheme['positive-number-color'],\n negativeNumberColor: IrisGridTheme['negative-number-color'],\n zeroNumberColor: IrisGridTheme['zero-number-color'],\n dateColor: IrisGridTheme['date-color'],\n pendingTextColor: IrisGridTheme['pending-text-color'],\n errorTextColor: IrisGridTheme['error-text-color'],\n nullStringColor: IrisGridTheme['null-string-color'],\n filterBarActiveBackgroundColor: IrisGridTheme['filter-bar-active-bg'],\n filterBarExpandedBackgroundColor: IrisGridTheme['filter-bar-expanded-bg'],\n filterBarExpandedActiveBackgroundColor:\n IrisGridTheme['filter-bar-expanded-active-bg'],\n filterBarExpandedActiveCellBackgroundColor:\n IrisGridTheme['filter-bar-expanded-active-cell-bg'],\n filterBarSeparatorColor: IrisGridTheme['filter-bar-separator-color'],\n filterBarActiveColor: IrisGridTheme['filter-bar-active-color'],\n filterBarErrorColor: IrisGridTheme['filter-bar-error-color'],\n filterIconColor: IrisGridTheme['filter-icon-color'],\n scrimColor: IrisGridTheme['scrim-color'],\n contextMenuSortIconColor: IrisGridTheme['context-menu-sort-icon-color'],\n contextMenuReverseIconColor:\n IrisGridTheme['context-menu-reverse-icon-color'],\n\n allowRowResize: false,\n autoSelectRow: true,\n gridColumnColor: null,\n gridRowColor: null,\n groupedColumnDividerColor: IrisGridTheme['grouped-column-divider-color'],\n columnHoverBackgroundColor: null,\n headerHorizontalPadding: 12,\n scrollBarSize: 13,\n scrollBarHoverSize: 16, // system default scrollbar width is 17\n minScrollHandleSize: 24,\n rowHeight: parseInt(IrisGridTheme['row-height'], 10) || 19, // IrisGrid test breaks without the fallback value\n columnWidth: 100,\n rowHeaderWidth: 0,\n rowFooterWidth: 60,\n columnHeaderHeight: parseInt(IrisGridTheme['header-height'], 10) || 30,\n filterBarHeight: 30, // includes 1px casing at bottom\n filterBarCollapsedHeight: 5, // includes 1px casing at bottom\n sortHeaderBarHeight: 2,\n reverseHeaderBarHeight: 4,\n filterBarHorizontalPadding: 4,\n\n activeCellSelectionBorderWidth:\n parseInt(IrisGridTheme['active-cell-selection-border-width'], 10) || 2,\n\n shadowAlpha: parseFloat(IrisGridTheme['row-shadow-alpha']) || 0.15,\n\n // Amount of blur to apply to the bottom of the scrim while animating in\n scrimBlurSize: 25,\n minScrimTransitionTime: 150,\n maxScrimTransitionTime: 350,\n\n scrollSnapToRow: true,\n\n linkerColumnHoverBackgroundColor: IrisGridTheme['linker-column-hover-bg'],\n\n treeLineColor: IrisGridTheme['tree-line-color'],\n treeMarkerColor: IrisGridTheme['tree-marker-color'],\n treeMarkerHoverColor: IrisGridTheme['tree-marker-hover-color'],\n\n floatingGridColumnColor: null,\n floatingGridRowColor: IrisGridTheme['floating-grid-row-color'],\n floatingRowBackgroundColors:\n IrisGridTheme['floating-row-background-colors'],\n floatingDividerInnerColor: IrisGridTheme['floating-divider-inner-color'],\n floatingDividerOuterColor: IrisGridTheme['floating-divider-outer-color'],\n\n overflowButtonColor: IrisGridTheme['overflow-button-color'],\n overflowButtonHoverColor: IrisGridTheme['overflow-button-hover-color'],\n\n zeroLineColor: IrisGridTheme['zero-line-color'],\n positiveBarColor: IrisGridTheme['positive-bar-color'],\n negativeBarColor: IrisGridTheme['negative-bar-color'],\n markerBarColor: IrisGridTheme['marker-bar-color'],\n });\n}\n"],"mappings":";;;;;AAAA,SACEA,mBAAmB,EACnBC,2BAA2B,QACtB,uBAAuB;AAE9B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,OAAOC,GAAG,MAAM,gBAAgB;AAEhC,SAASC,UAAU,QAAQ,kBAAkB;AAAC,OACvCC,gBAAgB;AAEvB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,eAAe,CAAC;AAuCvC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAAA,EAAsB;EAAA,IAAAC,oBAAA;EAC9D,IAAMC,aAAa,GAAGT,2BAA2B,CAACI,gBAAgB,CAAC;;EAEnE;EACA;EACAK,aAAa,CAAC,uBAAuB,CAAC,GAAGV,mBAAmB,EAAAS,oBAAA,GAC1DC,aAAa,CAAC,uBAAuB,CAAC,cAAAD,oBAAA,cAAAA,oBAAA,GAAI,EAC5C,CAAC,CACEE,GAAG,CAACC,IAAA;IAAA,IAAC,CAACC,KAAK,EAAEC,GAAG,CAAC,GAAAF,IAAA;IAAA,OAChBR,UAAU,CAACW,iBAAiB,CAC1BL,aAAa,CAAC,uBAAuB,CAAC,CAACM,SAAS,CAACH,KAAK,EAAEC,GAAG,GAAG,CAAC,CACjE,CAAC;EAAA,CACH,CAAC,CACAG,IAAI,CAAC,GAAG,CAAC;EAEZX,GAAG,CAACY,MAAM,CAAC,kBAAkB,EAAEb,gBAAgB,CAAC;EAChDC,GAAG,CAACY,MAAM,CAAC,0BAA0B,EAAER,aAAa,CAAC;EAErD,OAAOS,MAAM,CAACC,MAAM,CAAAC,aAAA,CAAAA,aAAA,KACfnB,SAAS;IACZoB,eAAe,EAAEZ,aAAa,CAAC,SAAS,CAAC;IACzCa,KAAK,EAAEb,aAAa,CAACa,KAAK;IAC1BC,KAAK,EAAEd,aAAa,CAACc,KAAK;IAC1BC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,8BAA8B,CAAC;IAExEiG,mBAAmB,EAAEjG,aAAa,CAAC,uBAAuB,CAAC;IAC3DkG,wBAAwB,EAAElG,aAAa,CAAC,6BAA6B,CAAC;IAEtEmG,aAAa,EAAEnG,aAAa,CAAC,iBAAiB,CAAC;IAC/CoG,gBAAgB,EAAEpG,aAAa,CAAC,oBAAoB,CAAC;IACrDqG,gBAAgB,EAAErG,aAAa,CAAC,oBAAoB,CAAC;IACrDsG,cAAc,EAAEtG,aAAa,CAAC,kBAAkB;EAAC,EAClD,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"IrisGridTheme.js","names":["getExpressionRanges","resolveCssVariablesInRecord","GridTheme","Log","ColorUtils","IrisGridThemeRaw","log","module","createDefaultIrisGridTheme","_IrisGridTheme$rowBa","IrisGridTheme","map","_ref","start","end","normalizeCssColor","substring","join","debug2","Object","freeze","_objectSpread","backgroundColor","white","black","font","filterBarFont","headerBackgroundColor","headerColor","headerSeparatorColor","headerSeparatorHoverColor","headerHiddenSeparatorHoverColor","headerSortBarColor","headerReverseBarColor","headerBarCasingColor","headerFont","rowBackgroundColors","rowHoverBackgroundColor","selectionColor","selectionOutlineColor","selectionOutlineCasingColor","selectedRowHoverBackgroundColor","scrollBarBackgroundColor","scrollBarHoverBackgroundColor","scrollBarCasingColor","scrollBarCornerColor","scrollBarColor","scrollBarHoverColor","scrollBarActiveColor","scrollBarSelectionTickColor","scrollBarActiveSelectionTickColor","textColor","hyperlinkColor","positiveNumberColor","negativeNumberColor","zeroNumberColor","dateColor","pendingTextColor","errorTextColor","nullStringColor","filterBarActiveBackgroundColor","filterBarExpandedBackgroundColor","filterBarExpandedActiveBackgroundColor","filterBarExpandedActiveCellBackgroundColor","filterBarSeparatorColor","filterBarActiveColor","filterBarErrorColor","filterIconColor","scrimColor","contextMenuSortIconColor","contextMenuReverseIconColor","allowRowResize","autoSelectRow","gridColumnColor","gridRowColor","groupedColumnDividerColor","columnHoverBackgroundColor","headerHorizontalPadding","scrollBarSize","scrollBarHoverSize","minScrollHandleSize","rowHeight","parseInt","columnWidth","rowHeaderWidth","rowFooterWidth","columnHeaderHeight","filterBarHeight","filterBarCollapsedHeight","sortHeaderBarHeight","reverseHeaderBarHeight","filterBarHorizontalPadding","iconSize","activeCellSelectionBorderWidth","shadowAlpha","parseFloat","scrimBlurSize","minScrimTransitionTime","maxScrimTransitionTime","scrollSnapToRow","linkerColumnHoverBackgroundColor","treeLineColor","treeMarkerColor","treeMarkerHoverColor","floatingGridColumnColor","floatingGridRowColor","floatingRowBackgroundColors","floatingDividerInnerColor","floatingDividerOuterColor","overflowButtonColor","overflowButtonHoverColor","zeroLineColor","positiveBarColor","negativeBarColor","markerBarColor","density","compact","cellHorizontalPadding","minColumnWidth","spacious"],"sources":["../src/IrisGridTheme.ts"],"sourcesContent":["import {\n getExpressionRanges,\n resolveCssVariablesInRecord,\n} from '@deephaven/components';\nimport type { GridThemeType } from '@deephaven/grid';\nimport { GridTheme } from '@deephaven/grid';\nimport Log from '@deephaven/log';\nimport { GridColor, NullableGridColor } from '@deephaven/grid/src/GridTheme';\nimport { ColorUtils } from '@deephaven/utils';\nimport IrisGridThemeRaw from './IrisGridTheme.module.scss';\n\nconst log = Log.module('IrisGridTheme');\n\nexport type IrisGridThemeType = GridThemeType & {\n filterBarFont: string;\n filterBarCollapsedHeight: number;\n filterBarHeight: number;\n reverseHeaderBarHeight: number;\n filterIconColor: string;\n filterBarActiveColor: GridColor;\n contextMenuSortIconColor: GridColor;\n contextMenuReverseIconColor: GridColor;\n minScrimTransitionTime: number;\n maxScrimTransitionTime: number;\n nullStringColor: GridColor;\n pendingTextColor: GridColor;\n dateColor: GridColor;\n positiveNumberColor: GridColor;\n negativeNumberColor: GridColor;\n zeroNumberColor: GridColor;\n errorTextColor: GridColor;\n groupedColumnDividerColor: GridColor;\n linkerColumnHoverBackgroundColor: GridColor;\n scrimBlurSize: number;\n scrimColor: GridColor;\n headerReverseBarColor: GridColor;\n sortHeaderBarHeight: number;\n headerSortBarColor: GridColor;\n headerBarCasingColor: GridColor;\n filterBarExpandedActiveBackgroundColor: GridColor;\n filterBarExpandedBackgroundColor: GridColor;\n filterBarSeparatorColor: GridColor;\n filterBarExpandedActiveCellBackgroundColor: GridColor;\n filterBarErrorColor: GridColor;\n filterBarHorizontalPadding: number;\n filterBarActiveBackgroundColor: GridColor;\n overflowButtonColor: GridColor;\n overflowButtonHoverColor: GridColor;\n floatingGridRowColor: NullableGridColor;\n iconSize: number;\n density: {\n compact: Partial<Omit<IrisGridThemeType, 'density'>>;\n spacious: Partial<Omit<IrisGridThemeType, 'density'>>;\n };\n};\n\n/**\n * Derive default Iris grid theme from IrisGridThemeRaw. Note that CSS variables\n * contained in IrisGridThemeRaw are resolved to their actual values. This means\n * that the returned theme is statically defined based on the CSS variable values\n * at the time this function is called. They will not automatically update if the\n * CSS variables change.\n */\nexport function createDefaultIrisGridTheme(): IrisGridThemeType {\n const IrisGridTheme = resolveCssVariablesInRecord(IrisGridThemeRaw);\n // row-background-colors is a space-separated list of colors, so we need to\n // normalize each color expression in the list individually\n IrisGridTheme['row-background-colors'] = getExpressionRanges(\n IrisGridTheme['row-background-colors'] ?? ''\n )\n .map(([start, end]) =>\n ColorUtils.normalizeCssColor(\n IrisGridTheme['row-background-colors'].substring(start, end + 1)\n )\n )\n .join(' ');\n\n log.debug2('Iris grid theme:', IrisGridThemeRaw);\n log.debug2('Iris grid theme derived:', IrisGridTheme);\n\n return Object.freeze({\n ...GridTheme,\n backgroundColor: IrisGridTheme['grid-bg'],\n white: IrisGridTheme.white,\n black: IrisGridTheme.black,\n font: IrisGridTheme.font,\n filterBarFont: IrisGridTheme.font,\n headerBackgroundColor: IrisGridTheme['header-bg'],\n headerColor: IrisGridTheme['header-color'],\n headerSeparatorColor: IrisGridTheme['header-separator-color'],\n headerSeparatorHoverColor: IrisGridTheme['header-separator-hover-color'],\n headerHiddenSeparatorHoverColor:\n IrisGridTheme['header-hidden-separator-hover-color'],\n headerSortBarColor: IrisGridTheme['header-sort-bar-color'],\n headerReverseBarColor: IrisGridTheme['header-reverse-bar-color'],\n headerBarCasingColor: IrisGridTheme['header-bar-casing-color'],\n headerFont: IrisGridTheme['header-font'],\n rowBackgroundColors: IrisGridTheme['row-background-colors'],\n rowHoverBackgroundColor: IrisGridTheme['row-hover-bg'],\n selectionColor: IrisGridTheme['selection-color'],\n selectionOutlineColor: IrisGridTheme['selection-outline-color'],\n selectionOutlineCasingColor:\n IrisGridTheme['selection-outline-casing-color'],\n selectedRowHoverBackgroundColor: IrisGridTheme['selected-row-hover-bg'],\n scrollBarBackgroundColor: IrisGridTheme['scroll-bar-bg'],\n scrollBarHoverBackgroundColor: IrisGridTheme['scroll-bar-hover-bg'],\n scrollBarCasingColor: IrisGridTheme['scroll-bar-casing-color'],\n scrollBarCornerColor: IrisGridTheme['scroll-bar-corner-color'],\n scrollBarColor: IrisGridTheme['scroll-bar-color'],\n scrollBarHoverColor: IrisGridTheme['scroll-bar-hover-color'],\n scrollBarActiveColor: IrisGridTheme['scroll-bar-active-color'],\n scrollBarSelectionTickColor: IrisGridTheme['selected-row-hover-bg'],\n scrollBarActiveSelectionTickColor:\n IrisGridTheme['scroll-bar-active-selection-tick-color'],\n textColor: IrisGridTheme['text-color'],\n hyperlinkColor: IrisGridTheme['hyperlink-color'],\n positiveNumberColor: IrisGridTheme['positive-number-color'],\n negativeNumberColor: IrisGridTheme['negative-number-color'],\n zeroNumberColor: IrisGridTheme['zero-number-color'],\n dateColor: IrisGridTheme['date-color'],\n pendingTextColor: IrisGridTheme['pending-text-color'],\n errorTextColor: IrisGridTheme['error-text-color'],\n nullStringColor: IrisGridTheme['null-string-color'],\n filterBarActiveBackgroundColor: IrisGridTheme['filter-bar-active-bg'],\n filterBarExpandedBackgroundColor: IrisGridTheme['filter-bar-expanded-bg'],\n filterBarExpandedActiveBackgroundColor:\n IrisGridTheme['filter-bar-expanded-active-bg'],\n filterBarExpandedActiveCellBackgroundColor:\n IrisGridTheme['filter-bar-expanded-active-cell-bg'],\n filterBarSeparatorColor: IrisGridTheme['filter-bar-separator-color'],\n filterBarActiveColor: IrisGridTheme['filter-bar-active-color'],\n filterBarErrorColor: IrisGridTheme['filter-bar-error-color'],\n filterIconColor: IrisGridTheme['filter-icon-color'],\n scrimColor: IrisGridTheme['scrim-color'],\n contextMenuSortIconColor: IrisGridTheme['context-menu-sort-icon-color'],\n contextMenuReverseIconColor:\n IrisGridTheme['context-menu-reverse-icon-color'],\n\n allowRowResize: false,\n autoSelectRow: true,\n gridColumnColor: null,\n gridRowColor: null,\n groupedColumnDividerColor: IrisGridTheme['grouped-column-divider-color'],\n columnHoverBackgroundColor: null,\n headerHorizontalPadding: 12,\n scrollBarSize: 13,\n scrollBarHoverSize: 16, // system default scrollbar width is 17\n minScrollHandleSize: 24,\n rowHeight: parseInt(IrisGridTheme['row-height'], 10) || 19, // IrisGrid test breaks without the fallback value\n columnWidth: 100,\n rowHeaderWidth: 0,\n rowFooterWidth: 60,\n columnHeaderHeight: parseInt(IrisGridTheme['header-height'], 10) || 30,\n filterBarHeight: 30, // includes 1px casing at bottom\n filterBarCollapsedHeight: 5, // includes 1px casing at bottom\n sortHeaderBarHeight: 2,\n reverseHeaderBarHeight: 4,\n filterBarHorizontalPadding: 4,\n iconSize: 16,\n\n activeCellSelectionBorderWidth:\n parseInt(IrisGridTheme['active-cell-selection-border-width'], 10) || 2,\n\n shadowAlpha: parseFloat(IrisGridTheme['row-shadow-alpha']) || 0.15,\n\n // Amount of blur to apply to the bottom of the scrim while animating in\n scrimBlurSize: 25,\n minScrimTransitionTime: 150,\n maxScrimTransitionTime: 350,\n\n scrollSnapToRow: true,\n\n linkerColumnHoverBackgroundColor: IrisGridTheme['linker-column-hover-bg'],\n\n treeLineColor: IrisGridTheme['tree-line-color'],\n treeMarkerColor: IrisGridTheme['tree-marker-color'],\n treeMarkerHoverColor: IrisGridTheme['tree-marker-hover-color'],\n\n floatingGridColumnColor: null,\n floatingGridRowColor: IrisGridTheme['floating-grid-row-color'],\n floatingRowBackgroundColors:\n IrisGridTheme['floating-row-background-colors'],\n floatingDividerInnerColor: IrisGridTheme['floating-divider-inner-color'],\n floatingDividerOuterColor: IrisGridTheme['floating-divider-outer-color'],\n\n overflowButtonColor: IrisGridTheme['overflow-button-color'],\n overflowButtonHoverColor: IrisGridTheme['overflow-button-hover-color'],\n\n zeroLineColor: IrisGridTheme['zero-line-color'],\n positiveBarColor: IrisGridTheme['positive-bar-color'],\n negativeBarColor: IrisGridTheme['negative-bar-color'],\n markerBarColor: IrisGridTheme['marker-bar-color'],\n\n density: {\n compact: {\n cellHorizontalPadding: 5, // Same as regular set in GridTheme\n headerHorizontalPadding: 10,\n minColumnWidth: 10,\n rowHeight: 16,\n font: '11px Fira Sans, sans-serif',\n iconSize: 14,\n columnHeaderHeight: 26,\n },\n spacious: {\n cellHorizontalPadding: 7,\n headerHorizontalPadding: 15,\n rowHeight: 28,\n },\n },\n } satisfies IrisGridThemeType);\n}\n"],"mappings":";;;;;AAAA,SACEA,mBAAmB,EACnBC,2BAA2B,QACtB,uBAAuB;AAE9B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,OAAOC,GAAG,MAAM,gBAAgB;AAEhC,SAASC,UAAU,QAAQ,kBAAkB;AAAC,OACvCC,gBAAgB;AAEvB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,eAAe,CAAC;AA6CvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAAA,EAAsB;EAAA,IAAAC,oBAAA;EAC9D,IAAMC,aAAa,GAAGT,2BAA2B,CAACI,gBAAgB,CAAC;EACnE;EACA;EACAK,aAAa,CAAC,uBAAuB,CAAC,GAAGV,mBAAmB,EAAAS,oBAAA,GAC1DC,aAAa,CAAC,uBAAuB,CAAC,cAAAD,oBAAA,cAAAA,oBAAA,GAAI,EAC5C,CAAC,CACEE,GAAG,CAACC,IAAA;IAAA,IAAC,CAACC,KAAK,EAAEC,GAAG,CAAC,G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AAS,EAAE;MACb;IACF;EAAC,EAC0B,CAAC;AAChC"}
|
|
@@ -6,9 +6,13 @@ import { IrisGridThemeType } from './IrisGridTheme';
|
|
|
6
6
|
* can createDefaultIrisGridTheme once, and not per grid.
|
|
7
7
|
*/
|
|
8
8
|
export type IrisGridThemeContextValue = IrisGridThemeType;
|
|
9
|
-
export declare const IrisGridThemeContext: import("react").Context<
|
|
9
|
+
export declare const IrisGridThemeContext: import("react").Context<{
|
|
10
|
+
theme: IrisGridThemeContextValue | null;
|
|
11
|
+
density: 'compact' | 'regular' | 'spacious';
|
|
12
|
+
}>;
|
|
10
13
|
export interface IrisGridThemeProviderProps {
|
|
11
14
|
children: ReactNode;
|
|
15
|
+
density?: 'compact' | 'regular' | 'spacious';
|
|
12
16
|
}
|
|
13
|
-
export declare function IrisGridThemeProvider({ children, }: IrisGridThemeProviderProps): JSX.Element;
|
|
17
|
+
export declare function IrisGridThemeProvider({ children, density, }: IrisGridThemeProviderProps): JSX.Element;
|
|
14
18
|
//# sourceMappingURL=IrisGridThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridThemeProvider.d.ts","sourceRoot":"","sources":["../src/IrisGridThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAA8B,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAE1D,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"IrisGridThemeProvider.d.ts","sourceRoot":"","sources":["../src/IrisGridThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAA8B,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAE1D,eAAO,MAAM,oBAAoB;WACxB,yBAAyB,GAAG,IAAI;aAC9B,SAAS,GAAG,SAAS,GAAG,UAAU;EACN,CAAC;AAExC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,SAAS,CAAC;IAEpB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;CAC9C;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,OAAmB,GACpB,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAoB1C"}
|