@aquera/nile-visualization 2.9.8 → 2.9.9
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/dist/src/nile-chart/nile-chart-config.d.ts +1 -0
- package/dist/src/nile-chart/nile-chart.css.js +9 -0
- package/dist/src/nile-chart/nile-chart.d.ts +2 -0
- package/dist/src/nile-chart/nile-chart.js +22 -0
- package/dist/src/nile-filter-chart/nile-filter-chart.css.js +184 -107
- package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +20 -3
- package/dist/src/nile-filter-chart/nile-filter-chart.js +97 -25
- package/dist/src/nile-filter-chart/utils/prompt.js +210 -60
- package/dist/src/nile-filter-chart/utils/types.d.ts +59 -25
- package/package.json +1 -1
|
@@ -172,6 +172,15 @@ export const styles = css `
|
|
|
172
172
|
contain: layout style;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
:host([no-header]) .nile-chart-inner {
|
|
176
|
+
border-radius: var(--nile-radius-radius-3xl, var(--ng-radius-xl));
|
|
177
|
+
padding-top: var(--nile-spacing-2xl, var(--ng-spacing-2xl));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host([no-header][appearance="minimal"]) .nile-chart-inner {
|
|
181
|
+
padding-top: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
175
184
|
/* Grid layout:
|
|
176
185
|
- card uses clip-path (not overflow:hidden) so position:sticky on the header is not broken
|
|
177
186
|
- height goes on nile-data-grid itself so .scroll-container inside shadow DOM scrolls,
|
|
@@ -66,6 +66,8 @@ export declare class NileChart extends NileElement {
|
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
68
|
loading: boolean;
|
|
69
|
+
noHeader: boolean;
|
|
70
|
+
appearance: string | null;
|
|
69
71
|
/**
|
|
70
72
|
* When set, fills `chart.type` if the config omits it (same values as `chart.type`, e.g. `stacked`, `pie`).
|
|
71
73
|
* Usage: `<nile-chart chart-type="pie" />` plus `config.chart` with series data only.
|
|
@@ -135,6 +135,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
135
135
|
* ```
|
|
136
136
|
*/
|
|
137
137
|
this.loading = false;
|
|
138
|
+
this.noHeader = false;
|
|
139
|
+
this.appearance = null;
|
|
138
140
|
/**
|
|
139
141
|
* When set, fills `chart.type` if the config omits it (same values as `chart.type`, e.g. `stacked`, `pie`).
|
|
140
142
|
* Usage: `<nile-chart chart-type="pie" />` plus `config.chart` with series data only.
|
|
@@ -248,6 +250,14 @@ let NileChart = class NileChart extends NileElement {
|
|
|
248
250
|
this.resolvedConfig = this.resolveConfig(this.config);
|
|
249
251
|
this.activeType = this.resolvedConfig.type;
|
|
250
252
|
this.activeConfig = this.resolvedConfig;
|
|
253
|
+
const resolved = this.resolvedConfig;
|
|
254
|
+
// appearance="minimal" on filter charts implies a header-less compact layout.
|
|
255
|
+
const minimalFilter = resolved.type === 'filter' && resolved.appearance === 'minimal';
|
|
256
|
+
const cfgNoHeader = resolved.noHeader === true || minimalFilter;
|
|
257
|
+
if (cfgNoHeader && !this.noHeader)
|
|
258
|
+
this.noHeader = true;
|
|
259
|
+
if (resolved.appearance && this.appearance !== resolved.appearance)
|
|
260
|
+
this.appearance = resolved.appearance;
|
|
251
261
|
}
|
|
252
262
|
}
|
|
253
263
|
toggleMenu(e) {
|
|
@@ -360,6 +370,12 @@ let NileChart = class NileChart extends NileElement {
|
|
|
360
370
|
return false;
|
|
361
371
|
}
|
|
362
372
|
shouldShowHeader() {
|
|
373
|
+
if (this.noHeader)
|
|
374
|
+
return false;
|
|
375
|
+
if (this.resolvedConfig?.noHeader === true)
|
|
376
|
+
return false;
|
|
377
|
+
if (this.activeConfig?.noHeader === true)
|
|
378
|
+
return false;
|
|
363
379
|
const hasTitles = !!(this.headerTitle || this.headerSubtitle);
|
|
364
380
|
const menuEnabled = this.resolvedConfig?.menu?.enabled === true || this.menu?.enabled === true;
|
|
365
381
|
const hasBuiltinActions = this.aiEnabled || (this.resolvedConfig?.switchableTypes?.length ?? 0) > 0 || menuEnabled;
|
|
@@ -1755,6 +1771,12 @@ __decorate([
|
|
|
1755
1771
|
__decorate([
|
|
1756
1772
|
property({ type: Boolean, reflect: true })
|
|
1757
1773
|
], NileChart.prototype, "loading", void 0);
|
|
1774
|
+
__decorate([
|
|
1775
|
+
property({ type: Boolean, reflect: true, attribute: 'no-header' })
|
|
1776
|
+
], NileChart.prototype, "noHeader", void 0);
|
|
1777
|
+
__decorate([
|
|
1778
|
+
property({ type: String, reflect: true })
|
|
1779
|
+
], NileChart.prototype, "appearance", void 0);
|
|
1758
1780
|
__decorate([
|
|
1759
1781
|
property({ type: String, attribute: 'chart-type' })
|
|
1760
1782
|
], NileChart.prototype, "chartTypeAttr", void 0);
|