@malloydata/render 0.0.107-dev231129172332 → 0.0.107

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.
@@ -34,13 +34,21 @@ const decorators_js_1 = require("lit/decorators.js");
34
34
  require("./table");
35
35
  let MalloyRender = exports.MalloyRender = class MalloyRender extends lit_1.LitElement {
36
36
  render() {
37
- return (0, lit_1.html) `<malloy-table .data=${this.result.data}></malloy-table>`;
37
+ const isCompact = this.result.resultExplore.modelTag.has('renderer_next', 'compact');
38
+ const dynamicStyle = (0, lit_1.html) `<style>
39
+ :host {
40
+ --table-row-height: ${isCompact ? '28px' : '36px'};
41
+ }
42
+ </style>`;
43
+ return (0, lit_1.html) `${dynamicStyle}<malloy-table
44
+ exportparts="table-container: container"
45
+ .data=${this.result.data}
46
+ ></malloy-table>`;
38
47
  }
39
48
  };
40
49
  MalloyRender.styles = (0, lit_1.css) `
41
50
  :host {
42
51
  --table-font-size: 12px;
43
- --table-row-height: 36px;
44
52
  --table-header-color: #5d626b;
45
53
  --table-header-weight: bold;
46
54
  --table-body-color: #727883;
@@ -62,13 +70,7 @@ MalloyRender.styles = (0, lit_1.css) `
62
70
  Inter,
63
71
  system-ui sans-serif;
64
72
 
65
- font-variant-numeric: tabular-nums;
66
73
  font-feature-settings:
67
- 'cv01' 1,
68
- 'cv02' 1,
69
- 'cv03' 1,
70
- 'cv04' 1,
71
- 'cv09' 1,
72
74
  'liga' 1,
73
75
  'calt' 1;
74
76
  }
@@ -170,7 +170,11 @@ let Table = exports.Table = class Table extends lit_1.LitElement {
170
170
  }
171
171
  return lit_1.nothing;
172
172
  };
173
- return (0, lit_1.html) `<div @scroll=${this._handleScroll} class="table-wrapper">
173
+ return (0, lit_1.html) `<div
174
+ @scroll=${this._handleScroll}
175
+ class="table-wrapper"
176
+ part=${this.ctx.root ? 'table-container' : lit_1.nothing}
177
+ >
174
178
  ${renderStickyHeader()}
175
179
  <table>
176
180
  <thead>
@@ -245,6 +249,7 @@ Table.styles = (0, lit_1.css) `
245
249
 
246
250
  .column-cell.numeric {
247
251
  text-align: right;
252
+ font-variant-numeric: tabular-nums;
248
253
  }
249
254
 
250
255
  .cell-wrapper {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/render",
3
- "version": "0.0.107-dev231129172332",
3
+ "version": "0.0.107",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@lit/context": "^1.1.0",
27
- "@malloydata/malloy": "^0.0.107-dev231129172332",
27
+ "@malloydata/malloy": "^0.0.107",
28
28
  "@types/luxon": "^2.4.0",
29
29
  "lit": "^3.0.2",
30
30
  "lodash": "^4.17.20",