@aquera/nile-visualization 2.9.17 → 2.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,6 +36,9 @@ To run a local development server that serves the basic demo located in `demo/in
36
36
 
37
37
  In this section, you can find the updates for each release of `nile-visualization`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
38
38
 
39
+ #### Version 2.9.18 (June 10, 2026)
40
+ - Nile Chart: Exposed the full `<nile-data-grid>` property surface through `<nile-chart>` — every public grid property is forwarded when using `type: 'grid'`(UIF-1260)
41
+
39
42
  #### Version 2.9.17 (June 04, 2026)
40
43
  - Nile Chart: Fixed the drilldown navigation issue and added pagination in nile-chart data-grid (UIF-1255)
41
44
 
@@ -1,6 +1,5 @@
1
1
  import type { Options } from 'highcharts';
2
- import type { NileDataGridColumn } from '@aquera/nile-data-grid';
3
- /** Tabular grid variant of `<nile-chart>`, renders a `<nile-data-grid>`. */
2
+ import type { NileDataGridColumn, ColumnResizeMode, ColumnResizeDirection, ColumnSizingState, ColumnPinningState, VisibilityState, RowSelectionState, ColumnOrderState, PaginationState } from '@aquera/nile-data-grid';
4
3
  export interface ChartGridConfigType {
5
4
  type: 'grid';
6
5
  data: unknown[];
@@ -8,10 +7,31 @@ export interface ChartGridConfigType {
8
7
  loading?: boolean;
9
8
  striped?: boolean;
10
9
  hoverable?: boolean;
10
+ variant?: 'default' | 'sleek' | 'sleek-condensed';
11
11
  stickyHeader?: boolean;
12
+ stickyPinnedHeader?: boolean;
12
13
  emptyMessage?: string;
13
14
  loadingMessage?: string;
15
+ loadingRows?: number;
14
16
  noMatchMessage?: string;
17
+ paginationEnabled?: boolean;
18
+ pagination?: PaginationState;
19
+ pageSizeOptions?: number[];
20
+ virtualized?: boolean;
21
+ estimatedRowHeight?: number;
22
+ overscan?: number;
23
+ scrollEndThreshold?: number;
24
+ maxHeight?: string;
25
+ columnResizingEnabled?: boolean;
26
+ columnReorderingEnabled?: boolean;
27
+ rowReorderingEnabled?: boolean;
28
+ columnResizeMode?: ColumnResizeMode;
29
+ columnResizeDirection?: ColumnResizeDirection;
30
+ columnSizing?: ColumnSizingState;
31
+ columnPinning?: ColumnPinningState;
32
+ columnVisibility?: VisibilityState;
33
+ rowSelection?: RowSelectionState;
34
+ columnOrder?: ColumnOrderState;
15
35
  height?: string;
16
36
  options?: Options;
17
37
  }
@@ -17,7 +17,7 @@ import type { GaugeBand } from '../nile-gauge-chart/nile-gauge-chart.js';
17
17
  import type { WaterfallDataPoint } from '../nile-waterfall-chart/nile-waterfall-chart.js';
18
18
  import type { KpiVariant, KpiValueFormat, KpiNumberSystem, SparklineType, TrendDirection } from '../nile-kpi-chart/nile-kpi-chart.js';
19
19
  import type { MapChartDataPoint } from '../nile-map-chart/nile-map-chart.js';
20
- import type { NileDataGridColumn } from '@aquera/nile-data-grid';
20
+ import type { NileDataGridColumn, ColumnResizeMode, ColumnResizeDirection, ColumnSizingState, ColumnPinningState, VisibilityState, RowSelectionState, ColumnOrderState, PaginationState } from '@aquera/nile-data-grid';
21
21
  import type { StackedChartSeriesData } from '../nile-stacked-chart/nile-stacked-chart.js';
22
22
  import type { ClusterChartSeriesData } from '../nile-cluster-chart/nile-cluster-chart.js';
23
23
  import type { HistogramSamples } from '../nile-histogram-chart/nile-histogram-chart.js';
@@ -138,14 +138,10 @@ export interface NileChartMenuConfig {
138
138
  items?: NileChartMenuItem[];
139
139
  }
140
140
  export interface NileAiConfig {
141
- /** Show the AI chat icon on the chart. Default: false. */
142
141
  enabled?: boolean;
143
- /** Placeholder text for the chat input. */
144
142
  placeholder?: string;
145
- /** Initial assistant message shown when the chat panel opens. */
146
143
  welcomeMessage?: string;
147
144
  }
148
- /** Fields shared by every chart config (card chrome, styling, loading). */
149
145
  export interface NileChartConfigBase {
150
146
  chartTitle?: string;
151
147
  chartSubtitle?: string;
@@ -155,17 +151,11 @@ export interface NileChartConfigBase {
155
151
  options?: import('highcharts').Options;
156
152
  summary?: string;
157
153
  toggleLabel?: string;
158
- /** Chart types the user can switch to. Shows type-switch UI when set. */
159
154
  switchableTypes?: ChartType[];
160
- /** How to aggregate bar-like data when converting to pie. Default: 'by-category'. */
161
155
  switchAggregation?: SwitchAggregation;
162
- /** AI chat configuration. When ai.enabled is true, shows the allsearch icon. */
163
156
  ai?: NileAiConfig;
164
- /** Controls the built-in actions menu in the chart header. */
165
157
  menu?: NileChartMenuConfig;
166
- /** Custom items appended at the bottom of the chart actions menu. */
167
158
  menuItems?: NileChartMenuItem[];
168
- /** Legend configuration — full Highcharts legend surface. */
169
159
  legend?: LegendConfig;
170
160
  chartBg?: string;
171
161
  chartBorderRadius?: string | number;
@@ -263,22 +253,43 @@ export interface NileMapChartConfig extends NileChartConfigBase {
263
253
  seriesType?: 'map' | 'mapline' | 'mappoint' | 'mapbubble' | 'tiledwebmap';
264
254
  zoom?: boolean;
265
255
  }
256
+ /**
257
+ * Tabular grid variant of `<nile-chart>` — renders a `<nile-data-grid>` and
258
+ * exposes its full public property surface.
259
+ *
260
+ * Use `type: 'grid'`.
261
+ */
266
262
  export interface NileGridChartConfig extends NileChartConfigBase {
267
263
  type: 'grid';
268
264
  data: unknown[];
269
265
  columns: NileDataGridColumn[];
270
266
  striped?: boolean;
271
267
  hoverable?: boolean;
268
+ variant?: 'default' | 'sleek' | 'sleek-condensed';
272
269
  stickyHeader?: boolean;
270
+ stickyPinnedHeader?: boolean;
273
271
  emptyMessage?: string;
274
272
  loadingMessage?: string;
273
+ loadingRows?: number;
275
274
  noMatchMessage?: string;
276
275
  paginationEnabled?: boolean;
277
- pagination?: {
278
- pageIndex: number;
279
- pageSize: number;
280
- };
276
+ pagination?: PaginationState;
281
277
  pageSizeOptions?: number[];
278
+ virtualized?: boolean;
279
+ estimatedRowHeight?: number;
280
+ overscan?: number;
281
+ scrollEndThreshold?: number;
282
+ maxHeight?: string;
283
+ columnResizingEnabled?: boolean;
284
+ columnReorderingEnabled?: boolean;
285
+ rowReorderingEnabled?: boolean;
286
+ columnResizeMode?: ColumnResizeMode;
287
+ columnResizeDirection?: ColumnResizeDirection;
288
+ columnSizing?: ColumnSizingState;
289
+ columnPinning?: ColumnPinningState;
290
+ columnVisibility?: VisibilityState;
291
+ rowSelection?: RowSelectionState;
292
+ columnOrder?: ColumnOrderState;
282
293
  }
283
294
  export interface NileTrendlineChartConfig extends NileChartConfigBase {
284
295
  type: 'trendline';
@@ -252,7 +252,7 @@ export const styles = css `
252
252
 
