@aquera/nile-visualization 2.1.0 → 2.2.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.
|
@@ -172,30 +172,28 @@ export const styles = css `
|
|
|
172
172
|
contain: layout style;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
/* Grid:
|
|
175
|
+
/* Grid layout:
|
|
176
|
+
- card uses clip-path (not overflow:hidden) so position:sticky on the header is not broken
|
|
177
|
+
- height goes on nile-data-grid itself so .scroll-container inside shadow DOM scrolls,
|
|
178
|
+
making position:sticky on <th> work correctly
|
|
179
|
+
- AI panel is rendered outside the wrapper and anchored via position:relative on the card */
|
|
176
180
|
.nile-chart-card--grid {
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
position: relative;
|
|
182
|
+
clip-path: inset(0);
|
|
179
183
|
}
|
|
180
184
|
|
|
181
|
-
.nile-chart-card--grid .nile-chart-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
.nile-chart-card--grid .nile-chart-header {
|
|
186
|
+
position: sticky;
|
|
187
|
+
top: 0;
|
|
188
|
+
z-index: 2;
|
|
189
|
+
background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
186
190
|
}
|
|
187
191
|
|
|
188
192
|
.nile-chart-card--grid .nile-chart-inner {
|
|
189
|
-
|
|
190
|
-
min-height: 0;
|
|
193
|
+
overflow: visible;
|
|
191
194
|
contain: none;
|
|
192
195
|
}
|
|
193
196
|
|
|
194
|
-
.nile-chart-card--grid nile-data-grid {
|
|
195
|
-
display: block;
|
|
196
|
-
height: 100%;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
197
|
/* ── Default slot (custom chart body only — not named slots) ── */
|
|
200
198
|
slot:not([name])::slotted(*) {
|
|
201
199
|
display: block;
|
|
@@ -1657,7 +1657,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1657
1657
|
case 'grid': {
|
|
1658
1658
|
const gridChrome = '--nile-data-grid-radius:0;' +
|
|
1659
1659
|
'--nile-data-grid-border-color:transparent;' +
|
|
1660
|
-
'--nile-data-grid-shadow:none;'
|
|
1660
|
+
'--nile-data-grid-shadow:none;' +
|
|
1661
|
+
(config.height ? `height:${config.height};` : '');
|
|
1661
1662
|
return html `<nile-data-grid
|
|
1662
1663
|
class="nile-chart-grid"
|
|
1663
1664
|
.data=${config.data}
|
|
@@ -1698,11 +1699,8 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1698
1699
|
render() {
|
|
1699
1700
|
const isLoading = this.loading || (this.activeConfig?.loading ?? false);
|
|
1700
1701
|
const isGrid = this.activeConfig?.type === 'grid';
|
|
1701
|
-
const cardStyle = isGrid && this.activeConfig?.height
|
|
1702
|
-
? `height:${this.activeConfig.height}`
|
|
1703
|
-
: '';
|
|
1704
1702
|
return html `
|
|
1705
|
-
<div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''}"
|
|
1703
|
+
<div class="nile-chart-card ${isGrid ? 'nile-chart-card--grid' : ''}">
|
|
1706
1704
|
${this.renderHeader()}
|
|
1707
1705
|
<div class="nile-chart-wrapper">
|
|
1708
1706
|
<div class="nile-chart-inner ${this.activeConfig?.type === 'kpi' ? 'nile-chart-inner--kpi' : ''}">
|
|
@@ -1711,9 +1709,10 @@ let NileChart = class NileChart extends NileElement {
|
|
|
1711
1709
|
: this.activeConfig
|
|
1712
1710
|
? this.renderChartContent()
|
|
1713
1711
|
: html `<slot></slot>`}
|
|
1714
|
-
${this.renderAiPanel()}
|
|
1712
|
+
${isGrid ? nothing : this.renderAiPanel()}
|
|
1715
1713
|
</div>
|
|
1716
1714
|
</div>
|
|
1715
|
+
${isGrid ? this.renderAiPanel() : nothing}
|
|
1717
1716
|
<slot name="footer"></slot>
|
|
1718
1717
|
</div>
|
|
1719
1718
|
`;
|