@aquera/nile-visualization 2.9.28 → 2.9.29

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 (121) hide show
  1. package/README.md +4 -0
  2. package/dist/src/index.d.ts +3 -0
  3. package/dist/src/index.js +2 -0
  4. package/dist/src/internal/chart-events.d.ts +92 -0
  5. package/dist/src/internal/chart-events.js +291 -0
  6. package/dist/src/internal/chart-runtime.d.ts +41 -0
  7. package/dist/src/internal/chart-runtime.js +30 -0
  8. package/dist/src/internal/highcharts-provider.js +2 -0
  9. package/dist/src/internal/nile-chart-base.d.ts +43 -0
  10. package/dist/src/internal/nile-chart-base.js +67 -0
  11. package/dist/src/internal/resolve-widget-kind.d.ts +10 -0
  12. package/dist/src/internal/resolve-widget-kind.js +16 -0
  13. package/dist/src/internal/responsive-defaults.d.ts +32 -0
  14. package/dist/src/internal/responsive-defaults.js +255 -0
  15. package/dist/src/internal/types/highcharts-passthrough.type.d.ts +80 -0
  16. package/dist/src/internal/types/highcharts-passthrough.type.js +24 -0
  17. package/dist/src/internal/types/index.d.ts +2 -0
  18. package/dist/src/internal/types/index.js +1 -1
  19. package/dist/src/internal/types/widget-config.type.d.ts +14 -3
  20. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.d.ts +2 -0
  21. package/dist/src/nile-anomaly-chart/nile-anomaly-chart.js +8 -1
  22. package/dist/src/nile-area-chart/nile-area-chart.d.ts +1 -0
  23. package/dist/src/nile-area-chart/nile-area-chart.js +7 -1
  24. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.d.ts +1 -0
  25. package/dist/src/nile-area-negative-chart/nile-area-negative-chart.js +7 -1
  26. package/dist/src/nile-area-range-chart/nile-area-range-chart.d.ts +1 -0
  27. package/dist/src/nile-area-range-chart/nile-area-range-chart.js +7 -1
  28. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.d.ts +1 -0
  29. package/dist/src/nile-area-spline-chart/nile-area-spline-chart.js +7 -1
  30. package/dist/src/nile-bar-chart/nile-bar-chart.d.ts +2 -0
  31. package/dist/src/nile-bar-chart/nile-bar-chart.js +8 -1
  32. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.d.ts +1 -0
  33. package/dist/src/nile-bellcurve-chart/nile-bellcurve-chart.js +7 -1
  34. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.d.ts +1 -0
  35. package/dist/src/nile-boxplot-chart/nile-boxplot-chart.js +7 -1
  36. package/dist/src/nile-bubble-chart/nile-bubble-chart.d.ts +1 -0
  37. package/dist/src/nile-bubble-chart/nile-bubble-chart.js +7 -1
  38. package/dist/src/nile-chart/nile-chart-config.d.ts +2 -2
  39. package/dist/src/nile-chart/nile-chart.css.js +3 -1
  40. package/dist/src/nile-chart/nile-chart.d.ts +59 -0
  41. package/dist/src/nile-chart/nile-chart.js +176 -3
  42. package/dist/src/nile-cluster-chart/nile-cluster-chart.d.ts +1 -0
  43. package/dist/src/nile-cluster-chart/nile-cluster-chart.js +7 -1
  44. package/dist/src/nile-column-chart/nile-column-chart.d.ts +1 -0
  45. package/dist/src/nile-column-chart/nile-column-chart.js +7 -1
  46. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.d.ts +1 -0
  47. package/dist/src/nile-column-drilldown-chart/nile-column-drilldown-chart.js +8 -1
  48. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.d.ts +1 -0
  49. package/dist/src/nile-column-pyramid-chart/nile-column-pyramid-chart.js +7 -1
  50. package/dist/src/nile-column-range-chart/nile-column-range-chart.d.ts +1 -0
  51. package/dist/src/nile-column-range-chart/nile-column-range-chart.js +7 -1
  52. package/dist/src/nile-dashboard-builder/nile-dashboard-builder.css.js +24 -8
  53. package/dist/src/nile-dashboard-builder/nile-dashboard-builder.d.ts +111 -0
  54. package/dist/src/nile-dashboard-builder/nile-dashboard-builder.js +188 -6
  55. package/dist/src/nile-donut-chart/nile-donut-chart.d.ts +1 -0
  56. package/dist/src/nile-donut-chart/nile-donut-chart.js +7 -1
  57. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.d.ts +1 -0
  58. package/dist/src/nile-dumbbell-chart/nile-dumbbell-chart.js +7 -1
  59. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.d.ts +1 -0
  60. package/dist/src/nile-dumbbell-lower-chart/nile-dumbbell-lower-chart.js +7 -1
  61. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.d.ts +1 -0
  62. package/dist/src/nile-dumbbell-upper-chart/nile-dumbbell-upper-chart.js +7 -1
  63. package/dist/src/nile-euler-chart/nile-euler-chart.d.ts +1 -0
  64. package/dist/src/nile-euler-chart/nile-euler-chart.js +7 -1
  65. package/dist/src/nile-fan-chart/nile-fan-chart.d.ts +1 -0
  66. package/dist/src/nile-fan-chart/nile-fan-chart.js +7 -1
  67. package/dist/src/nile-flame-chart/nile-flame-chart.d.ts +1 -0
  68. package/dist/src/nile-flame-chart/nile-flame-chart.js +7 -1
  69. package/dist/src/nile-funnel-chart/nile-funnel-chart.d.ts +1 -0
  70. package/dist/src/nile-funnel-chart/nile-funnel-chart.js +7 -1
  71. package/dist/src/nile-gauge-chart/nile-gauge-chart.d.ts +20 -0
  72. package/dist/src/nile-gauge-chart/nile-gauge-chart.js +80 -4
  73. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.d.ts +1 -0
  74. package/dist/src/nile-heatmap-chart/nile-heatmap-chart.js +7 -1
  75. package/dist/src/nile-histogram-chart/nile-histogram-chart.d.ts +1 -0
  76. package/dist/src/nile-histogram-chart/nile-histogram-chart.js +7 -1
  77. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.d.ts +1 -0
  78. package/dist/src/nile-inverted-area-chart/nile-inverted-area-chart.js +7 -1
  79. package/dist/src/nile-line-chart/nile-line-chart.d.ts +1 -0
  80. package/dist/src/nile-line-chart/nile-line-chart.js +7 -1
  81. package/dist/src/nile-line-column-chart/nile-line-column-chart.d.ts +1 -0
  82. package/dist/src/nile-line-column-chart/nile-line-column-chart.js +7 -1
  83. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.d.ts +1 -0
  84. package/dist/src/nile-lollipop-chart/nile-lollipop-chart.js +7 -1
  85. package/dist/src/nile-map-chart/nile-map-chart.d.ts +23 -3
  86. package/dist/src/nile-map-chart/nile-map-chart.js +52 -12
  87. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.css.js +13 -1
  88. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.d.ts +1 -0
  89. package/dist/src/nile-master-detail-chart/nile-master-detail-chart.js +48 -4
  90. package/dist/src/nile-organization-chart/nile-organization-chart.d.ts +1 -0
  91. package/dist/src/nile-organization-chart/nile-organization-chart.js +7 -1
  92. package/dist/src/nile-pie-chart/nile-pie-chart.d.ts +2 -0
  93. package/dist/src/nile-pie-chart/nile-pie-chart.js +8 -1
  94. package/dist/src/nile-polygon-chart/nile-polygon-chart.d.ts +1 -0
  95. package/dist/src/nile-polygon-chart/nile-polygon-chart.js +7 -1
  96. package/dist/src/nile-radar-chart/nile-radar-chart.d.ts +1 -0
  97. package/dist/src/nile-radar-chart/nile-radar-chart.js +7 -1
  98. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.d.ts +1 -0
  99. package/dist/src/nile-radial-bar-chart/nile-radial-bar-chart.js +7 -1
  100. package/dist/src/nile-scatter-chart/nile-scatter-chart.d.ts +1 -0
  101. package/dist/src/nile-scatter-chart/nile-scatter-chart.js +7 -1
  102. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.d.ts +1 -0
  103. package/dist/src/nile-spiderweb-chart/nile-spiderweb-chart.js +7 -1
  104. package/dist/src/nile-spline-chart/nile-spline-chart.d.ts +1 -0
  105. package/dist/src/nile-spline-chart/nile-spline-chart.js +7 -1
  106. package/dist/src/nile-stacked-chart/nile-stacked-chart.d.ts +1 -0
  107. package/dist/src/nile-stacked-chart/nile-stacked-chart.js +7 -1
  108. package/dist/src/nile-timeline-chart/nile-timeline-chart.d.ts +1 -0
  109. package/dist/src/nile-timeline-chart/nile-timeline-chart.js +7 -1
  110. package/dist/src/nile-trendline-chart/nile-trendline-chart.d.ts +2 -0
  111. package/dist/src/nile-trendline-chart/nile-trendline-chart.js +8 -1
  112. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.d.ts +1 -0
  113. package/dist/src/nile-variable-pie-chart/nile-variable-pie-chart.js +7 -1
  114. package/dist/src/nile-vector-chart/nile-vector-chart.d.ts +1 -0
  115. package/dist/src/nile-vector-chart/nile-vector-chart.js +7 -1
  116. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.d.ts +1 -0
  117. package/dist/src/nile-waterfall-chart/nile-waterfall-chart.js +7 -1
  118. package/dist/src/nile-widget-viewer/nile-widget-viewer.js +6 -6
  119. package/dist/src/nile-xrange-chart/nile-xrange-chart.d.ts +1 -0
  120. package/dist/src/nile-xrange-chart/nile-xrange-chart.js +7 -1
  121. package/package.json +1 -1
