@uwdata/mosaic-inputs
Advanced tools
Comparing version 0.11.0 to 0.12.0
{ | ||
"name": "@uwdata/mosaic-inputs", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Mosaic input components.", | ||
@@ -28,7 +28,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@uwdata/mosaic-core": "^0.11.0", | ||
"@uwdata/mosaic-sql": "^0.11.0", | ||
"@uwdata/mosaic-core": "^0.12.0", | ||
"@uwdata/mosaic-sql": "^0.12.0", | ||
"isoformat": "^0.2.1" | ||
}, | ||
"gitHead": "861d616f39926a1d2aee83b59dbdd70b0b3caf12" | ||
"gitHead": "523b1afe2a0880291c92f81e4a7b91829362d285" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { MosaicClient, clausePoints, coordinator, toDataColumns } from '@uwdata/mosaic-core'; | ||
import { MosaicClient, clausePoints, coordinator, isParam, toDataColumns } from '@uwdata/mosaic-core'; | ||
import { Query, column, desc } from '@uwdata/mosaic-sql'; | ||
@@ -36,2 +36,7 @@ import { formatDate, formatLocaleAuto, formatLocaleNumber } from './util/format.js'; | ||
if (isParam(from)) { | ||
// if data table is a param, re-initialize upon change | ||
from.addEventListener('value', () => this.initialize()); | ||
} | ||
this.offset = 0; | ||
@@ -98,2 +103,6 @@ this.limit = +rowBatch; | ||
sourceTable() { | ||
return isParam(this.from) ? this.from.value : this.from; | ||
} | ||
clause(rows = []) { | ||
@@ -121,3 +130,4 @@ const { data, limit, schema } = this; | ||
fields() { | ||
return this.columns.map(name => column(this.from, name)); | ||
const from = this.sourceTable(); | ||
return this.columns.map(name => column(name, from)); | ||
} | ||
@@ -154,4 +164,4 @@ | ||
query(filter = []) { | ||
const { from, limit, offset, schema, sortColumn, sortDesc } = this; | ||
return Query.from(from) | ||
const { limit, offset, schema, sortColumn, sortDesc } = this; | ||
return Query.from(this.sourceTable()) | ||
.select(schema.map(s => s.column)) | ||
@@ -158,0 +168,0 @@ .where(filter) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
313668
7901
+ Added@uwdata/mosaic-core@0.12.1(transitive)
+ Added@uwdata/mosaic-sql@0.12.1(transitive)
- Removed@uwdata/mosaic-core@0.11.0(transitive)
- Removed@uwdata/mosaic-sql@0.11.0(transitive)
Updated@uwdata/mosaic-core@^0.12.0
Updated@uwdata/mosaic-sql@^0.12.0