@deephaven/iris-grid 0.87.0 → 0.87.1-beta.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridPartitionedTableModel.d.ts","sourceRoot":"","sources":["../src/IrisGridPartitionedTableModel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"IrisGridPartitionedTableModel.d.ts","sourceRoot":"","sources":["../src/IrisGridPartitionedTableModel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAetE,cAAM,6BACJ,SAAQ,kBACR,YAAW,4BAA4B;IAEvC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,CAAC;IAEnD;;;;OAIG;gBAED,EAAE,EAAE,OAAO,MAAM,EACjB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EACzC,SAAS,YAAoB;IAM/B,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,IAAI,2BAA2B,IAAI,OAAO,CAEzC;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,aAAa,CACX,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,UAAU,GACtB,MAAM;IAIT,KAAK,IAAI,IAAI;IAIb,IAAI,OAAO,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,CAEtC;IAED,IAAI,gBAAgB,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,CAE/C;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAIhD,mBAAmB,CACjB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,GAAG,SAAS;IAIf,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IAI3C,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IAQ3C,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IAI7C,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;CAgBnE;AAED,eAAe,6BAA6B,CAAC"}
|
|
@@ -8,6 +8,9 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
8
8
|
import { Formatter } from '@deephaven/jsapi-utils';
|
|
9
9
|
import EmptyIrisGridModel from "./EmptyIrisGridModel.js";
|
|
10
10
|
import MissingPartitionError, { isMissingPartitionError } from "./MissingPartitionError.js";
|
|
11
|
+
function isPartitionedTableWithBaseTable(partitionedTable) {
|
|
12
|
+
return 'getBaseTable' in partitionedTable && typeof partitionedTable.getBaseTable === 'function';
|
|
13
|
+
}
|
|
11
14
|
class IrisGridPartitionedTableModel extends EmptyIrisGridModel {
|
|
12
15
|
/**
|
|
13
16
|
* @param dh JSAPI instance
|
|
@@ -60,8 +63,11 @@ class IrisGridPartitionedTableModel extends EmptyIrisGridModel {
|
|
|
60
63
|
partitionBaseTable() {
|
|
61
64
|
var _this2 = this;
|
|
62
65
|
return _asyncToGenerator(function* () {
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
if (isPartitionedTableWithBaseTable(_this2.partitionedTable)) {
|
|
67
|
+
return _this2.partitionedTable.getBaseTable();
|
|
68
|
+
}
|
|
69
|
+
// Fallback to the key table if the base table API is not available
|
|
70
|
+
return _this2.partitionedTable.getKeyTable();
|
|
65
71
|
})();
|
|
66
72
|
}
|
|
67
73
|
partitionMergedTable() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IrisGridPartitionedTableModel.js","names":["Formatter","EmptyIrisGridModel","MissingPartitionError","isMissingPartitionError","IrisGridPartitionedTableModel","constructor","dh","
|
|
1
|
+
{"version":3,"file":"IrisGridPartitionedTableModel.js","names":["Formatter","EmptyIrisGridModel","MissingPartitionError","isMissingPartitionError","isPartitionedTableWithBaseTable","partitionedTable","getBaseTable","IrisGridPartitionedTableModel","constructor","dh","formatter","arguments","length","undefined","_defineProperty","isPartitionRequired","isPartitionAwareSourceTable","isReversible","displayString","value","columnType","columnName","close","columns","partitionColumns","keyColumns","columnCount","getColumnIndexByName","findIndex","column","name","textForColumnHeader","depth","_this$columns$column$","partitionKeysTable","_this","_asyncToGenerator","getKeyTable","partitionBaseTable","_this2","partitionMergedTable","_this3","getMergedTable","partitionTable","partitions","_this4","table","getTable","e"],"sources":["../src/IrisGridPartitionedTableModel.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport { Formatter } from '@deephaven/jsapi-utils';\nimport { ColumnName } from './CommonTypes';\nimport EmptyIrisGridModel from './EmptyIrisGridModel';\nimport MissingPartitionError, {\n isMissingPartitionError,\n} from './MissingPartitionError';\nimport { PartitionedGridModelProvider } from './PartitionedGridModel';\n\ntype PartitionedTableWithBaseTable = DhType.PartitionedTable & {\n getBaseTable: () => DhType.Table;\n};\n\nfunction isPartitionedTableWithBaseTable(\n partitionedTable: DhType.PartitionedTable\n): partitionedTable is PartitionedTableWithBaseTable {\n return (\n 'getBaseTable' in partitionedTable &&\n typeof partitionedTable.getBaseTable === 'function'\n );\n}\n\nclass IrisGridPartitionedTableModel\n extends EmptyIrisGridModel\n implements PartitionedGridModelProvider\n{\n readonly partitionedTable: DhType.PartitionedTable;\n\n /**\n * @param dh JSAPI instance\n * @param table Partitioned table to be used in the model\n * @param formatter The formatter to use when getting formats\n */\n constructor(\n dh: typeof DhType,\n partitionedTable: DhType.PartitionedTable,\n formatter = new Formatter(dh)\n ) {\n super(dh, formatter);\n this.partitionedTable = partitionedTable;\n }\n\n get isPartitionRequired(): boolean {\n return true;\n }\n\n get isPartitionAwareSourceTable(): boolean {\n return false;\n }\n\n get isReversible(): boolean {\n return false;\n }\n\n displayString(\n value: unknown,\n columnType: string,\n columnName?: ColumnName\n ): string {\n return '';\n }\n\n close(): void {\n this.partitionedTable.close();\n }\n\n get columns(): readonly DhType.Column[] {\n return this.partitionedTable.columns;\n }\n\n get partitionColumns(): readonly DhType.Column[] {\n return this.partitionedTable.keyColumns;\n }\n\n get columnCount(): number {\n return this.columns.length;\n }\n\n getColumnIndexByName(columnName: string): number {\n return this.columns.findIndex(column => column.name === columnName);\n }\n\n textForColumnHeader(\n column: number,\n depth?: number | undefined\n ): string | undefined {\n return this.columns[column].name ?? '';\n }\n\n async partitionKeysTable(): Promise<DhType.Table> {\n return this.partitionedTable.getKeyTable();\n }\n\n async partitionBaseTable(): Promise<DhType.Table> {\n if (isPartitionedTableWithBaseTable(this.partitionedTable)) {\n return this.partitionedTable.getBaseTable();\n }\n // Fallback to the key table if the base table API is not available\n return this.partitionedTable.getKeyTable();\n }\n\n async partitionMergedTable(): Promise<DhType.Table> {\n return this.partitionedTable.getMergedTable();\n }\n\n async partitionTable(partitions: unknown[]): Promise<DhType.Table> {\n try {\n const table = await this.partitionedTable.getTable(partitions);\n if (table == null) {\n // TODO: Will be unnecessary with https://github.com/deephaven/deephaven-core/pull/5050\n throw new MissingPartitionError('Partition not found');\n }\n return table;\n } catch (e) {\n if (!isMissingPartitionError(e)) {\n throw new MissingPartitionError('Unable to retrieve partition');\n } else {\n throw e;\n }\n }\n }\n}\n\nexport default IrisGridPartitionedTableModel;\n"],"mappings":";;;;;AAAA;;AAEA,SAASA,SAAS,QAAQ,wBAAwB;AAAC,OAE5CC,kBAAkB;AAAA,OAClBC,qBAAqB,IAC1BC,uBAAuB;AAQzB,SAASC,+BAA+BA,CACtCC,gBAAyC,EACU;EACnD,OACE,cAAc,IAAIA,gBAAgB,IAClC,OAAOA,gBAAgB,CAACC,YAAY,KAAK,UAAU;AAEvD;AAEA,MAAMC,6BAA6B,SACzBN,kBAAkB,CAE5B;EAGE;AACF;AACA;AACA;AACA;EACEO,WAAWA,CACTC,EAAiB,EACjBJ,gBAAyC,EAEzC;IAAA,IADAK,SAAS,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAIX,SAAS,CAACS,EAAE,CAAC;IAE7B,KAAK,CAACA,EAAE,EAAEC,SAAS,CAAC;IAACI,eAAA;IACrB,IAAI,CAACT,gBAAgB,GAAGA,gBAAgB;EAC1C;EAEA,IAAIU,mBAAmBA,CAAA,EAAY;IACjC,OAAO,IAAI;EACb;EAEA,IAAIC,2BAA2BA,CAAA,EAAY;IACzC,OAAO,KAAK;EACd;EAEA,IAAIC,YAAYA,CAAA,EAAY;IAC1B,OAAO,KAAK;EACd;EAEAC,aAAaA,CACXC,KAAc,EACdC,UAAkB,EAClBC,UAAuB,EACf;IACR,OAAO,EAAE;EACX;EAEAC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACjB,gBAAgB,CAACiB,KAAK,CAAC,CAAC;EAC/B;EAEA,IAAIC,OAAOA,CAAA,EAA6B;IACtC,OAAO,IAAI,CAAClB,gBAAgB,CAACkB,OAAO;EACtC;EAEA,IAAIC,gBAAgBA,CAAA,EAA6B;IAC/C,OAAO,IAAI,CAACnB,gBAAgB,CAACoB,UAAU;EACz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qB,CAAC;QACxD;QACA,OAAO4C,KAAK;MACd,CAAC,CAAC,OAAOE,CAAC,EAAE;QACV,IAAI,CAAC7C,uBAAuB,CAAC6C,CAAC,CAAC,EAAE;UAC/B,MAAM,IAAI9C,qBAAqB,CAAC,8BAA8B,CAAC;QACjE,CAAC,MAAM;UACL,MAAM8C,CAAC;QACT;MACF;IAAC;EACH;AACF;AAEA,eAAezC,6BAA6B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/iris-grid",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.1-beta.1+7fb4f64b",
|
|
4
4
|
"description": "Deephaven Iris Grid",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@deephaven/components": "^0.87.
|
|
35
|
-
"@deephaven/console": "^0.87.
|
|
36
|
-
"@deephaven/filters": "^0.87.
|
|
37
|
-
"@deephaven/grid": "^0.87.
|
|
38
|
-
"@deephaven/icons": "^0.87.
|
|
39
|
-
"@deephaven/jsapi-components": "^0.87.
|
|
34
|
+
"@deephaven/components": "^0.87.1-beta.1+7fb4f64b",
|
|
35
|
+
"@deephaven/console": "^0.87.1-beta.1+7fb4f64b",
|
|
36
|
+
"@deephaven/filters": "^0.87.1-beta.1+7fb4f64b",
|
|
37
|
+
"@deephaven/grid": "^0.87.1-beta.1+7fb4f64b",
|
|
38
|
+
"@deephaven/icons": "^0.87.1-beta.1+7fb4f64b",
|
|
39
|
+
"@deephaven/jsapi-components": "^0.87.1-beta.1+7fb4f64b",
|
|
40
40
|
"@deephaven/jsapi-types": "^1.0.0-dev0.34.0",
|
|
41
|
-
"@deephaven/jsapi-utils": "^0.87.
|
|
42
|
-
"@deephaven/log": "^0.87.
|
|
43
|
-
"@deephaven/react-hooks": "^0.87.
|
|
44
|
-
"@deephaven/storage": "^0.87.
|
|
45
|
-
"@deephaven/utils": "^0.87.
|
|
41
|
+
"@deephaven/jsapi-utils": "^0.87.1-beta.1+7fb4f64b",
|
|
42
|
+
"@deephaven/log": "^0.87.1-beta.1+7fb4f64b",
|
|
43
|
+
"@deephaven/react-hooks": "^0.87.1-beta.1+7fb4f64b",
|
|
44
|
+
"@deephaven/storage": "^0.87.1-beta.1+7fb4f64b",
|
|
45
|
+
"@deephaven/utils": "^0.87.1-beta.1+7fb4f64b",
|
|
46
46
|
"@dnd-kit/core": "^6.1.0",
|
|
47
47
|
"@dnd-kit/sortable": "^7.0.2",
|
|
48
48
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-dom": ">=16.8.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@deephaven/jsapi-shim": "^0.87.
|
|
69
|
-
"@deephaven/mocks": "^0.87.
|
|
68
|
+
"@deephaven/jsapi-shim": "^0.87.1-beta.1+7fb4f64b",
|
|
69
|
+
"@deephaven/mocks": "^0.87.1-beta.1+7fb4f64b",
|
|
70
70
|
"deep-equal": "2.2.3"
|
|
71
71
|
},
|
|
72
72
|
"files": [
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "7fb4f64bf9822c95faa961c53f480da4ea9e0401"
|
|
83
83
|
}
|