@hpcc-js/dgrid 2.33.0 → 3.1.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.
- package/dist/index.js +495 -30804
- package/dist/index.js.map +7 -1
- package/package.json +33 -37
- package/src/Common.ts +36 -30
- package/src/DBStore.ts +2 -2
- package/src/DatasourceStore.ts +3 -3
- package/src/DatasourceTable.ts +13 -8
- package/src/Table.ts +15 -9
- package/src/__package__.ts +2 -2
- package/src/dgrid-shim.ts +12 -0
- package/src/index.ts +8 -9
- package/types/Common.d.ts +22 -14
- package/types/DBStore.d.ts +1 -2
- package/types/DatasourceStore.d.ts +2 -3
- package/types/DatasourceTable.d.ts +7 -8
- package/types/RowFormatter.d.ts +0 -1
- package/types/Table.d.ts +9 -7
- package/types/__package__.d.ts +2 -3
- package/types/dgrid-shim.d.ts +7 -0
- package/types/index.d.ts +8 -9
- package/dist/index.es6.js +0 -30791
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -341
- package/dist/index.min.js.map +0 -1
- package/types/Common.d.ts.map +0 -1
- package/types/DBStore.d.ts.map +0 -1
- package/types/DatasourceStore.d.ts.map +0 -1
- package/types/DatasourceTable.d.ts.map +0 -1
- package/types/RowFormatter.d.ts.map +0 -1
- package/types/Table.d.ts.map +0 -1
- package/types/__package__.d.ts.map +0 -1
- package/types/__tests__/index.d.ts +0 -2
- package/types/__tests__/index.d.ts.map +0 -1
- package/types/__tests__/test1.d.ts +0 -5
- package/types/__tests__/test1.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types-3.4/Common.d.ts +0 -39
- package/types-3.4/DBStore.d.ts +0 -24
- package/types-3.4/DatasourceStore.d.ts +0 -43
- package/types-3.4/DatasourceTable.d.ts +0 -17
- package/types-3.4/RowFormatter.d.ts +0 -38
- package/types-3.4/Table.d.ts +0 -53
- package/types-3.4/__package__.d.ts +0 -4
- package/types-3.4/__tests__/index.d.ts +0 -2
- package/types-3.4/__tests__/test1.d.ts +0 -5
- package/types-3.4/index.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,54 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/dgrid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "hpcc-js - Viz DGrid",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"<3.8": {
|
|
13
|
-
"*": [
|
|
14
|
-
"types-3.4/index.d.ts"
|
|
15
|
-
]
|
|
16
|
-
}
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./dist/*": "./dist/*"
|
|
17
12
|
},
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"browser": "./dist/index.js",
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
18
16
|
"files": [
|
|
19
17
|
"dist/*",
|
|
20
|
-
"
|
|
21
|
-
"types
|
|
22
|
-
"src/*"
|
|
18
|
+
"src/*",
|
|
19
|
+
"types/*"
|
|
23
20
|
],
|
|
24
21
|
"scripts": {
|
|
25
|
-
"clean": "rimraf --glob lib* types dist *.tsbuildinfo",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"bundle-watch": "npm run bundle -- -w",
|
|
32
|
-
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
|
|
33
|
-
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
|
|
34
|
-
"build": "npm run compile-es6 && npm run bundle",
|
|
35
|
-
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
|
|
36
|
-
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
22
|
+
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
23
|
+
"bundle": "node esbuild.js",
|
|
24
|
+
"bundle-watch": "npm run bundle -- --development --watch",
|
|
25
|
+
"gen-types": "tsc --project tsconfig.json",
|
|
26
|
+
"gen-types-watch": "npm run gen-types -- --watch",
|
|
27
|
+
"build": "run-p gen-types bundle",
|
|
37
28
|
"lint": "eslint ./src",
|
|
29
|
+
"lint-fix": "eslint --fix src/**/*.ts",
|
|
38
30
|
"docs": "typedoc --options tdoptions.json .",
|
|
39
|
-
"
|
|
31
|
+
"test-browser": "vitest run --project browser",
|
|
32
|
+
"test": "vitest run",
|
|
33
|
+
"coverage": "vitest run --coverage",
|
|
34
|
+
"update": "npx --yes npm-check-updates -u -t minor",
|
|
35
|
+
"update-major": "npx -yes npm-check-updates -u"
|
|
40
36
|
},
|
|
41
37
|
"dependencies": {
|
|
42
|
-
"@hpcc-js/common": "^2.
|
|
43
|
-
"@hpcc-js/
|
|
44
|
-
"@hpcc-js/
|
|
45
|
-
"@hpcc-js/util": "^2.52.0"
|
|
38
|
+
"@hpcc-js/common": "^3.2.0",
|
|
39
|
+
"@hpcc-js/dgrid-shim": "^3.1.0",
|
|
40
|
+
"@hpcc-js/util": "^3.2.0"
|
|
46
41
|
},
|
|
47
42
|
"devDependencies": {
|
|
48
|
-
"@hpcc-js/
|
|
43
|
+
"@hpcc-js/ddl-shim": "^3.0.0",
|
|
44
|
+
"@hpcc-js/esbuild-plugins": "^1.3.0",
|
|
45
|
+
"@testing-library/dom": "10.4.0",
|
|
49
46
|
"d3-format": "^1",
|
|
50
|
-
"d3-selection": "^1"
|
|
51
|
-
"tslib": "2.6.3"
|
|
47
|
+
"d3-selection": "^1"
|
|
52
48
|
},
|
|
53
49
|
"repository": {
|
|
54
50
|
"type": "git",
|
|
@@ -61,5 +57,5 @@
|
|
|
61
57
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
62
58
|
},
|
|
63
59
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
64
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "658c50fd965a7744ba8db675ba6878607c44d5e2"
|
|
65
61
|
}
|
package/src/Common.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HTMLWidget
|
|
2
|
-
import { Grid, PagingGrid } from "
|
|
3
|
-
import { DBStore } from "./DBStore";
|
|
1
|
+
import { HTMLWidget } from "@hpcc-js/common";
|
|
2
|
+
import { Grid, PagingGrid } from "./dgrid-shim.ts";
|
|
3
|
+
import { DBStore } from "./DBStore.ts";
|
|
4
4
|
|
|
5
5
|
import "../src/Common.css";
|
|
6
6
|
|
|
@@ -19,32 +19,6 @@ export class Common extends HTMLWidget {
|
|
|
19
19
|
this._tag = "div";
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@publish("...empty...", "string", "No Data Message")
|
|
23
|
-
noDataMessage: publish<this, string>;
|
|
24
|
-
@publish("loading...", "string", "Loading Message")
|
|
25
|
-
loadingMessage: publish<this, string>;
|
|
26
|
-
@publish(false, "boolean", "Enable paging")
|
|
27
|
-
pagination: publish<this, boolean>;
|
|
28
|
-
@publish(25, "number", "Page size")
|
|
29
|
-
pageSize: publish<this, number>;
|
|
30
|
-
@publish(false, "boolean", "Enable sorting by column")
|
|
31
|
-
sortable: publish<this, boolean>;
|
|
32
|
-
@publish(null, "set", "Default 'sort by' Column ID", function () { return this.columns(); }, { optional: true })
|
|
33
|
-
sortBy: publish<this, string>;
|
|
34
|
-
@publish(false, "boolean", "Default 'sort by' descending", null, { disable: self => !self.sortBy() })
|
|
35
|
-
sortByDescending: publish<this, boolean>;
|
|
36
|
-
@publish(false, "boolean", "Multiple Selection")
|
|
37
|
-
multiSelect: publish<this, boolean>;
|
|
38
|
-
@publish(true, "boolean", "Render HTML")
|
|
39
|
-
renderHtml: publish<this, boolean>;
|
|
40
|
-
|
|
41
|
-
// Backward Compatibility
|
|
42
|
-
mulitSelect(): boolean;
|
|
43
|
-
mulitSelect(_?: boolean): this;
|
|
44
|
-
mulitSelect(_?: boolean): this | boolean {
|
|
45
|
-
return this.multiSelect.apply(this, arguments);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
22
|
protected formatSortBy(): [{ property: string, descending: boolean }] | undefined {
|
|
49
23
|
const idx = this.columns().indexOf(this.sortBy());
|
|
50
24
|
return idx >= 0 ? [{ property: idx.toString(), descending: this.sortByDescending() }] : undefined;
|
|
@@ -58,7 +32,7 @@ export class Common extends HTMLWidget {
|
|
|
58
32
|
const retVal = [];
|
|
59
33
|
for (const id in this._dgrid.selection) {
|
|
60
34
|
if (this._dgrid.selection[id]) {
|
|
61
|
-
|
|
35
|
+
const storeItem = this._store.get(+id);
|
|
62
36
|
retVal.push(this.rowToObj(storeItem));
|
|
63
37
|
}
|
|
64
38
|
}
|
|
@@ -158,3 +132,35 @@ export class Common extends HTMLWidget {
|
|
|
158
132
|
}
|
|
159
133
|
}
|
|
160
134
|
Common.prototype._class += " dgrid_Common";
|
|
135
|
+
|
|
136
|
+
export interface Common {
|
|
137
|
+
noDataMessage(): string;
|
|
138
|
+
noDataMessage(_: string): this;
|
|
139
|
+
loadingMessage(): string;
|
|
140
|
+
loadingMessage(_: string): this;
|
|
141
|
+
pagination(): boolean;
|
|
142
|
+
pagination(_: boolean): this;
|
|
143
|
+
pageSize(): number;
|
|
144
|
+
pageSize(_: number): this;
|
|
145
|
+
sortable(): boolean;
|
|
146
|
+
sortable(_: boolean): this;
|
|
147
|
+
sortBy(): string;
|
|
148
|
+
sortBy(_: string): this;
|
|
149
|
+
sortByDescending(): boolean;
|
|
150
|
+
sortByDescending(_: boolean): this;
|
|
151
|
+
multiSelect(): boolean;
|
|
152
|
+
multiSelect(_: boolean): this;
|
|
153
|
+
renderHtml(): boolean;
|
|
154
|
+
renderHtml(_: boolean): this;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
Common.prototype.publish("noDataMessage", "...empty...", "string", "No Data Message");
|
|
158
|
+
Common.prototype.publish("loadingMessage", "loading...", "string", "Loading Message");
|
|
159
|
+
Common.prototype.publish("pagination", false, "boolean", "Enable paging");
|
|
160
|
+
Common.prototype.publish("pageSize", 25, "number", "Page size");
|
|
161
|
+
Common.prototype.publish("sortable", false, "boolean", "Enable sorting by column");
|
|
162
|
+
Common.prototype.publish("sortBy", null, "set", "Default 'sort by' Column ID", function (this: Common) { return this.columns(); }, { optional: true });
|
|
163
|
+
Common.prototype.publish("sortByDescending", false, "boolean", "Default 'sort by' descending", undefined, { disable: self => !self.sortBy() });
|
|
164
|
+
Common.prototype.publish("multiSelect", false, "boolean", "Multiple Selection");
|
|
165
|
+
Common.prototype.publish("renderHtml", true, "boolean", "Render HTML");
|
|
166
|
+
|
package/src/DBStore.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Database } from "@hpcc-js/common";
|
|
2
|
-
import { Deferred } from "
|
|
3
|
-
import { CellFormatter, CellRenderer, ColumnType, RowFormatter } from "./RowFormatter";
|
|
2
|
+
import { Deferred } from "./dgrid-shim.ts";
|
|
3
|
+
import { CellFormatter, CellRenderer, ColumnType, RowFormatter } from "./RowFormatter.ts";
|
|
4
4
|
|
|
5
5
|
export class DBStore {
|
|
6
6
|
private _db: Database.Grid;
|
package/src/DatasourceStore.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DDL2 } from "@hpcc-js/ddl-shim";
|
|
2
|
-
import { Deferred, QueryResults } from "
|
|
3
|
-
import { ColumnType, RowFormatter } from "./RowFormatter";
|
|
1
|
+
import type { DDL2 } from "@hpcc-js/ddl-shim";
|
|
2
|
+
import { Deferred, QueryResults } from "./dgrid-shim.ts";
|
|
3
|
+
import { ColumnType, RowFormatter } from "./RowFormatter.ts";
|
|
4
4
|
|
|
5
5
|
export interface IDatasource {
|
|
6
6
|
id: () => string;
|
package/src/DatasourceTable.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Memory } from "
|
|
3
|
-
import { Common } from "./Common";
|
|
4
|
-
import { DatasourceStore, IDatasource } from "./DatasourceStore";
|
|
1
|
+
import { Widget } from "@hpcc-js/common";
|
|
2
|
+
import { Memory } from "./dgrid-shim.ts";
|
|
3
|
+
import { Common } from "./Common.ts";
|
|
4
|
+
import { DatasourceStore, IDatasource } from "./DatasourceStore.ts";
|
|
5
5
|
|
|
6
6
|
export class DatasourceTable extends Common {
|
|
7
|
-
_prevDatasource
|
|
7
|
+
_prevDatasource?: IDatasource;
|
|
8
8
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
@publish(null, "object", "Datasource")
|
|
14
|
-
datasource: { (): IDatasource; (_: IDatasource): DatasourceTable };
|
|
15
|
-
|
|
16
13
|
invalidate(): this {
|
|
17
14
|
delete this._prevDatasource;
|
|
18
15
|
return this;
|
|
@@ -55,3 +52,11 @@ export class DatasourceTable extends Common {
|
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
54
|
DatasourceTable.prototype._class += " dgrid_DatasourceTable";
|
|
55
|
+
|
|
56
|
+
export interface DatasourceTable {
|
|
57
|
+
datasource(): IDatasource;
|
|
58
|
+
datasource(_: IDatasource): this;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
DatasourceTable.prototype.publish("datasource", null, "object", "Datasource");
|
|
62
|
+
|
package/src/Table.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Palette, PropertyExt } from "@hpcc-js/common";
|
|
1
|
+
import { Palette, PropertyExt, Field } from "@hpcc-js/common";
|
|
2
2
|
import { hashSum } from "@hpcc-js/util";
|
|
3
3
|
import { format as d3Format } from "d3-format";
|
|
4
4
|
import { select as d3Select } from "d3-selection";
|
|
5
|
-
import { Common } from "./Common";
|
|
6
|
-
import { CellFormatter, CellRenderer, ColumnType, RowType } from "./RowFormatter";
|
|
5
|
+
import { Common } from "./Common.ts";
|
|
6
|
+
import { CellFormatter, CellRenderer, ColumnType, RowType } from "./RowFormatter.ts";
|
|
7
7
|
|
|
8
8
|
// ColumnPalette ---
|
|
9
9
|
export class ColumnFormat extends PropertyExt {
|
|
@@ -54,7 +54,7 @@ export class ColumnFormat extends PropertyExt {
|
|
|
54
54
|
}
|
|
55
55
|
const value = valueColIdx ? row.__origRow[valueColIdx] : cell;
|
|
56
56
|
const background = palette(value, min, max);
|
|
57
|
-
const cellText = defaultFormatter.call(this, cell, row);
|
|
57
|
+
const cellText: any = defaultFormatter.call(this, cell, row);
|
|
58
58
|
d3Select(cellElement)
|
|
59
59
|
.style("background", background)
|
|
60
60
|
.style("color", background && Palette.textColor(background))
|
|
@@ -102,8 +102,10 @@ export class Table extends Common {
|
|
|
102
102
|
super();
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
fields(
|
|
106
|
-
|
|
105
|
+
fields(): Field[];
|
|
106
|
+
fields(_: Field[]): this;
|
|
107
|
+
fields(_?: Field[]): Field[] | this {
|
|
108
|
+
const retVal = super.fields.apply(this, arguments as any);
|
|
107
109
|
if (arguments.length) {
|
|
108
110
|
const hash = hashSum({ _ });
|
|
109
111
|
if (this._prevFieldsHash !== hash) {
|
|
@@ -114,8 +116,10 @@ export class Table extends Common {
|
|
|
114
116
|
return retVal;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
|
-
columns(
|
|
118
|
-
|
|
119
|
+
columns(): string[];
|
|
120
|
+
columns(_: string[], asDefault?: boolean): this;
|
|
121
|
+
columns(_?: string[], asDefault?: boolean): string[] | this {
|
|
122
|
+
const retVal = super.columns.apply(this, arguments as any);
|
|
119
123
|
if (arguments.length) {
|
|
120
124
|
const hash = hashSum({ _ });
|
|
121
125
|
if (this._prevColsHash !== hash) {
|
|
@@ -126,8 +130,10 @@ export class Table extends Common {
|
|
|
126
130
|
return retVal;
|
|
127
131
|
}
|
|
128
132
|
|
|
133
|
+
data(): any;
|
|
134
|
+
data(_: any): this;
|
|
129
135
|
data(_?: any): any | this {
|
|
130
|
-
const retVal = super.data.apply(this, arguments);
|
|
136
|
+
const retVal = super.data.apply(this, arguments as any);
|
|
131
137
|
if (arguments.length) {
|
|
132
138
|
this._dataRefresh = true;
|
|
133
139
|
}
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/dgrid";
|
|
2
|
-
export const PKG_VERSION = "
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "3.1.0";
|
|
3
|
+
export const BUILD_VERSION = "3.2.0";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as dgrid_shim from "@hpcc-js/dgrid-shim";
|
|
2
|
+
|
|
3
|
+
if (!globalThis["@hpcc-js/dgrid-shim"]) {
|
|
4
|
+
console.error("dgrid-shim not loaded, please add `<script src=\"https://cdn.jsdelivr.net/npm/@hpcc-js/dgrid-shim@2.26.0/dist/index.min.js\"></script>` or similar to your HTML file");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const Deferred = globalThis["@hpcc-js/dgrid-shim"].Deferred as typeof dgrid_shim.Deferred;
|
|
8
|
+
export const Memory = globalThis["@hpcc-js/dgrid-shim"].Memory as typeof dgrid_shim.Memory;
|
|
9
|
+
export const QueryResults = globalThis["@hpcc-js/dgrid-shim"].QueryResults as typeof dgrid_shim.QueryResults;
|
|
10
|
+
export const Grid = globalThis["@hpcc-js/dgrid-shim"].Grid as typeof dgrid_shim.Grid;
|
|
11
|
+
export const PagingGrid = globalThis["@hpcc-js/dgrid-shim"].PagingGrid as typeof dgrid_shim.PagingGrid;
|
|
12
|
+
export const domConstruct = globalThis["@hpcc-js/dgrid-shim"].domConstruct as typeof dgrid_shim.domConstruct;
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export * from "./__package__";
|
|
2
|
-
export * from "./Common";
|
|
3
|
-
export * from "./DatasourceStore";
|
|
4
|
-
export * from "./DatasourceTable";
|
|
5
|
-
export * from "./DBStore";
|
|
6
|
-
export * from "./RowFormatter";
|
|
7
|
-
export * from "./Table";
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
export * from "./Common.ts";
|
|
3
|
+
export * from "./DatasourceStore.ts";
|
|
4
|
+
export * from "./DatasourceTable.ts";
|
|
5
|
+
export * from "./DBStore.ts";
|
|
6
|
+
export * from "./RowFormatter.ts";
|
|
7
|
+
export * from "./Table.ts";
|
|
8
8
|
|
|
9
9
|
// Must be last...
|
|
10
|
-
export { Deferred,
|
|
11
|
-
|
|
10
|
+
export { Deferred, Memory, QueryResults, Grid, PagingGrid, domConstruct } from "./dgrid-shim.ts";
|
package/types/Common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTMLWidget
|
|
2
|
-
import { DBStore } from "./DBStore";
|
|
1
|
+
import { HTMLWidget } from "@hpcc-js/common";
|
|
2
|
+
import { DBStore } from "./DBStore.ts";
|
|
3
3
|
import "../src/Common.css";
|
|
4
4
|
export declare class Common extends HTMLWidget {
|
|
5
5
|
protected _columns: any[];
|
|
@@ -11,17 +11,6 @@ export declare class Common extends HTMLWidget {
|
|
|
11
11
|
private _prevSortByDescending;
|
|
12
12
|
private _prevMultiSelect;
|
|
13
13
|
constructor();
|
|
14
|
-
noDataMessage: publish<this, string>;
|
|
15
|
-
loadingMessage: publish<this, string>;
|
|
16
|
-
pagination: publish<this, boolean>;
|
|
17
|
-
pageSize: publish<this, number>;
|
|
18
|
-
sortable: publish<this, boolean>;
|
|
19
|
-
sortBy: publish<this, string>;
|
|
20
|
-
sortByDescending: publish<this, boolean>;
|
|
21
|
-
multiSelect: publish<this, boolean>;
|
|
22
|
-
renderHtml: publish<this, boolean>;
|
|
23
|
-
mulitSelect(): boolean;
|
|
24
|
-
mulitSelect(_?: boolean): this;
|
|
25
14
|
protected formatSortBy(): [{
|
|
26
15
|
property: string;
|
|
27
16
|
descending: boolean;
|
|
@@ -34,4 +23,23 @@ export declare class Common extends HTMLWidget {
|
|
|
34
23
|
exit(domNode: any, element: any): void;
|
|
35
24
|
click(row: any, col: any, sel: any, more: any): void;
|
|
36
25
|
}
|
|
37
|
-
|
|
26
|
+
export interface Common {
|
|
27
|
+
noDataMessage(): string;
|
|
28
|
+
noDataMessage(_: string): this;
|
|
29
|
+
loadingMessage(): string;
|
|
30
|
+
loadingMessage(_: string): this;
|
|
31
|
+
pagination(): boolean;
|
|
32
|
+
pagination(_: boolean): this;
|
|
33
|
+
pageSize(): number;
|
|
34
|
+
pageSize(_: number): this;
|
|
35
|
+
sortable(): boolean;
|
|
36
|
+
sortable(_: boolean): this;
|
|
37
|
+
sortBy(): string;
|
|
38
|
+
sortBy(_: string): this;
|
|
39
|
+
sortByDescending(): boolean;
|
|
40
|
+
sortByDescending(_: boolean): this;
|
|
41
|
+
multiSelect(): boolean;
|
|
42
|
+
multiSelect(_: boolean): this;
|
|
43
|
+
renderHtml(): boolean;
|
|
44
|
+
renderHtml(_: boolean): this;
|
|
45
|
+
}
|
package/types/DBStore.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Database } from "@hpcc-js/common";
|
|
2
|
-
import { CellFormatter, CellRenderer, ColumnType } from "./RowFormatter";
|
|
2
|
+
import { CellFormatter, CellRenderer, ColumnType } from "./RowFormatter.ts";
|
|
3
3
|
export declare class DBStore {
|
|
4
4
|
private _db;
|
|
5
5
|
Model: null;
|
|
@@ -21,4 +21,3 @@ export declare class DBStore {
|
|
|
21
21
|
}): Promise<object[]>;
|
|
22
22
|
sort(opts: any): this;
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=DBStore.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DDL2 } from "@hpcc-js/ddl-shim";
|
|
2
|
-
import { ColumnType } from "./RowFormatter";
|
|
1
|
+
import type { DDL2 } from "@hpcc-js/ddl-shim";
|
|
2
|
+
import { ColumnType } from "./RowFormatter.ts";
|
|
3
3
|
export interface IDatasource {
|
|
4
4
|
id: () => string;
|
|
5
5
|
hash: () => string;
|
|
@@ -40,4 +40,3 @@ export declare class DatasourceStore {
|
|
|
40
40
|
}>;
|
|
41
41
|
fetchRange(options: any): Promise<any[]>;
|
|
42
42
|
}
|
|
43
|
-
//# sourceMappingURL=DatasourceStore.d.ts.map
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Widget } from "@hpcc-js/common";
|
|
2
|
-
import { Common } from "./Common";
|
|
3
|
-
import { IDatasource } from "./DatasourceStore";
|
|
2
|
+
import { Common } from "./Common.ts";
|
|
3
|
+
import { IDatasource } from "./DatasourceStore.ts";
|
|
4
4
|
export declare class DatasourceTable extends Common {
|
|
5
|
-
_prevDatasource
|
|
5
|
+
_prevDatasource?: IDatasource;
|
|
6
6
|
constructor();
|
|
7
|
-
datasource: {
|
|
8
|
-
(): IDatasource;
|
|
9
|
-
(_: IDatasource): DatasourceTable;
|
|
10
|
-
};
|
|
11
7
|
invalidate(): this;
|
|
12
8
|
enter(domNode: any, element: any): void;
|
|
13
9
|
update(domNode: any, element: any): void;
|
|
14
10
|
render(callback?: (w: Widget) => void): this;
|
|
15
11
|
click(row: any, col: any, sel: any): void;
|
|
16
12
|
}
|
|
17
|
-
|
|
13
|
+
export interface DatasourceTable {
|
|
14
|
+
datasource(): IDatasource;
|
|
15
|
+
datasource(_: IDatasource): this;
|
|
16
|
+
}
|
package/types/RowFormatter.d.ts
CHANGED
package/types/Table.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropertyExt } from "@hpcc-js/common";
|
|
2
|
-
import { Common } from "./Common";
|
|
3
|
-
import { CellFormatter, CellRenderer } from "./RowFormatter";
|
|
1
|
+
import { PropertyExt, Field } from "@hpcc-js/common";
|
|
2
|
+
import { Common } from "./Common.ts";
|
|
3
|
+
import { CellFormatter, CellRenderer } from "./RowFormatter.ts";
|
|
4
4
|
export declare class ColumnFormat extends PropertyExt {
|
|
5
5
|
_owner: Table;
|
|
6
6
|
constructor();
|
|
@@ -32,9 +32,12 @@ export declare class Table extends Common {
|
|
|
32
32
|
_colsRefresh: boolean;
|
|
33
33
|
_dataRefresh: boolean;
|
|
34
34
|
constructor();
|
|
35
|
-
fields(
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
fields(): Field[];
|
|
36
|
+
fields(_: Field[]): this;
|
|
37
|
+
columns(): string[];
|
|
38
|
+
columns(_: string[], asDefault?: boolean): this;
|
|
39
|
+
data(): any;
|
|
40
|
+
data(_: any): this;
|
|
38
41
|
enter(domNode: any, element: any): void;
|
|
39
42
|
guessWidth(columns: any, data: any): void;
|
|
40
43
|
_prevHash: any;
|
|
@@ -50,4 +53,3 @@ export interface Table {
|
|
|
50
53
|
columnFormats(): ColumnFormat[];
|
|
51
54
|
columnFormats(_: ColumnFormat[]): this;
|
|
52
55
|
}
|
|
53
|
-
//# sourceMappingURL=Table.d.ts.map
|
package/types/__package__.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/dgrid";
|
|
2
|
-
export declare const PKG_VERSION = "
|
|
3
|
-
export declare const BUILD_VERSION = "2.
|
|
4
|
-
//# sourceMappingURL=__package__.d.ts.map
|
|
2
|
+
export declare const PKG_VERSION = "3.1.0";
|
|
3
|
+
export declare const BUILD_VERSION = "3.2.0";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as dgrid_shim from "@hpcc-js/dgrid-shim";
|
|
2
|
+
export declare const Deferred: typeof dgrid_shim.Deferred;
|
|
3
|
+
export declare const Memory: typeof dgrid_shim.Memory;
|
|
4
|
+
export declare const QueryResults: typeof dgrid_shim.QueryResults;
|
|
5
|
+
export declare const Grid: typeof dgrid_shim.Grid;
|
|
6
|
+
export declare const PagingGrid: typeof dgrid_shim.PagingGrid;
|
|
7
|
+
export declare const domConstruct: typeof dgrid_shim.domConstruct;
|
package/types/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export * from "./__package__";
|
|
2
|
-
export * from "./Common";
|
|
3
|
-
export * from "./DatasourceStore";
|
|
4
|
-
export * from "./DatasourceTable";
|
|
5
|
-
export * from "./DBStore";
|
|
6
|
-
export * from "./RowFormatter";
|
|
7
|
-
export * from "./Table";
|
|
8
|
-
export { Deferred,
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
export * from "./Common.ts";
|
|
3
|
+
export * from "./DatasourceStore.ts";
|
|
4
|
+
export * from "./DatasourceTable.ts";
|
|
5
|
+
export * from "./DBStore.ts";
|
|
6
|
+
export * from "./RowFormatter.ts";
|
|
7
|
+
export * from "./Table.ts";
|
|
8
|
+
export { Deferred, Memory, QueryResults, Grid, PagingGrid, domConstruct } from "./dgrid-shim.ts";
|