253
253
  .nile-chart-card--grid .nile-chart-inner {
254
254
  overflow: visible;
255
- contain: none;
255
+ contain: content;
256
256
  }
257
257
 
258
258
 
@@ -895,7 +895,10 @@ export const styles = css `
895
895
  flex-direction: column;
896
896
  gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
897
897
  flex: 1 1 auto;
898
- min-height: 0;
898
+ /* Grid cards put their height on <nile-data-grid>, which isn't rendered
899
+ while loading — so without a min-height the skeleton rows collapse to
900
+ nothing. Give it a floor so the head + rows lay out properly. */
901
+ min-height: 240px;
899
902
  }
900
903
  .nile-chart-skeleton-grid-head,
901
904
  .nile-chart-skeleton-grid-row {
@@ -102,6 +102,13 @@ const CORE_CHART_LABELS = {
102
102
  };
103
103
  const DEFAULT_GRID_PAGINATION = { pageIndex: 0, pageSize: 10 };
104
104
  const DEFAULT_GRID_PAGE_SIZE_OPTIONS = [5, 10, 20, 50];
105
+ // Stable default references for the grid's controlled-state props, so passing
106
+ // nothing doesn't create a fresh object each render (which would churn the grid).
107
+ const DEFAULT_GRID_COLUMN_SIZING = {};
108
+ const DEFAULT_GRID_COLUMN_PINNING = { left: [], right: [] };
109
+ const DEFAULT_GRID_COLUMN_VISIBILITY = {};
110
+ const DEFAULT_GRID_ROW_SELECTION = {};
111
+ const DEFAULT_GRID_COLUMN_ORDER = [];
105
112
  function chartTypeLabel(type) {
106
113
  const hit = CORE_CHART_LABELS[type];
107
114
  if (hit)
@@ -1723,6 +1730,11 @@ let NileChart = class NileChart extends NileElement {
1723
1730
  '--nile-data-grid-border-color:transparent;' +
1724
1731
  '--nile-data-grid-shadow:none;' +
1725
1732
  (config.height ? `height:${config.height};` : '');
1733
+ // Every public <nile-data-grid> property is forwarded here. Optional
1734
+ // props fall back to the grid's own defaults so an omitted value never
1735
+ // clobbers them. The grid's events (nile-sort-change, nile-pagination-change,
1736
+ // nile-row-selection-change, …) are composed + bubbling, so they cross the
1737
+ // shadow boundary and reach listeners on <nile-chart> without re-emitting.
1726
1738
  return html `<nile-data-grid
