@aquera/nile-visualization 2.9.17 → 2.9.19
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,12 @@ 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.19 (June 16, 2026)
|
|
40
|
+
- Nile Chart: Forwarded the new data-grid pagination sub-properties (`paginationVariant`, `totalItems`, `currentPage`, `pageSize`) through `<nile-chart>` when using `type: 'grid'` (UIF-1265)
|
|
41
|
+
|
|
42
|
+
#### Version 2.9.18 (June 10, 2026)
|
|
43
|
+
- 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)
|
|
44
|
+
|
|
39
45
|
#### Version 2.9.17 (June 04, 2026)
|
|
40
46
|
- Nile Chart: Fixed the drilldown navigation issue and added pagination in nile-chart data-grid (UIF-1255)
|
|
41
47
|
|
|
@@ -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,35 @@ 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
|
+
paginationVariant?: 'fluid' | 'compact' | 'mini';
|
|
21
|
+
totalItems?: number;
|
|
22
|
+
currentPage?: number;
|
|
23
|
+
pageSize?: number;
|
|
24
|
+
virtualized?: boolean;
|
|
25
|
+
estimatedRowHeight?: number;
|
|
26
|
+
overscan?: number;
|
|
27
|
+
scrollEndThreshold?: number;
|
|
28
|
+
maxHeight?: string;
|
|
29
|
+
columnResizingEnabled?: boolean;
|
|
30
|
+
columnReorderingEnabled?: boolean;
|
|
31
|
+
rowReorderingEnabled?: boolean;
|
|
32
|
+
columnResizeMode?: ColumnResizeMode;
|
|
33
|
+
columnResizeDirection?: ColumnResizeDirection;
|
|
34
|
+
columnSizing?: ColumnSizingState;
|
|
35
|
+
columnPinning?: ColumnPinningState;
|
|
36
|
+
columnVisibility?: VisibilityState;
|
|
37
|
+
rowSelection?: RowSelectionState;
|
|
38
|
+
columnOrder?: ColumnOrderState;
|
|
15
39
|
height?: string;
|
|
16
40
|
options?: Options;
|
|
17
41
|
}
|
|
@@ -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,47 @@ 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
|
+
paginationVariant?: 'fluid' | 'compact' | 'mini';
|
|
279
|
+
totalItems?: number;
|
|
280
|
+
currentPage?: number;
|
|
281
|
+
pageSize?: number;
|
|
282
|
+
virtualized?: boolean;
|
|
283
|
+
estimatedRowHeight?: number;
|
|
284
|
+
overscan?: number;
|
|
285
|
+
scrollEndThreshold?: number;
|
|
286
|
+
maxHeight?: string;
|
|
287
|
+
columnResizingEnabled?: boolean;
|
|
288
|
+
columnReorderingEnabled?: boolean;
|
|
289
|
+
rowReorderingEnabled?: boolean;
|
|
290
|
+
columnResizeMode?: ColumnResizeMode;
|
|
291
|
+
columnResizeDirection?: ColumnResizeDirection;
|
|
292
|
+
columnSizing?: ColumnSizingState;
|
|
293
|
+
columnPinning?: ColumnPinningState;
|
|
294
|
+
columnVisibility?: VisibilityState;
|
|
295
|
+
rowSelection?: RowSelectionState;
|
|
296
|
+
columnOrder?: ColumnOrderState;
|
|
282
297
|
}
|
|
283
298
|
export interface NileTrendlineChartConfig extends NileChartConfigBase {
|
|
284
299
|
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:
|
|
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
|
-
|
|
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,35 @@ 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
|
+
.paginationVariant=${config.paginationVariant ?? 'fluid'}
|
|
1756
|
+
.totalItems=${config.totalItems ?? null}
|
|
1757
|
+
.currentPage=${config.currentPage ?? null}
|
|
1758
|
+
.pageSize=${config.pageSize ?? null}
|
|
1759
|
+
.virtualized=${config.virtualized ?? false}
|
|
1760
|
+
.estimatedRowHeight=${config.estimatedRowHeight ?? 44}
|
|
1761
|
+
.overscan=${config.overscan ?? 10}
|
|
1762
|
+
.scrollEndThreshold=${config.scrollEndThreshold ?? 200}
|
|
1763
|
+
.maxHeight=${config.maxHeight ?? null}
|
|
1764
|
+
.columnResizingEnabled=${config.columnResizingEnabled ?? false}
|
|
1765
|
+
.columnReorderingEnabled=${config.columnReorderingEnabled ?? false}
|
|
1766
|
+
.rowReorderingEnabled=${config.rowReorderingEnabled ?? false}
|
|
1767
|
+
.columnResizeMode=${config.columnResizeMode ?? 'onChange'}
|
|
1768
|
+
.columnResizeDirection=${config.columnResizeDirection ?? 'ltr'}
|
|
1769
|
+
.columnSizing=${config.columnSizing ?? DEFAULT_GRID_COLUMN_SIZING}
|
|
1770
|
+
.columnPinning=${config.columnPinning ?? DEFAULT_GRID_COLUMN_PINNING}
|
|
1771
|
+
.columnVisibility=${config.columnVisibility ?? DEFAULT_GRID_COLUMN_VISIBILITY}
|
|
1772
|
+
.rowSelection=${config.rowSelection ?? DEFAULT_GRID_ROW_SELECTION}
|
|
1773
|
+
.columnOrder=${config.columnOrder ?? DEFAULT_GRID_COLUMN_ORDER}
|
|
1740
1774
|
style=${gridChrome}
|
|
1741
1775
|
></nile-data-grid>`;
|
|
1742
1776
|
}
|