@aquera/nile-visualization 2.9.29 → 2.9.31

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.
Files changed (160) hide show
  1. package/README.md +15 -0
  2. package/dist/src/index.d.ts +6 -5
  3. package/dist/src/index.js +2 -2
  4. package/dist/src/internal/base/forecastable-chart.d.ts +59 -0
  5. package/dist/src/internal/base/forecastable-chart.js +149 -0
  6. package/dist/src/internal/{nile-chart-base.d.ts → base/nile-chart-base.d.ts} +1 -1
  7. package/dist/src/internal/{nile-chart-base.js → base/nile-chart-base.js} +1 -1
  8. package/dist/src/internal/types/chart-area-config.type.d.ts +4 -2
  9. package/dist/src/internal/types/chart-area-spline-config.type.d.ts +4 -2
  10. package/dist/src/internal/types/chart-column-config.type.d.ts +3 -2
  11. package/dist/src/internal/types/chart-line-config.type.d.ts +3 -2
  12. package/dist/src/internal/types/chart-spline-config.type.d.ts +3 -2
  13. package/dist/src/internal/{chart-adapters.d.ts → utils/chart-adapters.d.ts} +1 -1
  14. package/dist/src/internal/{chart-adapters.js → utils/chart-adapters.js} +15 -3
  15. package/dist/src/internal/utils/chart-forecast.d.ts +126 -0
  16. package/dist/src/internal/utils/chart-forecast.js +297 -0
  17. package/dist/src/internal/{dashboard-adapters.d.ts → utils/dashboard-adapters.d.ts} +1 -1
  18. package/dist/src/internal/{utils.js → utils/deep-merge.js} +1 -1
  19. package/dist/src/internal/{resolve-widget-kind.d.ts → utils/resolve-widget-kind.d.ts} +1 -1
  20. package/dist/src/internal/utils/separated-chart-config.d.ts +13 -0
  21. package/dist/src/internal/utils/separated-chart-config.js +30 -0
  22. package/dist/src/nile-ai-panel/nile-ai-panel.d.ts +1 -1
  23. package/dist/src/nile-ai-panel/nile-ai-panel.js +1 -1
  24. package/dist/src/nile-ai-sender/nile-ai-sender.d.ts +1 -1
  25. package/dist/src/nile-ai-sender/nile-ai-sender.js +1 -1
  26. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +1 -1
  27. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +4 -4
  28. package/dist/src/nile-area-chart/nile-area-chart.d.ts +7 -6
  29. package/dist/src/nile-area-chart/nile-area-chart.js +37 -24
  30. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -1
  31. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +5 -5
  32. package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -1
  33. package/dist/src/nile-area-range-chart/nile-area-range-chart.js +5 -5
  34. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +10 -4
  35. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +38 -27
  36. package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +3 -3
  37. package/dist/src/nile-bar-chart/nile-bar-chart.js +4 -4
  38. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +3 -2
  39. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +5 -5
  40. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +3 -2
  41. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +5 -5
  42. package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +3 -3
  43. package/dist/src/nile-bubble-chart/nile-bubble-chart.js +4 -4
  44. package/dist/src/nile-chart/index.d.ts +1 -1
  45. package/dist/src/nile-chart/index.js +1 -1
  46. package/dist/src/nile-chart/nile-chart-config.d.ts +20 -92
  47. package/dist/src/nile-chart/nile-chart-skeleton.js +1 -1
  48. package/dist/src/nile-chart/nile-chart.css.js +0 -1
  49. package/dist/src/nile-chart/nile-chart.d.ts +5 -2
  50. package/dist/src/nile-chart/nile-chart.js +66 -9
  51. package/dist/src/nile-chart-list/nile-chart-list.d.ts +1 -1
  52. package/dist/src/nile-chart-list/nile-chart-list.js +1 -1
  53. package/dist/src/nile-chart-message/nile-chart-message.d.ts +1 -1
  54. package/dist/src/nile-chart-message/nile-chart-message.js +1 -1
  55. package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +3 -2
  56. package/dist/src/nile-cluster-chart/nile-cluster-chart.js +5 -5
  57. package/dist/src/nile-column-chart/nile-column-chart.d.ts +13 -6
  58. package/dist/src/nile-column-chart/nile-column-chart.js +43 -24
  59. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +1 -1
  60. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +5 -5
  61. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -1
  62. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +5 -5
  63. package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -1
  64. package/dist/src/nile-column-range-chart/nile-column-range-chart.js +5 -5
  65. package/dist/src/nile-dashboard-builder/nile-dashboard-builder.d.ts +1 -1
  66. package/dist/src/nile-dashboard-builder/nile-dashboard-builder.js +2 -2
  67. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.d.ts +1 -1
  68. package/dist/src/nile-dashboard-viewer/nile-dashboard-viewer.js +1 -1
  69. package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +3 -3
  70. package/dist/src/nile-donut-chart/nile-donut-chart.js +4 -4
  71. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -1
  72. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +5 -5
  73. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -1
  74. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +5 -5
  75. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -1
  76. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +5 -5
  77. package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -1
  78. package/dist/src/nile-euler-chart/nile-euler-chart.js +5 -5
  79. package/dist/src/nile-executive-summary/nile-executive-summary.d.ts +1 -1
  80. package/dist/src/nile-executive-summary/nile-executive-summary.js +1 -1
  81. package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -1
  82. package/dist/src/nile-fan-chart/nile-fan-chart.js +5 -5
  83. package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +3 -1
  84. package/dist/src/nile-filter-chart/nile-filter-chart.js +15 -1
  85. package/dist/src/nile-filter-chart/utils/prompt.js +31 -6
  86. package/dist/src/nile-filter-chart/utils/types.d.ts +2 -0
  87. package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +1 -1
  88. package/dist/src/nile-flame-chart/nile-flame-chart.js +5 -5
  89. package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -1
  90. package/dist/src/nile-funnel-chart/nile-funnel-chart.js +5 -5
  91. package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +1 -1
  92. package/dist/src/nile-gauge-chart/nile-gauge-chart.js +4 -4
  93. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +3 -2
  94. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +5 -5
  95. package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +3 -2
  96. package/dist/src/nile-histogram-chart/nile-histogram-chart.js +5 -5
  97. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -1
  98. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +5 -5
  99. package/dist/src/nile-kpi-chart/nile-kpi-chart.css.js +41 -0
  100. package/dist/src/nile-kpi-chart/nile-kpi-chart.d.ts +31 -1
  101. package/dist/src/nile-kpi-chart/nile-kpi-chart.js +73 -3
  102. package/dist/src/nile-line-chart/nile-line-chart.d.ts +12 -6
  103. package/dist/src/nile-line-chart/nile-line-chart.js +44 -24
  104. package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -1
  105. package/dist/src/nile-line-column-chart/nile-line-column-chart.js +5 -5
  106. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -1
  107. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +5 -5
  108. package/dist/src/nile-map-chart/nile-map-chart.d.ts +2 -2
  109. package/dist/src/nile-map-chart/nile-map-chart.js +4 -4
  110. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -1
  111. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.js +5 -5
  112. package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -1
  113. package/dist/src/nile-organization-chart/nile-organization-chart.js +5 -5
  114. package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +1 -1
  115. package/dist/src/nile-pie-chart/nile-pie-chart.js +4 -4
  116. package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -1
  117. package/dist/src/nile-polygon-chart/nile-polygon-chart.js +5 -5
  118. package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +3 -3
  119. package/dist/src/nile-radar-chart/nile-radar-chart.js +4 -4
  120. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +3 -2
  121. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +5 -5
  122. package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +3 -3
  123. package/dist/src/nile-scatter-chart/nile-scatter-chart.js +4 -4
  124. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +3 -2
  125. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +5 -5
  126. package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +8 -6
  127. package/dist/src/nile-spline-chart/nile-spline-chart.js +36 -24
  128. package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +3 -2
  129. package/dist/src/nile-stacked-chart/nile-stacked-chart.js +5 -5
  130. package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -1
  131. package/dist/src/nile-timeline-chart/nile-timeline-chart.js +5 -5
  132. package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +1 -1
  133. package/dist/src/nile-trendline-chart/nile-trendline-chart.js +4 -4
  134. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +3 -2
  135. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +5 -5
  136. package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -1
  137. package/dist/src/nile-vector-chart/nile-vector-chart.js +5 -5
  138. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +3 -3
  139. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +4 -4
  140. package/dist/src/nile-widget-viewer/nile-widget-viewer.css.js +6 -2
  141. package/dist/src/nile-widget-viewer/nile-widget-viewer.d.ts +1 -1
  142. package/dist/src/nile-widget-viewer/nile-widget-viewer.js +2 -2
  143. package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +3 -2
  144. package/dist/src/nile-xrange-chart/nile-xrange-chart.js +5 -5
  145. package/package.json +1 -1
  146. package/dist/src/internal/separated-chart-config.d.ts +0 -5
  147. package/dist/src/internal/separated-chart-config.js +0 -16
  148. /package/dist/src/internal/{nile-element.d.ts → base/nile-element.d.ts} +0 -0
  149. /package/dist/src/internal/{nile-element.js → base/nile-element.js} +0 -0
  150. /package/dist/src/internal/{chart-events.d.ts → utils/chart-events.d.ts} +0 -0
  151. /package/dist/src/internal/{chart-events.js → utils/chart-events.js} +0 -0
  152. /package/dist/src/internal/{chart-runtime.d.ts → utils/chart-runtime.d.ts} +0 -0
  153. /package/dist/src/internal/{chart-runtime.js → utils/chart-runtime.js} +0 -0
  154. /package/dist/src/internal/{dashboard-adapters.js → utils/dashboard-adapters.js} +0 -0
  155. /package/dist/src/internal/{utils.d.ts → utils/deep-merge.d.ts} +0 -0
  156. /package/dist/src/internal/{highcharts-provider.d.ts → utils/highcharts-provider.d.ts} +0 -0
  157. /package/dist/src/internal/{highcharts-provider.js → utils/highcharts-provider.js} +0 -0
  158. /package/dist/src/internal/{resolve-widget-kind.js → utils/resolve-widget-kind.js} +0 -0
  159. /package/dist/src/internal/{responsive-defaults.d.ts → utils/responsive-defaults.d.ts} +0 -0
  160. /package/dist/src/internal/{responsive-defaults.js → utils/responsive-defaults.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { DumbbellPoint } from '../nile-dumbbell-chart/nile-dumbbell-chart.js';
6
6
  import type { LegendConfig } from '../internal/types/index.js';
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import { getHighcharts } from '../internal/highcharts-provider.js';
5
- import NileElement from '../internal/nile-element.js';
6
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
5
+ import NileElement from '../internal/base/nile-element.js';
6
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-dumbbell-upper-chart.css.js';
10
10
  let NileDumbbellUpperChart = class NileDumbbellUpperChart extends NileElement {
11
11
  constructor() {
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface EulerVennDataPoint {
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import NileElement from '../internal/nile-element.js';
5
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
6
- import { getHighcharts } from '../internal/highcharts-provider.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import NileElement from '../internal/base/nile-element.js';
5
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
6
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-euler-chart.css.js';
10
10
  let NileEulerChart = class NileEulerChart extends NileElement {
11
11
  constructor() {
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import type { CSSResultGroup, TemplateResult } from 'lit';
8
- import NileElement from '../internal/nile-element.js';
8
+ import NileElement from '../internal/base/nile-element.js';
9
9
  import type { NileExecutiveSummaryConfig } from './nile-executive-summary-config.js';
10
10
  /**
11
11
  * Nile Executive Summary component.
@@ -10,7 +10,7 @@ import { classMap } from 'lit/directives/class-map.js';
10
10
  import { styleMap } from 'lit/directives/style-map.js';
11
11
  import { html } from 'lit';
12
12
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
13
- import NileElement from '../internal/nile-element.js';
13
+ import NileElement from '../internal/base/nile-element.js';
14
14
  import { styles } from './nile-executive-summary.css.js';
15
15
  /**
16
16
  * Nile Executive Summary component.
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { LegendConfig } from '../internal/types/index.js';
6
6
  /** Central path (history + median / point forecast). */
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import { getHighcharts } from '../internal/highcharts-provider.js';
5
- import NileElement from '../internal/nile-element.js';
6
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
5
+ import NileElement from '../internal/base/nile-element.js';
6
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-fan-chart.css.js';
10
10
  const DEFAULT_BAND_COLORS = ['#93c5fd', '#60a5fa', '#3b82f6'];
11
11
  let NileFanChart = class NileFanChart extends NileElement {
@@ -1,5 +1,5 @@
1
1
  import { CSSResultArray, TemplateResult } from 'lit';
2
- import NileElement from '../internal/nile-element.js';
2
+ import NileElement from '../internal/base/nile-element.js';
3
3
  import type { FilterChartHost, FilterChartSeparatedPayload, NormalizedFilterControl, PromptMode } from './utils/types.js';
4
4
  export type { NileTagVariant, FilterOption, QueryLanguageConfig, QueryNode, QueryJson, FilterChangeDetail, FilterControl, FilterGroup, FilterEntry, FilterChartConfig, FilterChartSeparatedPayload, PromptMode, } from './utils/types.js';
5
5
  export declare class NileFilterChart extends NileElement implements FilterChartHost {
@@ -29,6 +29,7 @@ export declare class NileFilterChart extends NileElement implements FilterChartH
29
29
  /** Id of the prompt control whose input currently has focus (drives the
30
30
  * nile-dropdown panel open state). null when no prompt is focused. */
31
31
  promptFocusedId: string | null;
32
+ promptPickedIds: Set<string>;
32
33
  /** Pixel width of each prompt control's bordered field — kept in sync with
33
34
  * the rendered `.fc-prompt__field` via a ResizeObserver attached in
34
35
  * prompt.ts. Consumed by the suggestion tooltip so its popup matches the
@@ -75,6 +76,7 @@ export declare class NileFilterChart extends NileElement implements FilterChartH
75
76
  */
76
77
  submitPrompt(ctrl: NormalizedFilterControl): void;
77
78
  setPromptActiveIndex(id: string, idx: number): void;
79
+ setPromptPicked(id: string, picked: boolean): void;
78
80
  setPromptFocused(id: string, focused: boolean): void;
79
81
  setPromptFieldWidth(id: string, width: number): void;
80
82
  private _validateOrClear;
@@ -3,7 +3,7 @@ import { __decorate } from "tslib";
3
3
  import { html, nothing } from 'lit';
4
4
  import { customElement, property, state } from 'lit/decorators.js';
5
5
  import { styles } from './nile-filter-chart.css.js';
6
- import NileElement from '../internal/nile-element.js';
6
+ import NileElement from '../internal/base/nile-element.js';
7
7
  import { renderBadge } from './utils/badge.js';
8
8
  import { renderDropdown } from './utils/dropdown.js';
9
9
  import { renderSegmented } from './utils/segmented.js';
@@ -46,6 +46,7 @@ let NileFilterChart = NileFilterChart_1 = class NileFilterChart extends NileElem
46
46
  /** Id of the prompt control whose input currently has focus (drives the
47
47
  * nile-dropdown panel open state). null when no prompt is focused. */
48
48
  this.promptFocusedId = null;
49
+ this.promptPickedIds = new Set();
49
50
  /** Pixel width of each prompt control's bordered field — kept in sync with
50
51
  * the rendered `.fc-prompt__field` via a ResizeObserver attached in
51
52
  * prompt.ts. Consumed by the suggestion tooltip so its popup matches the
@@ -155,6 +156,16 @@ let NileFilterChart = NileFilterChart_1 = class NileFilterChart extends NileElem
155
156
  setPromptActiveIndex(id, idx) {
156
157
  this.promptActiveIndex = new Map(this.promptActiveIndex).set(id, idx);
157
158
  }
159
+ setPromptPicked(id, picked) {
160
+ if (this.promptPickedIds.has(id) === picked)
161
+ return;
162
+ const next = new Set(this.promptPickedIds);
163
+ if (picked)
164
+ next.add(id);
165
+ else
166
+ next.delete(id);
167
+ this.promptPickedIds = next;
168
+ }
158
169
  setPromptFocused(id, focused) {
159
170
  if (focused) {
160
171
  this.promptFocusedId = id;
@@ -653,6 +664,9 @@ __decorate([
653
664
  __decorate([
654
665
  state()
655
666
  ], NileFilterChart.prototype, "promptFocusedId", void 0);
667
+ __decorate([
668
+ state()
669
+ ], NileFilterChart.prototype, "promptPickedIds", void 0);
656
670
  __decorate([
657
671
  state()
658
672
  ], NileFilterChart.prototype, "promptFieldWidth", void 0);
@@ -1,9 +1,22 @@
1
1
  import { html, nothing } from 'lit';
2
2
  import { live } from 'lit/directives/live.js';
3
3
  import { ref } from 'lit/directives/ref.js';
4
+ import { directive, Directive } from 'lit/directive.js';
4
5
  // Per-element ResizeObserver bookkeeping. WeakMap so observers are GC'd
5
6
  // alongside their elements when the prompt is unmounted.
6
7
  const _fieldObservers = new WeakMap();
8
+ class SyncOpenDirective extends Directive {
9
+ render(_open) {
10
+ return nothing;
11
+ }
12
+ update(part, [open]) {
13
+ const el = part.element;
14
+ if (el.open !== open)
15
+ el.open = open;
16
+ return nothing;
17
+ }
18
+ }
19
+ const syncOpen = directive(SyncOpenDirective);
7
20
  const PUNCT_TOKENS = new Set(['(', ')', '[', ']', ',']);
8
21
  /**
9
22
  * Splits the input into the tokens analyzePromptCtx reasons about:
@@ -369,6 +382,7 @@ export function renderPrompt(host, ctrl) {
369
382
  // Decide what kind of token comes next, then pre-filter the suggestion list
370
383
  // to that context. The combobox's own substring filter is bypassed below
371
384
  // (via `getSearchText`) so this pre-filter is the single source of truth.
385
+ const justPicked = host.promptPickedIds.has(ctrl.id);
372
386
  const ctx = analyzePromptCtx(value, fieldNames, operatorTokens, connectorTokens);
373
387
  const candidates = (() => {
374
388
  switch (ctx.position) {
@@ -515,8 +529,17 @@ export function renderPrompt(host, ctrl) {
515
529
  const tokens = tokenize(value);
516
530
  const onInput = (e) => {
517
531
  const inputEl = e.target;
518
- const next = inputEl.value;
532
+ let next = inputEl.value;
519
533
  const atEnd = () => inputEl.selectionStart === inputEl.value.length;
534
+ if (justPicked) {
535
+ const appended = next.startsWith(value) ? next.slice(value.length) : '';
536
+ if (value.length > 0 && appended.length > 0 && !/^\s/.test(appended)) {
537
+ next = `${value} ${appended}`;
538
+ inputEl.value = next;
539
+ inputEl.setSelectionRange(next.length, next.length);
540
+ }
541
+ host.setPromptPicked(ctrl.id, false);
542
+ }
520
543
  if (atEnd()) {
521
544
  const s = inputEl.selectionStart ?? next.length;
522
545
  inputEl.setSelectionRange(s, s);
@@ -551,7 +574,7 @@ export function renderPrompt(host, ctrl) {
551
574
  if (tokenLike) {
552
575
  const beforeTrimmed = ctx.before.replace(/\s+$/, '');
553
576
  const sep = beforeTrimmed.length > 0 ? ' ' : '';
554
- next = beforeTrimmed + sep + tokenOf(item) + ' ';
577
+ next = beforeTrimmed + sep + tokenOf(item);
555
578
  }
556
579
  else if (item.type === 'value') {
557
580
  const beforeTrimmed = ctx.before.replace(/\s+$/, '');
@@ -568,7 +591,7 @@ export function renderPrompt(host, ctrl) {
568
591
  const inserted = alreadyQuoted || isNumeric || isLiteral
569
592
  ? raw
570
593
  : `"${raw.replace(/"/g, '\\"')}"`;
571
- next = beforeTrimmed + sep + inserted + ' ';
594
+ next = beforeTrimmed + sep + inserted;
572
595
  }
573
596
  else if (item.type === 'function') {
574
597
  const beforeTrimmed = ctx.before.replace(/\s+$/, '');
@@ -587,6 +610,7 @@ export function renderPrompt(host, ctrl) {
587
610
  // candidate set should start with no row pre-highlighted. Avoids the
588
611
  // confusing "stuck on the old index" state after a pick.
589
612
  host.setPromptActiveIndex(ctrl.id, -1);
613
+ host.setPromptPicked(ctrl.id, true);
590
614
  // Imperatively sync the input for immediate visual feedback.
591
615
  inputEl.value = next;
592
616
  // Defer focus + caret-to-end to AFTER Lit's microtask-scheduled re-render.
@@ -609,7 +633,7 @@ export function renderPrompt(host, ctrl) {
609
633
  };
610
634
  const onKeyDown = (e) => {
611
635
  const inputEl = e.currentTarget;
612
- const len = suggestionData.length;
636
+ const len = dropdownOpen ? suggestionData.length : 0;
613
637
  // Read fresh from host (don't rely on the closure-captured `activeIdx`,
614
638
  // which is from this render — fine in theory but defensive against any
615
639
  // Lit re-binding edge case).
@@ -689,7 +713,7 @@ export function renderPrompt(host, ctrl) {
689
713
  host.setPromptFocused(ctrl.id, false);
690
714
  };
691
715
  const isFocused = host.promptFocusedId === ctrl.id;
692
- const dropdownOpen = isFiltrexMode && isFocused && suggestionData.length > 0;
716
+ const dropdownOpen = isFiltrexMode && isFocused && suggestionData.length > 0 && !justPicked;
693
717
  // Clears the prompt value, fires the existing `nile-change` flow (via
694
718
  // submitPrompt → _emitChange) and additionally emits a dedicated
695
719
  // `nile-clear` event so consumers can distinguish a user-initiated clear
@@ -699,6 +723,7 @@ export function renderPrompt(host, ctrl) {
699
723
  host.handlePromptInput(ctrl, '');
700
724
  host.submitPrompt(ctrl);
701
725
  host.setPromptActiveIndex(ctrl.id, -1);
726
+ host.setPromptPicked(ctrl.id, false);
702
727
  host.emit('nile-clear', { id: ctrl.id, source });
703
728
  const target = e.currentTarget;
704
729
  const root = (target?.getRootNode() ?? document);
@@ -720,7 +745,7 @@ export function renderPrompt(host, ctrl) {
720
745
  placement="bottom-start"
721
746
  sync="width"
722
747
  distance="6"
723
- ?open=${dropdownOpen}
748
+ ${syncOpen(dropdownOpen)}
724
749
  .noOpenOnClick=${true}
725
750
  >
726
751
  <div
@@ -250,6 +250,8 @@ export interface FilterChartHost {
250
250
  submitPrompt(ctrl: NormalizedFilterControl): void;
251
251
  /** Set the highlighted suggestion index. Use -1 to clear the highlight. */
252
252
  setPromptActiveIndex(id: string, idx: number): void;
253
+ readonly promptPickedIds: ReadonlySet<string>;
254
+ setPromptPicked(id: string, picked: boolean): void;
253
255
  /** Mark a prompt control's input as focused / unfocused. */
254
256
  setPromptFocused(id: string, focused: boolean): void;
255
257
  /** Pixel width of the bordered prompt field, keyed by control id. */
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { LegendConfig } from '../internal/types/index.js';
6
6
  /** Segment row for the flame / icicle layout (`columnrange`-based). */
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import NileElement from '../internal/nile-element.js';
5
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
6
- import { getHighcharts } from '../internal/highcharts-provider.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import NileElement from '../internal/base/nile-element.js';
5
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
6
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-flame-chart.css.js';
10
10
  function registerFlameSeriesTypeIfNeeded(H) {
11
11
  const types = H.seriesTypes;
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
5
  import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface FunnelDataPoint {
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import { getHighcharts } from '../internal/highcharts-provider.js';
5
- import NileElement from '../internal/nile-element.js';
6
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
5
+ import NileElement from '../internal/base/nile-element.js';
6
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-funnel-chart.css.js';
10
10
  let NileFunnelChart = class NileFunnelChart extends NileElement {
11
11
  constructor() {
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { NileChartConfigInputType } from '../internal/types/index.js';
5
5
  import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface GaugeBand {
@@ -2,10 +2,10 @@ var NileGaugeChart_1;
2
2
  import { __decorate } from "tslib";
3
3
  import { customElement, property, query } from 'lit/decorators.js';
4
4
  import { html } from 'lit';
5
- import NileElement from '../internal/nile-element.js';
6
- import { getHighcharts } from '../internal/highcharts-provider.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
5
+ import NileElement from '../internal/base/nile-element.js';
6
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-gauge-chart.css.js';
10
10
  let NileGaugeChart = NileGaugeChart_1 = class NileGaugeChart extends NileElement {
11
11
  constructor() {
@@ -1,7 +1,8 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
5
6
  /** One cell: x/y are 0-based indices into `xCategories` / `yCategories`. */
6
7
  export interface HeatmapCell {
7
8
  x: number;
@@ -33,7 +34,7 @@ export declare class NileHeatmapChart extends NileElement {
33
34
  showDataLabels: boolean;
34
35
  showLegend: boolean;
35
36
  /** Full legend configuration — all Highcharts legend options in one object. */
36
- legend: import('../internal/types/index.js').LegendConfig | null;
37
+ legend: LegendConfig | null;
37
38
  chartBg: string;
38
39
  chartBorderRadius: string | number;
39
40
  chartBorder: string;
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import { getHighcharts } from '../internal/highcharts-provider.js';
5
- import NileElement from '../internal/nile-element.js';
6
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
5
+ import NileElement from '../internal/base/nile-element.js';
6
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-heatmap-chart.css.js';
10
10
  let NileHeatmapChart = class NileHeatmapChart extends NileElement {
11
11
  constructor() {
@@ -1,7 +1,8 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/separated-chart-config-input.type.js';
5
+ import type { LegendConfig } from '../internal/types/index.js';
5
6
  /** One raw measurement per entry; each is placed in a histogram bin. */
6
7
  export type HistogramSamples = number[];
7
8
  export declare class NileHistogramChart extends NileElement {
@@ -35,7 +36,7 @@ export declare class NileHistogramChart extends NileElement {
35
36
  binWidth: number;
36
37
  showLegend: boolean;
37
38
  /** Full legend configuration — all Highcharts legend options in one object. */
38
- legend: import('../internal/types/index.js').LegendConfig | null;
39
+ legend: LegendConfig | null;
39
40
  chartBg: string;
40
41
  chartBorderRadius: string | number;
41
42
  chartBorder: string;
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import { getHighcharts } from '../internal/highcharts-provider.js';
5
- import NileElement from '../internal/nile-element.js';
6
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
5
+ import NileElement from '../internal/base/nile-element.js';
6
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-histogram-chart.css.js';
10
10
  /** Stable id linking the hidden source series to the histogram series. */
11
11
  const HISTOGRAM_BASE_ID = 'nile-histogram-base';
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { SeparatedChartConfigInputType } from '../internal/types/index.js';
5
5
  import type { LegendConfig } from '../internal/types/index.js';
6
6
  export interface InvertedAreaChartSeriesData {
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, property, query } from 'lit/decorators.js';
3
3
  import { html } from 'lit';
4
- import NileElement from '../internal/nile-element.js';
5
- import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
6
- import { getHighcharts } from '../internal/highcharts-provider.js';
7
- import { deepMerge } from '../internal/utils.js';
8
- import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
4
+ import NileElement from '../internal/base/nile-element.js';
5
+ import { applySeparatedChartConfig } from '../internal/utils/separated-chart-config.js';
6
+ import { getHighcharts } from '../internal/utils/highcharts-provider.js';
7
+ import { deepMerge } from '../internal/utils/deep-merge.js';
8
+ import { withResponsiveDefaults } from '../internal/utils/responsive-defaults.js';
9
9
  import { styles } from './nile-inverted-area-chart.css';
10
10
  let NileInvertedAreaChart = class NileInvertedAreaChart extends NileElement {
11
11
  constructor() {
@@ -66,6 +66,8 @@ export const styles = css `
66
66
  --nile-kpi-trend-up-color: var(--nile-colors-success-700, var(--ng-color-success-700));
67
67
  --nile-kpi-trend-down-color: var(--nile-colors-error-700, var(--ng-color-error-700));
68
68
  --nile-kpi-trend-neutral-color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
69
+ --nile-kpi-forecast-color: var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));
70
+ --nile-kpi-forecast-font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
69
71
  --nile-kpi-description-font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
70
72
  --nile-kpi-description-color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
71
73
  display: flex;
@@ -249,6 +251,43 @@ export const styles = css `
249
251
  height: 100%;
250
252
  fill: currentColor;
251
253
  }
254
+ .kpi-forecast {
255
+ display: inline-flex;
256
+ align-items: center;
257
+ gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
258
+ max-width: 100%;
259
+ margin: 0;
260
+ font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
261
+ font-size: var(--nile-kpi-forecast-font-size);
262
+ font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
263
+ color: var(--nile-kpi-forecast-color);
264
+ line-height: 1.5;
265
+ }
266
+
267
+ .kpi-forecast-glyph {
268
+ display: inline-flex;
269
+ flex: 0 0 auto;
270
+ width: var(--nile-width-12px, 12px);
271
+ height: var(--nile-height-12px, 12px);
272
+ }
273
+
274
+ .kpi-forecast-glyph svg {
275
+ width: 100%;
276
+ height: 100%;
277
+ fill: currentColor;
278
+ }
279
+
280
+ .kpi-forecast-value {
281
+ flex: 0 0 auto;
282
+ }
283
+
284
+ .kpi-forecast-label {
285
+ flex: 0 1 auto;
286
+ min-width: 0;
287
+ overflow: hidden;
288
+ text-overflow: ellipsis;
289
+ white-space: nowrap;
290
+ }
252
291
 
253
292
  .kpi-description {
254
293
  display: block;
@@ -294,6 +333,7 @@ export const styles = css `
294
333
  :host {
295
334
  --nile-kpi-prefix-suffix-font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
296
335
  --nile-kpi-description-font-size: var(--nile-type-scale-1, var(--ng-font-size-text-xs));
336
+ --nile-kpi-forecast-font-size: var(--nile-type-scale-1, var(--ng-font-size-text-xs));
297
337
  }
298
338
 
299
339
  .kpi-sparkline {
@@ -312,6 +352,7 @@ export const styles = css `
312
352
  hide everything except the value and trend. */
313
353
  @container (max-height: 50px) and (max-width: 319.98px) {
314
354
  .kpi-label,
355
+ .kpi-forecast,
315
356
  .kpi-description,
316
357
  .kpi-sparkline {
317
358
  display: none;
@@ -1,6 +1,6 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
2
  import type Highcharts from 'highcharts';
3
- import NileElement from '../internal/nile-element.js';
3
+ import NileElement from '../internal/base/nile-element.js';
4
4
  import type { AqConfigType } from '../internal/types/aq-config.type.js';
5
5
  export type TrendDirection = 'up' | 'down' | 'neutral';
6
6
  export type KpiVariant = 'default' | 'card' | 'gauge' | 'accent';
@@ -18,6 +18,10 @@ export interface ChartKpiSeparatedPayload {
18
18
  trendValue?: number | null;
19
19
  trendDirection?: TrendDirection;
20
20
  trendLabel?: string;
21
+ forecastValue?: number | null;
22
+ forecastLabel?: string;
23
+ forecastApprox?: boolean;
24
+ forecastColor?: string;
21
25
  description?: string;
22
26
  sparkline?: number[];
23
27
  sparklineColor?: string;
@@ -159,6 +163,27 @@ export declare class NileKpiChart extends NileElement {
159
163
  trendDirection: TrendDirection;
160
164
  /** Trend context label (e.g. "vs last month"). */
161
165
  trendLabel: string;
166
+ /**
167
+ * A projected value for this KPI, shown on its own line under the number as
168
+ * `~1,058 in 6 mo`. `null` (the default) renders nothing, so a tile without a
169
+ * projection is unchanged.
170
+ *
171
+ * Supplied, never derived — same contract as the forecast-capable charts. It
172
+ * is formatted with the tile's own `valueFormat` / `numberSystem` and carries
173
+ * the tile's `prefix` / `suffix`, so `2.8%` projects as `~3.1%` rather than a
174
+ * bare number.
175
+ */
176
+ forecastValue: number | null;
177
+ /** The horizon, e.g. `'in 6 mo'` or `'next quarter'`. Truncates before the number does. */
178
+ forecastLabel: string;
179
+ /**
180
+ * Prefix the projected value with `~`. On by default: the value is modelled,
181
+ * and an unqualified number reads as measured. Turn it off when the projection
182
+ * is a commitment (a plan or a target) rather than an estimate.
183
+ */
184
+ forecastApprox: boolean;
185
+ /** Overrides the accent color of the forecast line. */
186
+ forecastColor: string;
162
187
  /** Description shown below the value. */
163
188
  description: string;
164
189
  /** Sparkline data points. When provided, a Highcharts mini area chart renders below the value. */
@@ -296,6 +321,11 @@ export declare class NileKpiChart extends NileElement {
296
321
  private _onTrendKeydown;
297
322
  private _onTipLeave;
298
323
  private renderTrend;
324
+ /**
325
+ * The projected-value line. Rendered only when `forecastValue` is set, so a
326
+ * tile with no projection keeps exactly the layout it had.
327
+ */
328
+ private renderForecast;
299
329
  render(): TemplateResult;
300
330
  }
301
331
  declare global {