1727
1739
  class="nile-chart-grid"
1728
1740
  .data=${config.data}
@@ -1730,13 +1742,31 @@ let NileChart = class NileChart extends NileElement {
1730
1742
  .loading=${config.loading ?? false}
1731
1743
  .striped=${config.striped ?? false}
1732
1744
  .hoverable=${config.hoverable ?? false}
1745
+ .variant=${config.variant ?? 'default'}
1733
1746
  .stickyHeader=${config.stickyHeader ?? false}
1747
+ .stickyPinnedHeader=${config.stickyPinnedHeader ?? false}
1734
1748
  .emptyMessage=${config.emptyMessage ?? 'No data'}
1735
1749
  .loadingMessage=${config.loadingMessage ?? 'Loading…'}
1750
+ .loadingRows=${config.loadingRows ?? 5}
1736
1751
  .noMatchMessage=${config.noMatchMessage ?? 'No matching rows'}
1737
1752
  .paginationEnabled=${config.paginationEnabled ?? false}
1738
1753
  .pagination=${config.pagination ?? DEFAULT_GRID_PAGINATION}
1739
1754
  .pageSizeOptions=${config.pageSizeOptions ?? DEFAULT_GRID_PAGE_SIZE_OPTIONS}
1755
+ .virtualized=${config.virtualized ?? false}
1756
+ .estimatedRowHeight=${config.estimatedRowHeight ?? 44}
1757
+ .overscan=${config.overscan ?? 10}
1758
+ .scrollEndThreshold=${config.scrollEndThreshold ?? 200}
1759
+ .maxHeight=${config.maxHeight ?? null}
1760
+ .columnResizingEnabled=${config.columnResizingEnabled ?? false}
1761
+ .columnReorderingEnabled=${config.columnReorderingEnabled ?? false}
1762
+ .rowReorderingEnabled=${config.rowReorderingEnabled ?? false}
1763
+ .columnResizeMode=${config.columnResizeMode ?? 'onChange'}
1764
+ .columnResizeDirection=${config.columnResizeDirection ?? 'ltr'}
1765
+ .columnSizing=${config.columnSizing ?? DEFAULT_GRID_COLUMN_SIZING}
1766
+ .columnPinning=${config.columnPinning ?? DEFAULT_GRID_COLUMN_PINNING}
1767
+ .columnVisibility=${config.columnVisibility ?? DEFAULT_GRID_COLUMN_VISIBILITY}
1768
+ .rowSelection=${config.rowSelection ?? DEFAULT_GRID_ROW_SELECTION}
1769
+ .columnOrder=${config.columnOrder ?? DEFAULT_GRID_COLUMN_ORDER}
1740
1770
  style=${gridChrome}
1741
1771
  ></nile-data-grid>`;
1742
1772
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "2.9.17",
3
+ "version": "2.9.18",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",