Files
superset2/superset-frontend/plugins/plugin-chart-table
Claude 421252b343 fix(tests): update test mocks for jsdom 30 window.location and CSS changes
jsdom 30 (shipped with jest-environment-jsdom 30) makes window.location
non-configurable, breaking the Object.defineProperty and delete patterns
used across 19 test files.  Also introduces stricter CSS normalization
(rgba(x,y,z,1) -> rgb(x,y,z), alpha precision rounding, named colors to
rgb()) and stricter CSS font-shorthand parsing on SVG nodes.

Changes:
- Replace every Object.defineProperty(window, 'location', ...) and
  delete window.location; window.location = ... with
  jest.spyOn(window, 'location', 'get').mockReturnValue(...) plus
  .mockRestore() for cleanup
- Use getter/setter objects on the mock return value for tests that write
  to window.location.href or window.location.protocol
- Replace jest.spyOn(window, 'window', 'get') (also broken in jsdom 30)
  with jest.spyOn(window, 'location', 'get') in getDashboardUrl tests
- TableChart: rgba(172,225,196,1) -> rgb(172,225,196);
  rgba(172,225,196,0.812) -> rgba(172,225,196,0.81)
- DropdownContainer: 'background-color: red' -> 'background-color: rgb(255, 0, 0)'
- updateTextNode: fix CSS font shorthand order from
  'italic 30px Lobster 700' (invalid) to 'italic 700 30px Lobster' (valid)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 08:19:24 -07:00
..

@superset-ui/plugin-chart-table

Version Libraries.io

This plugin provides Table chart for Superset.

Usage

Configure key, which can be any string, and register the plugin. This key will be used to lookup this chart throughout the app.

import TableChartPlugin from '@superset-ui/plugin-chart-table';

new TableChartPlugin().configure({ key: 'table' }).register();

Then use it via SuperChart. See storybook for more details.

<SuperChart
  chartType="table"
  width={600}
  height={600}
  formData={...}
  queriesData={[{
    data: {...},
  }]}
/>