@aquera/nile-visualization 2.9.54 → 2.9.55
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 +3 -0
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.css.js +51 -3
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -1
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.js +8 -21
- package/dist/src/nile-master-detail-chart/nile-master-detail-chart.test.js +3 -3
- package/package.json +1 -1
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.55 (November 25, 2026)
|
|
40
|
+
- Nile Master-Detail Chart: navigator handle value pills stay centred on their own handle instead of being pushed apart, and overlapping pills dim the one underneath. The `navigator-controls` zoom control now overlays the chart's top-right corner without reserving right spacing, and is revealed on hover / focus (UIF-1440)
|
|
41
|
+
|
|
39
42
|
#### Version 2.9.54 (November 23, 2026)
|
|
40
43
|
- Nile Master-Detail Chart: the `navigator-slider` thumb no longer shows its internal 0–1000 position in a tooltip (UIF-1439)
|
|
41
44
|
- Nile Master-Detail Chart: new `navigator-handles` (`navigatorHandles` in `<nile-chart>` config) overlays draggable grips on the master window — edge grips resize, the body moves it (width kept); keyboard-focusable `role="slider"` thumbs (← / → one point, Shift ±10%, Home/End to the bounds). Works in master+detail and `master-only`, turns on `navigator-default-window`, reuses `nile-chart-selection`. New CSS parts `navigator-handle`, `navigator-window`. Off by default (UIF-1439)
|
|
@@ -179,6 +179,13 @@ export const styles = css `
|
|
|
179
179
|
box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
/* The grip being hovered, focused or dragged lifts above its neighbour so its pill is never covered. */
|
|
183
|
+
.navigator-handle:hover,
|
|
184
|
+
.navigator-handle:focus-visible,
|
|
185
|
+
.navigator-handle:active {
|
|
186
|
+
z-index: 2;
|
|
187
|
+
}
|
|
188
|
+
|
|
182
189
|
.navigator-handle-label {
|
|
183
190
|
position: absolute;
|
|
184
191
|
bottom: calc(100% + var(--nile-spacing-xs, var(--ng-spacing-xs, 4px)));
|
|
@@ -194,7 +201,7 @@ export const styles = css `
|
|
|
194
201
|
background: var(--nile-colors-primary-600, var(--ng-colors-bg-brand-solid));
|
|
195
202
|
border-radius: var(--nile-radius-full, var(--ng-radius-full, 9999px));
|
|
196
203
|
pointer-events: none;
|
|
197
|
-
transition: opacity var(--nile-transition-duration-default,
|
|
204
|
+
transition: opacity var(--nile-transition-duration-default, var(--ng-transition-duration-default)) ease;
|
|
198
205
|
}
|
|
199
206
|
|
|
200
207
|
.navigator-overlay--label-active .navigator-handle-label {
|
|
@@ -208,6 +215,26 @@ export const styles = css `
|
|
|
208
215
|
opacity: 1;
|
|
209
216
|
}
|
|
210
217
|
|
|
218
|
+
/* Always-visible pills that overlap: the one underneath dims so the one on top reads clearly.
|
|
219
|
+
Idle, the end pill is on top; otherwise the grip in use is. */
|
|
220
|
+
.navigator-overlay:not(.navigator-overlay--label-active)[data-crowded] .navigator-handle[data-edge='start'] .navigator-handle-label {
|
|
221
|
+
opacity: 0.5;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.navigator-overlay:not(.navigator-overlay--label-active)[data-crowded]
|
|
225
|
+
.navigator-handle[data-edge='start']:is(:hover, :focus-visible, :active)
|
|
226
|
+
.navigator-handle-label {
|
|
227
|
+
opacity: 1;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.navigator-overlay:not(.navigator-overlay--label-active)[data-crowded]:has(
|
|
231
|
+
.navigator-handle[data-edge='start']:is(:hover, :focus-visible, :active)
|
|
232
|
+
)
|
|
233
|
+
.navigator-handle[data-edge='end']
|
|
234
|
+
.navigator-handle-label {
|
|
235
|
+
opacity: 0.5;
|
|
236
|
+
}
|
|
237
|
+
|
|
211
238
|
@media (prefers-reduced-motion: reduce) {
|
|
212
239
|
.navigator-handle-label {
|
|
213
240
|
transition: none;
|
|
@@ -251,8 +278,8 @@ export const styles = css `
|
|
|
251
278
|
so disabled buttons stay opaque (only the icon dims) and the chart never shows through. */
|
|
252
279
|
.navigator {
|
|
253
280
|
position: absolute;
|
|
254
|
-
top: var(--nile-master-detail-navigator-offset, var(--nile-spacing-
|
|
255
|
-
right: var(--nile-master-detail-navigator-offset, var(--nile-spacing-
|
|
281
|
+
top: var(--nile-master-detail-navigator-offset, var(--nile-spacing-xl, var(--ng-spacing-xl)));
|
|
282
|
+
right: var(--nile-master-detail-navigator-offset, var(--nile-spacing-xl, var(--ng-spacing-xl)));
|
|
256
283
|
z-index: 2;
|
|
257
284
|
display: flex;
|
|
258
285
|
flex-direction: column;
|
|
@@ -262,6 +289,27 @@ export const styles = css `
|
|
|
262
289
|
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
263
290
|
border-radius: var(--nile-radius-sm, var(--ng-radius-md, 8px));
|
|
264
291
|
box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));
|
|
292
|
+
/* Revealed on hover / keyboard focus; always shown where there is no hover (touch). */
|
|
293
|
+
opacity: 0;
|
|
294
|
+
transition: opacity var(--nile-transition-duration-default, var(--ng-transition-duration-default)) ease;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.chart-stack:hover .navigator,
|
|
298
|
+
.chart-stack:focus-within .navigator,
|
|
299
|
+
.navigator:focus-within {
|
|
300
|
+
opacity: 1;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@media (hover: none) {
|
|
304
|
+
.navigator {
|
|
305
|
+
opacity: 1;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@media (prefers-reduced-motion: reduce) {
|
|
310
|
+
.navigator {
|
|
311
|
+
transition: none;
|
|
312
|
+
}
|
|
265
313
|
}
|
|
266
314
|
|
|
267
315
|
.navigator-button {
|
|
@@ -272,7 +272,7 @@ export declare class NileMasterDetailChart extends NileElement {
|
|
|
272
272
|
private get _masterAxis();
|
|
273
273
|
/** Positions the two grips and the body over the master plot from the current window. No-op when off. */
|
|
274
274
|
private _positionHandles;
|
|
275
|
-
/** Centres each value pill on its edge
|
|
275
|
+
/** Centres each value pill on top of its edge and keeps both inside the master. */
|
|
276
276
|
private _placeLabels;
|
|
277
277
|
private _onGripStart;
|
|
278
278
|
private _onGripMove;
|
|
@@ -35,8 +35,6 @@ export const MASTER_DETAIL_CHART_PARTS = [
|
|
|
35
35
|
];
|
|
36
36
|
/** Duration units accepted by `navigator-default-window`, `navigator-pan-step` and `navigator-slider-step`. */
|
|
37
37
|
const DURATION_UNITS = { m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
38
|
-
/** Right spacing (px) reserved on the chart under the zoom control: 32px control + 8px offset + 8px gap. */
|
|
39
|
-
const NAV_CONTROL_GUTTER = 48;
|
|
40
38
|
/** Room (px) reserved above the master plot for the `labeled` handles' value pills. */
|
|
41
39
|
const LABEL_ROOM = 26;
|
|
42
40
|
/**
|
|
@@ -530,8 +528,8 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
530
528
|
shared: true,
|
|
531
529
|
};
|
|
532
530
|
const merged = deepMerge({
|
|
533
|
-
//
|
|
534
|
-
chart: { type: this.detailType, reflow: true
|
|
531
|
+
// The + / − zoom control overlays the chart's top-right corner; it reserves no space.
|
|
532
|
+
chart: { type: this.detailType, reflow: true },
|
|
535
533
|
title: { text: this.detailTitle || undefined },
|
|
536
534
|
xAxis: {
|
|
537
535
|
type: this.xAxisType,
|
|
@@ -580,7 +578,6 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
580
578
|
// masterOnly fills the container, so its auto margins already reserve
|
|
581
579
|
// room — leave that mode untouched.
|
|
582
580
|
marginBottom: mo ? undefined : 30,
|
|
583
|
-
spacingRight: mo && this.navigatorControls ? NAV_CONTROL_GUTTER : undefined,
|
|
584
581
|
spacingTop: this._labeledHandles && !this.masterTitle ? 10 + LABEL_ROOM : undefined,
|
|
585
582
|
zoomType: 'x',
|
|
586
583
|
events: {
|
|
@@ -1058,7 +1055,7 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
1058
1055
|
m.style.height = `${height}px`;
|
|
1059
1056
|
});
|
|
1060
1057
|
}
|
|
1061
|
-
/** Centres each value pill on its edge
|
|
1058
|
+
/** Centres each value pill on top of its edge and keeps both inside the master. */
|
|
1062
1059
|
_placeLabels(grips, left, right) {
|
|
1063
1060
|
const width = grips[0]?.offsetParent?.clientWidth ?? 0;
|
|
1064
1061
|
const labelOf = (edge) => Array.from(grips)
|
|
@@ -1070,21 +1067,11 @@ let NileMasterDetailChart = class NileMasterDetailChart extends NileElement {
|
|
|
1070
1067
|
return;
|
|
1071
1068
|
const ws = start.offsetWidth;
|
|
1072
1069
|
const we = end.offsetWidth;
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
const mid = (cs + ce) / 2 + (ws - we) / 4;
|
|
1079
|
-
cs = mid - needed / 2;
|
|
1080
|
-
ce = mid + needed / 2;
|
|
1081
|
-
}
|
|
1082
|
-
const under = Math.max(0, ws / 2 - cs);
|
|
1083
|
-
cs += under;
|
|
1084
|
-
ce += under;
|
|
1085
|
-
const over = Math.max(0, ce + we / 2 - width);
|
|
1086
|
-
cs -= over;
|
|
1087
|
-
ce -= over;
|
|
1070
|
+
// Each pill stays centred on top of its own handle; it only slides sideways to stay inside the master.
|
|
1071
|
+
const cs = Math.min(Math.max(left, ws / 2), width - ws / 2);
|
|
1072
|
+
const ce = Math.min(Math.max(right, we / 2), width - we / 2);
|
|
1073
|
+
// Crowded: the CSS dims the pill underneath so the one on top reads clearly.
|
|
1074
|
+
grips[0]?.parentElement?.toggleAttribute('data-crowded', right - left < (ws + we) / 2 + 4);
|
|
1088
1075
|
start.style.marginLeft = cs !== left ? `${cs - left}px` : '';
|
|
1089
1076
|
end.style.marginLeft = ce !== right ? `${ce - right}px` : '';
|
|
1090
1077
|
}
|
|
@@ -512,13 +512,13 @@ describe('NileMasterDetailChart — navigator controls', () => {
|
|
|
512
512
|
await el.updateComplete;
|
|
513
513
|
expect(nav(el)._window).to.deep.equal({ min: DT_MIN, max: DT_MAX });
|
|
514
514
|
});
|
|
515
|
-
it('43f. the
|
|
515
|
+
it('43f. the zoom control overlays the chart (no reserved spacing), and the buttons are native and opaque', async () => {
|
|
516
516
|
const plain = await mount({ series: DT_SERIES });
|
|
517
517
|
expect(detailOpts(plain).chart.spacingRight).to.be.undefined;
|
|
518
518
|
const el = await mount({ series: DT_SERIES, navigatorControls: true });
|
|
519
|
-
expect(detailOpts(el).chart.spacingRight).to.
|
|
519
|
+
expect(detailOpts(el).chart.spacingRight).to.be.undefined;
|
|
520
520
|
const only = await mount({ series: DT_SERIES, navigatorControls: true, masterOnly: true });
|
|
521
|
-
expect(masterOpts(only).chart.spacingRight).to.
|
|
521
|
+
expect(masterOpts(only).chart.spacingRight).to.be.undefined;
|
|
522
522
|
const out = btn(el, 'Zoom out'); // disabled at full range
|
|
523
523
|
expect(out.tagName).to.equal('BUTTON');
|
|
524
524
|
expect(getComputedStyle(out).opacity).to.equal('1');
|