@@ -5,6 +5,7 @@ import { getHighcharts } from '../internal/highcharts-provider.js';
5
5
  import NileElement from '../internal/nile-element.js';
6
6
  import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
7
7
  import { deepMerge } from '../internal/utils.js';
8
+ import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
8
9
  import { styles } from './nile-cluster-chart.css.js';
9
10
  let NileClusterChart = class NileClusterChart extends NileElement {
10
11
  constructor() {
@@ -19,6 +20,7 @@ let NileClusterChart = class NileClusterChart extends NileElement {
19
20
  this.data = [];
20
21
  this.categories = [];
21
22
  this.options = {};
23
+ this.noResponsive = false;
22
24
  this.loading = false;
23
25
  this.height = '400px';
24
26
  this.yAxisTitle = '';
@@ -127,7 +129,7 @@ let NileClusterChart = class NileClusterChart extends NileElement {
127
129
  }
128
130
  buildOptions() {
129
131
  const self = this;
130
- return deepMerge({
132
+ const merged = deepMerge({
131
133
  chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
132
134
  title: { text: this.chartTitle || undefined },
133
135
  subtitle: { text: this.chartSubtitle || undefined },
@@ -168,6 +170,7 @@ let NileClusterChart = class NileClusterChart extends NileElement {
168
170
  })),
169
171
  credits: { enabled: false },
170
172
  }, this.options);
173
+ return withResponsiveDefaults(merged, 'cluster', this.noResponsive);
171
174
  }
172
175
  async initChart() {
173
176
  if (this.loading || !this.chartContainer)
@@ -212,6 +215,9 @@ __decorate([
212
215
  __decorate([
213
216
  property({ type: Object })
214
217
  ], NileClusterChart.prototype, "options", void 0);
218
+ __decorate([
219
+ property({ type: Boolean, attribute: 'no-responsive' })
220
+ ], NileClusterChart.prototype, "noResponsive", void 0);
215
221
  __decorate([
216
222
  property({ type: Boolean, reflect: true })
217
223
  ], NileClusterChart.prototype, "loading", void 0);
@@ -20,6 +20,7 @@ export declare class NileColumnChart extends NileElement {
20
20
  data: ColumnChartSeriesData[];
21
21
  categories: string[];
22
22
  options: Highcharts.Options;
23
+ noResponsive: boolean;
23
24
  loading: boolean;
24
25
  height: string;
25
26
  yAxisTitle: string;
@@ -4,6 +4,7 @@ import { html } from 'lit';
4
4
  import { getHighcharts } from '../internal/highcharts-provider.js';
5
5
  import NileElement from '../internal/nile-element.js';
6
6
  import { deepMerge } from '../internal/utils.js';
7
+ import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
7
8
  import { styles } from './nile-column-chart.css.js';
8
9
  let NileColumnChart = class NileColumnChart extends NileElement {
9
10
  constructor() {
@@ -18,6 +19,7 @@ let NileColumnChart = class NileColumnChart extends NileElement {
18
19
  this.data = [];
19
20
  this.categories = [];
20
21
  this.options = {};
22
+ this.noResponsive = false;
21
23
  this.loading = false;
22
24
  this.height = '400px';
23
25
  this.yAxisTitle = '';
@@ -155,7 +157,7 @@ let NileColumnChart = class NileColumnChart extends NileElement {
155
157
  }
156
158
  buildOptions() {
157
159
  const self = this;
158
- return deepMerge({
160
+ const merged = deepMerge({
159
161
  chart: { type: 'column', ...(this.height ? { height: this.height } : {}) },
160
162
  title: { text: this.chartTitle || undefined },
161
163
  subtitle: { text: this.chartSubtitle || undefined },
@@ -170,6 +172,7 @@ let NileColumnChart = class NileColumnChart extends NileElement {
170
172
  legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
171
173
  credits: { enabled: false },
172
174
  }, this.options);
175
+ return withResponsiveDefaults(merged, 'column', this.noResponsive);
173
176
  }
174
177
  async initChart() {
175
178
  if (this.loading || !this.chartContainer)
@@ -211,6 +214,9 @@ __decorate([
211
214
  __decorate([
212
215
  property({ type: Object })
213
216
  ], NileColumnChart.prototype, "options", void 0);
217
+ __decorate([
218
+ property({ type: Boolean, attribute: 'no-responsive' })
219
+ ], NileColumnChart.prototype, "noResponsive", void 0);
214
220
  __decorate([
215
221
  property({ type: Boolean, reflect: true })
216
222
  ], NileColumnChart.prototype, "loading", void 0);
@@ -43,6 +43,7 @@ export declare class NileColumnDrilldownChart extends NileElement {
43
43
  seriesName: string;
44
44
  yAxisTitle: string;
45
45
  options: Highcharts.Options;
46
+ noResponsive: boolean;
46
47
  loading: boolean;
47
48
  height: string;
48
49
  chartBg: string;
@@ -5,6 +5,7 @@ import NileElement from '../internal/nile-element.js';
5
5
  import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
6
6
  import { getHighcharts } from '../internal/highcharts-provider.js';
7
7
  import { deepMerge } from '../internal/utils.js';
8
+ import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
8
9
  import { styles } from './nile-column-drilldown-chart.css.js';
9
10
  import { tooltipCss } from '../nile-chart/nile-chart.css.js';
10
11
  let _bcTooltipStylesInjected = false;
@@ -38,6 +39,7 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
38
39
  this.seriesName = '';
39
40
  this.yAxisTitle = '';
40
41
  this.options = {};
42
+ this.noResponsive = false;
41
43
  this.loading = false;
42
44
  this.height = '400px';
43
45
  // ── Container styling ──
@@ -295,10 +297,11 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
295
297
  })),
296
298
  breadcrumbs: deepMerge(defaultBreadcrumbs, this.drilldown?.breadcrumbs ?? {}),
297
299
  };
298
- return deepMerge({
300
+ const merged = deepMerge({
299
301
  chart: { type: 'column', ...(this.height ? { height: this.height } : {}),
300
302
  events: {
301
303
  render() {
304
+ self.emit('nile-chart-render', { chart: this });
302
305
  self.syncBreadcrumbCollapse(this);
303
306
  self.applyBreadcrumbTooltips(this);
304
307
  },
@@ -339,6 +342,7 @@ let NileColumnDrilldownChart = class NileColumnDrilldownChart extends NileElemen
339
342
  drilldown,
340
343
  credits: { enabled: false },
341
344
  }, this.options);
345
+ return withResponsiveDefaults(merged, 'columnDrilldown', this.noResponsive);
342
346
  }
343
347
  async initChart() {
344
348
  if (this.loading || !this.chartContainer)
@@ -389,6 +393,9 @@ __decorate([
389
393
  __decorate([
390
394
  property({ type: Object })
391
395
  ], NileColumnDrilldownChart.prototype, "options", void 0);
396
+ __decorate([
397
+ property({ type: Boolean, attribute: 'no-responsive' })
398
+ ], NileColumnDrilldownChart.prototype, "noResponsive", void 0);
392
399
  __decorate([
393
400
  property({ type: Boolean, reflect: true })
394
401
  ], NileColumnDrilldownChart.prototype, "loading", void 0);
@@ -20,6 +20,7 @@ export declare class NileColumnPyramidChart extends NileElement {
20
20
  data: ColumnPyramidSeriesData[];
21
21
  categories: string[];
22
22
  options: Highcharts.Options;
23
+ noResponsive: boolean;
23
24
  loading: boolean;
24
25
  height: string;
25
26
  chartBg: string;
@@ -5,6 +5,7 @@ import NileElement from '../internal/nile-element.js';
5
5
  import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
6
6
  import { getHighcharts } from '../internal/highcharts-provider.js';
7
7
  import { deepMerge } from '../internal/utils.js';
8
+ import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
8
9
  import { styles } from './nile-column-pyramid-chart.css.js';
9
10
  let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
10
11
  constructor() {
@@ -18,6 +19,7 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
18
19
  this.data = [];
19
20
  this.categories = [];
20
21
  this.options = {};
22
+ this.noResponsive = false;
21
23
  this.loading = false;
22
24
  this.height = '400px';
23
25
  // ── Container styling ──
@@ -110,7 +112,7 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
110
112
  }
111
113
  buildOptions() {
112
114
  const self = this;
113
- return deepMerge({
115
+ const merged = deepMerge({
114
116
  chart: { type: 'columnpyramid', ...(this.height ? { height: this.height } : {}) },
115
117
  title: { text: this.chartTitle || undefined },
116
118
  subtitle: { text: this.chartSubtitle || undefined },
@@ -143,6 +145,7 @@ let NileColumnPyramidChart = class NileColumnPyramidChart extends NileElement {
143
145
  legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
144
146
  credits: { enabled: false },
145
147
  }, this.options);
148
+ return withResponsiveDefaults(merged, 'columnPyramid', this.noResponsive);
146
149
  }
147
150
  async initChart() {
148
151
  if (this.loading || !this.chartContainer)
@@ -187,6 +190,9 @@ __decorate([
187
190
  __decorate([
188
191
  property({ type: Object })
189
192
  ], NileColumnPyramidChart.prototype, "options", void 0);
193
+ __decorate([
194
+ property({ type: Boolean, attribute: 'no-responsive' })
195
+ ], NileColumnPyramidChart.prototype, "noResponsive", void 0);
190
196
  __decorate([
191
197
  property({ type: Boolean, reflect: true })
192
198
  ], NileColumnPyramidChart.prototype, "loading", void 0);
@@ -20,6 +20,7 @@ export declare class NileColumnRangeChart extends NileElement {
20
20
  data: ColumnRangeSeriesData[];
21
21
  categories: string[];
22
22
  options: Highcharts.Options;
23
+ noResponsive: boolean;
23
24
  loading: boolean;
24
25
  height: string;
25
26
  yAxisTitle: string;
@@ -5,6 +5,7 @@ import NileElement from '../internal/nile-element.js';
5
5
  import { applySeparatedChartConfig } from '../internal/separated-chart-config.js';
6
6
  import { getHighcharts } from '../internal/highcharts-provider.js';
7
7
  import { deepMerge } from '../internal/utils.js';
8
+ import { withResponsiveDefaults } from '../internal/responsive-defaults.js';
8
9
  import { styles } from './nile-column-range-chart.css.js';
9
10
  let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
10
11
  constructor() {
@@ -18,6 +19,7 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
18
19
  this.data = [];
19
20
  this.categories = [];
20
21
  this.options = {};
22
+ this.noResponsive = false;
21
23
  this.loading = false;
22
24
  this.height = '400px';
23
25
  this.yAxisTitle = '';
@@ -120,7 +122,7 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
120
122
  }
121
123
  buildOptions() {
122
124
  const self = this;
123
- return deepMerge({
125
+ const merged = deepMerge({
124
126
  chart: { ...(this.height ? { height: this.height } : {}) },
125
127
  title: { text: this.chartTitle || undefined },
126
128
  subtitle: { text: this.chartSubtitle || undefined },
@@ -154,6 +156,7 @@ let NileColumnRangeChart = class NileColumnRangeChart extends NileElement {
154
156
  legend: (() => { const { show, ...rest } = this.legend ?? {}; return { enabled: show ?? this.showLegend, ...rest }; })(),
155
157
  credits: { enabled: false },
156
158
  }, this.options);
159
+ return withResponsiveDefaults(merged, 'columnRange', this.noResponsive);
157
160
  }
158
161
  async initChart() {
159
162
  if (this.loading || !this.chartContainer)
@@ -198,6 +201,9 @@ __decorate([
198
201
  __decorate([
199
202
  property({ type: Object })
200
203
  ], NileColumnRangeChart.prototype, "options", void 0);
204
+ __decorate([
205
+ property({ type: Boolean, attribute: 'no-responsive' })
206
+ ], NileColumnRangeChart.prototype, "noResponsive", void 0);
201
207
  __decorate([
202
208
  property({ type: Boolean, reflect: true })
203
209
  ], NileColumnRangeChart.prototype, "loading", void 0);
@@ -48,31 +48,47 @@ export const styles = css `
48
48
  width: 100%;
49
49
  height: 100%;
50
50
  }
51
-
52
51
  .nile-builder-remove {
53
52
  position: absolute;
54
53
  top: var(--ng-spacing-1);
55
54
  right: var(--ng-spacing-1);
56
55
  z-index: 2;
56
+ display: inline-flex;
57
+ align-items: center;
58
+ justify-content: center;
57
59
  width: var(--ng-spacing-6);
58
60
  height: var(--ng-spacing-6);
59
61
  padding: var(--ng-spacing-0);
60
62
  line-height: 1;
61
- border: var(--ng-border-width-1) var(--ng-border-style-solid)
62
- var(--ng-color-base-transparent);
63
+ border: none;
63
64
  border-radius: var(--ng-radius-xs);
64
65
  cursor: pointer;
65
- background: var(--ng-colors-bg-error-solid);
66
- color: var(--ng-colors-text-white);
67
- font-size: var(--ng-font-size-text-xs);
66
+ background: var(--ng-color-base-transparent);
67
+ color: var(--ng-colors-fg-primary-900);
68
68
  transition: background var(--ng-transition-duration-fast) ease;
69
69
  }
70
70
 
71
71
  .nile-builder-remove:hover {
72
- background: var(--ng-colors-bg-error-solid-hover);
72
+ background: var(--ng-colors-bg-secondary);
73
+ }
74
+
75
+ @media (hover: hover) {
76
+ :host([remove-visibility='hover']) .nile-builder-remove {
77
+ opacity: 0;
78
+ transition:
79
+ opacity var(--ng-transition-duration-fast) ease,
80
+ background var(--ng-transition-duration-fast) ease;
81
+ }
82
+
83
+ :host([remove-visibility='hover']) .nile-builder-cell:hover .nile-builder-remove,
84
+ :host([remove-visibility='hover']) .nile-builder-remove:focus {
85
+ opacity: 1;
86
+ }
73
87
  }
74
88
 
75
- /* Hide the remove affordance when the builder is locked. */
89
+ /* Hide the remove affordance when the builder is locked. display:none also
90
+ takes it out of the focus order, so this wins over the hover mode above
91
+ regardless of pointer type. */
76
92
  :host(:not([editable])) .nile-builder-remove {
77
93
  display: none;
78
94
  }
@@ -1,7 +1,10 @@
1
1
  import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
2
+ import type { Responsive } from 'gridstack';
2
3
  import NileElement from '../internal/nile-element.js';
3
4
  import type { NileDashboardConfig } from '../internal/types/dashboard-config.type.js';
4
5
  import '../nile-widget-viewer/index.js';
6
+ /** When the per-widget remove control (✕) is shown. */
7
+ export type RemoveVisibility = 'hover' | 'always';
5
8
  export declare class NileDashboardBuilder extends NileElement {
6
9
  static styles: CSSResultGroup;
7
10
  /** Dashboard configuration. Widgets without an `id` are assigned one. */
@@ -12,16 +15,124 @@ export declare class NileDashboardBuilder extends NileElement {
12
15
  cellHeight: number;
13
16
  /** Gap between cells in pixels. Default: 8. */
14
17
  gap: number;
18
+ /**
19
+ * Minimum number of rows the grid keeps, so an empty or sparsely-filled
20
+ * dashboard still presents a drop target instead of collapsing. Set `0` to
21
+ * let the grid shrink to its content. Default: 4.
22
+ */
15
23
  minRows: number;
16
24
  /** Minimum widget width in columns (gridster `minItemCols`). Default: 2. */
17
25
  minW: number;
18
26
  /** Minimum widget height in rows (gridster `minItemRows`). Default: 2. */
19
27
  minH: number;
28
+ /**
29
+ * Comma-separated list of edges and corners a widget can be resized from,
30
+ * passed straight to gridstack's `resizable.handles`.
31
+ *
32
+ * The default is seven of the eight positions: `ne` is left out because the
33
+ * remove control (✕) sits in that corner and would compete with the handle
34
+ * for the same few pixels. Add it back if you set `remove-visibility` such
35
+ * that the corner is free.
36
+ *
37
+ * Default: `'n,e,s,w,se,sw,nw'`.
38
+ */
20
39
  resizeHandles: string;
40
+ /**
41
+ * Whether widgets stay where they are dropped rather than being pulled up to
42
+ * close vertical gaps (gridstack's float mode). `false` compacts the grid
43
+ * upward after every change. Default: `true`.
44
+ */
21
45
  float: boolean;
46
+ /**
47
+ * Whether the dashboard can be modified. `false` makes the grid static — no
48
+ * dragging or resizing — and hides every remove control regardless of
49
+ * `remove-visibility`. Reflected, so it can be styled via `:host([editable])`.
50
+ * Default: `true`.
51
+ */
22
52
  editable: boolean;
53
+ /**
54
+ * Whether to paint the cell-boundary overlay behind the widgets, which makes
55
+ * the drop targets legible while arranging. Reflected as the `gridlines`
56
+ * attribute. Default: `true`.
57
+ */
23
58
  gridLines: boolean;
59
+ /**
60
+ * Overrides the grid-line color with any CSS color. Empty means fall back to
61
+ * the `--nile-dashboard-builder-grid-line` custom property, and then to
62
+ * `--ng-color-blue-200`. Only has a visible effect while `gridLines` is on.
63
+ * Default: `''`.
64
+ */
24
65
  gridLineColor: string;
66
+ /**
67
+ * When the per-widget remove control (✕) is shown.
68
+ *
69
+ * - `'hover'` (default) — revealed when the pointer enters the widget, keeping
70
+ * the tiles clean at rest. It also appears on keyboard focus, and stays
71
+ * permanently visible on touch devices, which cannot hover.
72
+ * - `'always'` — always visible.
73
+ *
74
+ * Orthogonal to `editable`: a non-editable builder never shows the control,
75
+ * whatever this is set to.
76
+ */
77
+ removeVisibility: RemoveVisibility;
78
+ /**
79
+ * Maximum number of rows the grid will accept, capping how tall a dashboard
80
+ * can grow. `0` means unlimited, which is the default — widgets can be placed
81
+ * or dragged arbitrarily far down. Default: 0.
82
+ */
83
+ maxRow: number;
84
+ /**
85
+ * Responsive column behaviour: pick the column count from the available width
86
+ * instead of pinning it to `columns`. Either give a `columnWidth` to target,
87
+ * or explicit `breakpoints`.
88
+ *
89
+ * Note that gridstack requires matching CSS for column counts other than the
90
+ * default, so this needs styling support to be useful.
91
+ *
92
+ * Supplying only a `columnWidth` is safe here — the missing `breakpoints`
93
+ * array is filled in before it reaches gridstack, which would otherwise
94
+ * throw on that combination.
95
+ *
96
+ * Applied at initialization only — changing it later has no effect.
97
+ */
98
+ columnOpts: Responsive | null;
99
+ /**
100
+ * Only render widgets once they scroll into view. Worth turning on for
101
+ * dashboards with many widgets, since every widget otherwise mounts a live
102
+ * chart up front.
103
+ *
104
+ * Applied at initialization only — changing it later has no effect.
105
+ * Default: `false`.
106
+ */
107
+ lazyLoad: boolean;
108
+ /**
109
+ * Stops widgets animating to their new position when the layout reflows.
110
+ *
111
+ * Named for what it turns off rather than on, because `animate` is already
112
+ * `HTMLElement.prototype.animate` and cannot be shadowed by a property.
113
+ * Default: `false`.
114
+ */
115
+ disableAnimation: boolean;
116
+ /**
117
+ * Prevents widgets from being dragged while still allowing resize. Finer
118
+ * grained than `editable`, which disables both at once; when `editable` is
119
+ * `false` nothing is draggable regardless of this. Default: `false`.
120
+ */
121
+ disableDrag: boolean;
122
+ /**
123
+ * Prevents widgets from being resized while still allowing drag. Finer
124
+ * grained than `editable`, which disables both at once; when `editable` is
125
+ * `false` nothing is resizable regardless of this. Default: `false`.
126
+ */
127
+ disableResize: boolean;
128
+ /**
129
+ * Keeps resize handles permanently visible rather than revealing them on
130
+ * hover. Useful on touch devices, which cannot hover.
131
+ *
132
+ * Applied at initialization only — changing it later has no effect.
133
+ * Default: `false`.
134
+ */
135
+ alwaysShowResizeHandle: boolean;
25
136
  private gridEl;
26
137
  private grid?;
27
138
  /** id -> the `.grid-stack-item` element hosting that widget. */