@uwdata/mosaic-inputs 0.19.1 → 0.20.1
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/Table.d.ts +2 -2
- package/dist/src/Table.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Table.js +6 -6
package/dist/src/Table.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export class Table extends Input {
|
|
|
32
32
|
* @param {Selection} [options.as] The output selection. A selection
|
|
33
33
|
* clause is added for the currently selected table row.
|
|
34
34
|
* @param {{ [name: string]: 'left' | 'right' | 'center' }} [options.align]
|
|
35
|
-
* An object that maps column names to
|
|
35
|
+
* An object that maps column names to horizontal text alignment values. If
|
|
36
36
|
* unspecified, alignment is determined based on the column data type.
|
|
37
37
|
* @param {{ [name: string]: (value: any) => string }} [options.format] An
|
|
38
38
|
* object that maps column names to format functions to use for that
|
|
@@ -45,7 +45,7 @@ export class Table extends Input {
|
|
|
45
45
|
* Used in conjunction with the *from* option.
|
|
46
46
|
* @param {number | { [name: string]: number }} [options.width] If a number,
|
|
47
47
|
* sets the desired width of the table, in pixels. If an object, is used to
|
|
48
|
-
* set explicit pixel
|
|
48
|
+
* set explicit pixel widths for each named column included in the object.
|
|
49
49
|
* @param {number} [options.maxWidth] The maximum width of the table, in pixels.
|
|
50
50
|
* @param {number} [options.height] The desired height of the table, in pixels.
|
|
51
51
|
* @param {number} [options.rowBatch] The number of rows to request per query
|
package/dist/src/Table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/Table.js"],"names":[],"mappings":"AA0CO,+BA5BJ;IAA8B,OAAO,GAA7B,WAAW;IAES,QAAQ,GAA5B,SAAS;IAEW,EAAE,GAAtB,SAAS;IAEiD,KAAK,GAA/D;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;KAAE;IAGM,MA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AM,GAAG;YAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE;QAGlB,QAAQ,GAAzB,MAAM;QACW,MAAM,GAAvB,MAAM;QACW,QAAQ,GAAzB,MAAM;KAGhB,EAuFA;IAvEC,WAA0B;IAG1B,aAAgB;IAChB,kBAAsB;IACtB;gCAtCmC,GAAG,KAAK,MAAM;MAsC7B;IACpB;;MAAkB;IAClB;;MAAoD;IAOpD,eAAe;IACf,cAAsB;IACtB,mBAAsB;IAEtB,qBAAmB;IACnB,mBAAoB;IAEpB,gBAAsB;IACtB,gBAAsB;IACtB,kBAAqB;IAuBrB,sBAA0C;IAG1C,8BAA2C;IAG3C,8BAA2C;IAiB3C,wBAA4C;IAI9C,mBAEC;IAED,oEAQC;IAED,mCASC;IAOC,kDAAoB;IAgBpB,aAA4C;IAU9C;;OAEG;IACH,eAFW,UAAU,4CAUpB;IAED,6BAUC;IAPG,gBAAmB;IACnB,YAAc;IAQlB,eA2BC;IAQD,oCAsBC;CACF;+BAjT6B,qBAAqB;sBAMtB,YAAY;gCALV,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uwdata/mosaic-inputs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Mosaic input components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"inputs",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"prepublishOnly": "npm run test && npm run lint && tsc --build"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@uwdata/mosaic-core": "^0.
|
|
34
|
-
"@uwdata/mosaic-sql": "^0.
|
|
33
|
+
"@uwdata/mosaic-core": "^0.20.1",
|
|
34
|
+
"@uwdata/mosaic-sql": "^0.20.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "1e093fdf1bd1f1300d64ed2c4f7efcec74218048"
|
|
37
37
|
}
|
package/src/Table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import {
|
|
2
|
+
* @import { Selection } from '@uwdata/mosaic-core'
|
|
3
3
|
* @import { FilterExpr } from '@uwdata/mosaic-sql'
|
|
4
4
|
*/
|
|
5
5
|
import { clausePoints, coordinator, isParam, isSelection, queryFieldInfo, toDataColumns } from '@uwdata/mosaic-core';
|
|
@@ -19,7 +19,7 @@ let _id = -1;
|
|
|
19
19
|
* @param {Selection} [options.as] The output selection. A selection
|
|
20
20
|
* clause is added for the currently selected table row.
|
|
21
21
|
* @param {{ [name: string]: 'left' | 'right' | 'center' }} [options.align]
|
|
22
|
-
* An object that maps column names to
|
|
22
|
+
* An object that maps column names to horizontal text alignment values. If
|
|
23
23
|
* unspecified, alignment is determined based on the column data type.
|
|
24
24
|
* @param {{ [name: string]: (value: any) => string }} [options.format] An
|
|
25
25
|
* object that maps column names to format functions to use for that
|
|
@@ -32,7 +32,7 @@ let _id = -1;
|
|
|
32
32
|
* Used in conjunction with the *from* option.
|
|
33
33
|
* @param {number | { [name: string]: number }} [options.width] If a number,
|
|
34
34
|
* sets the desired width of the table, in pixels. If an object, is used to
|
|
35
|
-
* set explicit pixel
|
|
35
|
+
* set explicit pixel widths for each named column included in the object.
|
|
36
36
|
* @param {number} [options.maxWidth] The maximum width of the table, in pixels.
|
|
37
37
|
* @param {number} [options.height] The desired height of the table, in pixels.
|
|
38
38
|
* @param {number} [options.rowBatch] The number of rows to request per query
|
|
@@ -57,7 +57,7 @@ export class Table extends Input {
|
|
|
57
57
|
* @param {Selection} [options.as] The output selection. A selection
|
|
58
58
|
* clause is added for the currently selected table row.
|
|
59
59
|
* @param {{ [name: string]: 'left' | 'right' | 'center' }} [options.align]
|
|
60
|
-
* An object that maps column names to
|
|
60
|
+
* An object that maps column names to horizontal text alignment values. If
|
|
61
61
|
* unspecified, alignment is determined based on the column data type.
|
|
62
62
|
* @param {{ [name: string]: (value: any) => string }} [options.format] An
|
|
63
63
|
* object that maps column names to format functions to use for that
|
|
@@ -70,7 +70,7 @@ export class Table extends Input {
|
|
|
70
70
|
* Used in conjunction with the *from* option.
|
|
71
71
|
* @param {number | { [name: string]: number }} [options.width] If a number,
|
|
72
72
|
* sets the desired width of the table, in pixels. If an object, is used to
|
|
73
|
-
* set explicit pixel
|
|
73
|
+
* set explicit pixel widths for each named column included in the object.
|
|
74
74
|
* @param {number} [options.maxWidth] The maximum width of the table, in pixels.
|
|
75
75
|
* @param {number} [options.height] The desired height of the table, in pixels.
|
|
76
76
|
* @param {number} [options.rowBatch] The number of rows to request per query
|
|
@@ -191,7 +191,7 @@ export class Table extends Input {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
async prepare() {
|
|
194
|
-
// query for column
|
|
194
|
+
// query for column schema information
|
|
195
195
|
const table = this.sourceTable();
|
|
196
196
|
const fields = this.columns.map(column => ({ column, table }));
|
|
197
197
|
const schema = await queryFieldInfo(this.coordinator, fields);
|