@aquera/nile-visualization 1.1.0 → 1.3.0

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.
@@ -13,6 +13,7 @@ import type { ChartRadarConfigType } from './chart-radar-config.type.js';
13
13
  import type { ChartGaugeConfigType } from './chart-gauge-config.type.js';
14
14
  import type { ChartWaterfallConfigType } from './chart-waterfall-config.type.js';
15
15
  import type { ChartMapConfigType } from './chart-map-config.type.js';
16
+ import type { ChartGridConfigType } from './chart-grid-config.type.js';
16
17
  import type { PrimitiveChartConfigType } from './primitive-chart-config.type.js';
17
18
  /** Core chart configs (bar, pie, …) plus all primitive series types — use with `<nile-chart>` via `chart.type`. */
18
- export type ChartConfigType = ChartBarConfigType | ChartPieConfigType | ChartTrendlineConfigType | ChartAnomalyConfigType | ChartLineConfigType | ChartAreaConfigType | ChartColumnConfigType | ChartDonutConfigType | ChartScatterConfigType | ChartBubbleConfigType | ChartSplineConfigType | ChartRadarConfigType | ChartGaugeConfigType | ChartWaterfallConfigType | ChartMapConfigType | PrimitiveChartConfigType;
19
+ export type ChartConfigType = ChartBarConfigType | ChartPieConfigType | ChartTrendlineConfigType | ChartAnomalyConfigType | ChartLineConfigType | ChartAreaConfigType | ChartColumnConfigType | ChartDonutConfigType | ChartScatterConfigType | ChartBubbleConfigType | ChartSplineConfigType | ChartRadarConfigType | ChartGaugeConfigType | ChartWaterfallConfigType | ChartMapConfigType | ChartGridConfigType | PrimitiveChartConfigType;
@@ -0,0 +1,16 @@
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>`. */
4
+ export interface ChartGridConfigType {
5
+ type: 'grid';
6
+ data: unknown[];
7
+ columns: NileDataGridColumn[];
8
+ loading?: boolean;
9
+ striped?: boolean;
10
+ hoverable?: boolean;
11
+ emptyMessage?: string;
12
+ loadingMessage?: string;
13
+ noMatchMessage?: string;
14
+ height?: string;
15
+ options?: Options;
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=chart-grid-config.type.js.map
@@ -16,6 +16,7 @@ import type { RadarChartSeriesData } from '../nile-radar-chart/nile-radar-chart.
16
16
  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 { MapChartDataPoint } from '../nile-map-chart/nile-map-chart.js';
19
+ import type { NileDataGridColumn } from '@aquera/nile-data-grid';
19
20
  export type SwitchAggregation = 'by-category' | 'by-series' | 'flatten';
20
21
  export interface NileAiConfig {
21
22
  /** Show the AI chat icon on the chart. Default: false. */
@@ -157,6 +158,16 @@ export interface NileMapChartConfig extends NileChartConfigBase {
157
158
  /** Enable mouse-wheel zoom, double-click zoom, and +/− buttons. Default: true. */
158
159
  zoom?: boolean;
159
160
  }
161
+ export interface NileGridChartConfig extends NileChartConfigBase {
162
+ type: 'grid';
163
+ data: unknown[];
164
+ columns: NileDataGridColumn[];
165
+ striped?: boolean;
166
+ hoverable?: boolean;
167
+ emptyMessage?: string;
168
+ loadingMessage?: string;
169
+ noMatchMessage?: string;
170
+ }
160
171
  /** Flat config for `<nile-chart>`: discriminated `chart` fields plus merged `aq` / card chrome. */
161
172
  export type NileChartConfig = ChartConfigType & NileChartConfigBase;
162
173
  export type NileKpiChartConfig = Extract<NileChartConfig, {
@@ -278,38 +278,37 @@ export const styles = css `
278
278
  /* ── AI Chat Trigger (in header) ── */
279
279
 
280
280
  .ai-trigger {
281
- display: flex;
281
+ display: inline-flex;
282
282
  align-items: center;
283
283
  justify-content: center;
284
- width: var(--nile-width-28px, var(--ng-height-28px));
285
- height: var(--nile-width-28px, var(--ng-height-28px));
284
+ width: 28px;
285
+ height: 28px;
286
286
  padding: 0;
287
- border: none;
288
- border-radius: var(--nile-radius-radius-lg, var(--ng-radius-sm));
289
- background: transparent;
290
- color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
287
+ border-radius: var(--ng-radius-md, 10px);
288
+ background: var(--ng-componentcolors-utility-brand-50, #EFF4FF);
289
+ border: 1.5px solid var(--ng-componentcolors-utility-brand-200, #C7D7FE);
290
+ box-shadow: 0 4px 20px rgba(41, 112, 255, 0.12);
291
+ color: var(--ng-componentcolors-utility-brand-600, #2970FF);
291
292
  cursor: pointer;
292
- transition: background var(--nile-transition-duration-short, var(--ng-transition-duration-fast)) ease, color var(--nile-transition-duration-short, var(--ng-transition-duration-fast)) ease;
293
+ transition: background 150ms ease;
294
+ flex-shrink: 0;
295
+ outline: none;
293
296
  }
294
297
 
295
- .ai-trigger:hover {
296
- background: transparent;
297
- color: var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));
298
+ .ai-trigger:hover,
299
+ .ai-trigger:focus-visible {
300
+ background: var(--ng-componentcolors-utility-brand-100, #DBE8FF);
298
301
  }
302
+
299
303
  .chart-inner--kpi {
300
304
  overflow-x: hidden;
301
305
  overflow-y: auto;
302
306
  -webkit-overflow-scrolling: touch;
303
307
  contain: none;
304
308
  }
305
- .ai-trigger.active {
306
- background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary));
307
- color: var(--nile-colors-primary-700, var(--ng-colors-bg-brand-solid-hover));
308
- }
309
309
 
310
- .ai-trigger:focus-visible {
311
- outline: var(--nile-border-width-2, var(--ng-stroke-width-2)) solid var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));
312
- outline-offset: var(--nile-spacing-1px, var(--ng-outline-offset-1));
310
+ .ai-trigger.active {
311
+ background: var(--ng-componentcolors-utility-brand-100, #DBE8FF);
313
312
  }
314
313
 
315
314
  /* ── AI Chat Panel Overlay ── */
@@ -48,6 +48,7 @@ import '../nile-polygon-chart/index.js';
48
48
  import '../nile-vector-chart/index.js';
49
49
  import '../nile-xrange-chart/index.js';
50
50
  import '../nile-kpi-chart/index.js';
51
+ import '@aquera/nile-data-grid';
51
52
  import '../nile-ai-panel/index.js';
52
53
  export declare class NileChart extends NileElement {
53
54
  static styles: CSSResultGroup;
@@ -51,6 +51,7 @@ import '../nile-polygon-chart/index.js';
51
51
  import '../nile-vector-chart/index.js';
52
52
  import '../nile-xrange-chart/index.js';
53
53
  import '../nile-kpi-chart/index.js';
54
+ import '@aquera/nile-data-grid';
54
55
  import '../nile-ai-panel/index.js';
55
56
  const CORE_CHART_LABELS = {
56
57
  bar: 'Bar',
@@ -88,6 +89,7 @@ const CORE_CHART_LABELS = {
88
89
  lollipop: 'Lollipop',
89
90
  'line-column': 'Line + column',
90
91
  kpi: 'KPI',
92
+ grid: 'Grid',
91
93
  };
92
94
  function chartTypeLabel(type) {
93
95
  const hit = CORE_CHART_LABELS[type];
@@ -890,6 +892,27 @@ let NileChart = class NileChart extends NileElement {
890
892
  },
891
893
  }}
892
894
  ></nile-kpi-chart>`;
895
+ }
896
+ case 'grid': {
897
+ const gridChrome = '--nile-data-grid-radius:0;' +
898
+ '--nile-data-grid-border-color:transparent;' +
899
+ '--nile-data-grid-shadow:none;' +
900
+ 'display:block;';
901
+ const gridStyle = config.height
902
+ ? `${gridChrome}height:${config.height};`
903
+ : gridChrome;
904
+ return html `<nile-data-grid
905
+ class="nile-chart-grid"
906
+ .data=${config.data}
907
+ .columns=${config.columns}
908
+ .loading=${config.loading ?? false}
909
+ .striped=${config.striped ?? false}
910
+ .hoverable=${config.hoverable ?? false}
911
+ .emptyMessage=${config.emptyMessage ?? 'No data'}
912
+ .loadingMessage=${config.loadingMessage ?? 'Loading\u2026'}
913
+ .noMatchMessage=${config.noMatchMessage ?? 'No matching rows'}
914
+ style=${gridStyle}
915
+ ></nile-data-grid>`;
893
916
  }
894
917
  default: {
895
918
  const _exhaustive = config;
@@ -36,4 +36,6 @@ export interface NileExecutiveSummaryConfig {
36
36
  closeOnEscape?: boolean;
37
37
  /** Prevent the drawer from closing when the overlay is clicked. Default: false */
38
38
  preventOverlayClose?: boolean;
39
+ zIndex?: number;
40
+ hideOverlay?: boolean;
39
41
  }
@@ -11,8 +11,7 @@ export const styles = css `
11
11
  -webkit-font-smoothing: antialiased;
12
12
  -moz-osx-font-smoothing: grayscale;
13
13
  text-rendering: optimizeLegibility;
14
- display: inline-block;
15
- position: relative;
14
+ display: contents;
16
15
  }
17
16
 
18
17
  :host *,
@@ -78,6 +78,8 @@ export declare class NileExecutiveSummary extends NileElement {
78
78
  * typewriter animation begins if the drawer is already open.
79
79
  */
80
80
  loading: boolean;
81
+ zIndex: number | null;
82
+ hideOverlay: boolean;
81
83
  /** @internal Characters revealed so far during typing. */
82
84
  private displayedText;
83
85
  /** @internal Whether typing is still in progress (drives cursor visibility). */
@@ -91,6 +93,7 @@ export declare class NileExecutiveSummary extends NileElement {
91
93
  private lockScroll;
92
94
  private unlockScroll;
93
95
  private animatePanel;
96
+ private get overlayHidden();
94
97
  private animateOverlay;
95
98
  private requestClose;
96
99
  private startTyping;
@@ -7,6 +7,7 @@
7
7
  import { __decorate } from "tslib";
8
8
  import { customElement, property, query, state } from 'lit/decorators.js';
9
9
  import { classMap } from 'lit/directives/class-map.js';
10
+ import { styleMap } from 'lit/directives/style-map.js';
10
11
  import { html } from 'lit';
11
12
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
12
13
  import NileElement from '../internal/nile-element.js';
@@ -79,6 +80,8 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
79
80
  * typewriter animation begins if the drawer is already open.
80
81
  */
81
82
  this.loading = false;
83
+ this.zIndex = null;
84
+ this.hideOverlay = false;
82
85
  /** @internal Characters revealed so far during typing. */
83
86
  this.displayedText = '';
84
87
  /** @internal Whether typing is still in progress (drives cursor visibility). */
@@ -133,7 +136,12 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
133
136
  const to = show ? { opacity: '1', translate: '0' } : { opacity: '0', translate: '100%' };
134
137
  await this.panel.animate([from, to], { duration: 250, easing: 'ease', fill: 'forwards' }).finished;
135
138
  }
139
+ get overlayHidden() {
140
+ return this.hideOverlay || (this.config?.hideOverlay ?? false);
141
+ }
136
142
  async animateOverlay(show) {
143
+ if (!this.overlay)
144
+ return;
137
145
  const from = show ? { opacity: '0' } : { opacity: '1' };
138
146
  const to = show ? { opacity: '1' } : { opacity: '0' };
139
147
  await this.overlay.animate([from, to], { duration: 250, fill: 'forwards' }).finished;
@@ -226,6 +234,10 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
226
234
  const buttonLabel = this.config?.buttonLabel ?? 'Executive Summary';
227
235
  const buttonVariant = this.config?.buttonVariant ?? 'primary';
228
236
  const drawerLabel = this.config?.drawerLabel ?? 'Executive Summary';
237
+ const resolvedZ = this.zIndex ?? this.config?.zIndex;
238
+ const backdropStyles = resolvedZ != null
239
+ ? { '--executive-summary-z-index': String(resolvedZ), zIndex: String(resolvedZ) }
240
+ : {};
229
241
  return html `
230
242
  <div part="base">
231
243
 
@@ -240,14 +252,18 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
240
252
  >${buttonLabel}</nile-button>
241
253
 
242
254
  <!-- Fixed backdrop: overlay + panel -->
243
- <div class="es-backdrop">
255
+ <div class="es-backdrop" style=${styleMap(backdropStyles)}>
244
256
 
245
- <div
246
- part="overlay"
247
- class="es-overlay"
248
- @click=${() => this.requestClose('overlay')}
249
- tabindex="-1"
250
- ></div>
257
+ ${this.overlayHidden
258
+ ? ''
259
+ : html `
260
+ <div
261
+ part="overlay"
262
+ class="es-overlay"
263
+ @click=${() => this.requestClose('overlay')}
264
+ tabindex="-1"
265
+ ></div>
266
+ `}
251
267
 
252
268
  <div
253
269
  part="panel"
@@ -323,6 +339,12 @@ __decorate([
323
339
  __decorate([
324
340
  property({ type: Boolean, reflect: true })
325
341
  ], NileExecutiveSummary.prototype, "loading", void 0);
342
+ __decorate([
343
+ property({ type: Number, reflect: true, attribute: 'z-index' })
344
+ ], NileExecutiveSummary.prototype, "zIndex", void 0);
345
+ __decorate([
346
+ property({ type: Boolean, reflect: true, attribute: 'hide-overlay' })
347
+ ], NileExecutiveSummary.prototype, "hideOverlay", void 0);
326
348
  __decorate([
327
349
  state()
328
350
  ], NileExecutiveSummary.prototype, "displayedText", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aquera/nile-visualization",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "A visualization Library for the Nile Design System",
5
5
  "license": "MIT",
6
6
  "author": "Aquera Inc",
@@ -59,7 +59,13 @@
59
59
  "lit": "^3.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "highcharts": ">=10.0.0"
62
+ "highcharts": ">=10.0.0",
63
+ "@aquera/nile-data-grid": "0.1.0"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "@aquera/nile-data-grid": {
67
+ "optional": true
68
+ }
63
69
  },
64
70
  "devDependencies": {
65
71
  "@rollup/plugin-babel": "^6.0.3",