@hpcc-js/tree 2.44.0 → 2.45.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.
Files changed (41) hide show
  1. package/dist/index.es6.js +2836 -0
  2. package/dist/index.es6.js.map +1 -0
  3. package/dist/index.js +2852 -2020
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +2 -0
  6. package/dist/index.min.js.map +1 -0
  7. package/package.json +34 -32
  8. package/src/CirclePacking.ts +8 -12
  9. package/src/Dendrogram.ts +20 -32
  10. package/src/DirectoryTree.ts +29 -25
  11. package/src/Indented.ts +13 -20
  12. package/src/SunburstPartition.ts +8 -14
  13. package/src/Treemap.ts +33 -59
  14. package/src/__package__.ts +2 -2
  15. package/src/index.ts +7 -7
  16. package/types/CirclePacking.d.ts +6 -7
  17. package/types/CirclePacking.d.ts.map +1 -0
  18. package/types/Dendrogram.d.ts +35 -20
  19. package/types/Dendrogram.d.ts.map +1 -0
  20. package/types/DirectoryTree.d.ts +16 -11
  21. package/types/DirectoryTree.d.ts.map +1 -0
  22. package/types/Indented.d.ts +16 -11
  23. package/types/Indented.d.ts.map +1 -0
  24. package/types/SunburstPartition.d.ts +5 -8
  25. package/types/SunburstPartition.d.ts.map +1 -0
  26. package/types/Treemap.d.ts +96 -51
  27. package/types/Treemap.d.ts.map +1 -0
  28. package/types/__package__.d.ts +3 -2
  29. package/types/__package__.d.ts.map +1 -0
  30. package/types/index.d.ts +8 -7
  31. package/types/index.d.ts.map +1 -0
  32. package/types-3.4/CirclePacking.d.ts +32 -0
  33. package/types-3.4/Dendrogram.d.ts +60 -0
  34. package/types-3.4/DirectoryTree.d.ts +62 -0
  35. package/types-3.4/Indented.d.ts +46 -0
  36. package/types-3.4/SunburstPartition.d.ts +23 -0
  37. package/types-3.4/Treemap.d.ts +125 -0
  38. package/types-3.4/__package__.d.ts +4 -0
  39. package/types-3.4/index.d.ts +8 -0
  40. package/dist/index.umd.cjs +0 -2
  41. package/dist/index.umd.cjs.map +0 -1
package/package.json CHANGED
@@ -1,54 +1,56 @@
1
1
  {
2
2
  "name": "@hpcc-js/tree",
3
- "version": "2.44.0",
3
+ "version": "2.45.0",
4
4
  "description": "hpcc-js - Viz Tree",
5
- "type": "module",
6
- "main": "./dist/index.umd.cjs",
7
- "module": "./dist/index.js",
8
- "exports": {
9
- ".": {
10
- "types": "./types/index.d.ts",
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.umd.cjs"
13
- },
14
- "./dist/*": "./dist/*"
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.es6",
7
+ "unpkg": "dist/index.min.js",
8
+ "jsdelivr": "dist/index.min.js",
9
+ "types": "types/index.d.ts",
10
+ "typesVersions": {
11
+ "<3.8": {
12
+ "*": [
13
+ "types-3.4/index.d.ts"
14
+ ]
15
+ }
15
16
  },
16
- "browser": "./dist/index.umd.cjs",
17
- "types": "./types/index.d.ts",
18
17
  "files": [
19
18
  "dist/*",
20
- "src/*",
21
- "types/*"
19
+ "types/*",
20
+ "types-3.4/*",
21
+ "src/*"
22
22
  ],
23
23
  "scripts": {
24
- "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
25
- "bundle": "vite build",
26
- "bundle-watch": "vite --port 5519",
27
- "gen-types": "tsc --project tsconfig.json",
28
- "gen-types-watch": "npm run gen-types -- --watch",
29
- "build": "run-p gen-types bundle",
24
+ "clean": "rimraf --glob lib* types dist *.tsbuildinfo",
25
+ "compile-es6": "tsc --module es6 --outDir ./lib-es6",
26
+ "compile-es6-watch": "npm run compile-es6 -- -w",
27
+ "compile-umd": "tsc --module umd --outDir ./lib-umd",
28
+ "compile-umd-watch": "npm run compile-umd -- -w",
29
+ "bundle": "rollup -c",
30
+ "bundle-watch": "npm run bundle -- -w",
31
+ "minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
32
+ "gen-legacy-types": "downlevel-dts ./types ./types-3.4",
33
+ "build": "npm run compile-es6 && npm run bundle",
34
+ "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
35
+ "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
30
36
  "lint": "eslint ./src",
31
- "lint-fix": "eslint --fix src/**/*.ts",
32
37
  "docs": "typedoc --options tdoptions.json .",
33
- "test-browser": "vitest run --project browser",
34
- "test": "vitest run",
35
- "coverage": "vitest run --coverage",
36
- "update": "npx --yes npm-check-updates -u -t minor",
37
- "update-major": "npx --yes npm-check-updates -u"
38
+ "update": "npx --yes npm-check-updates -u -t minor"
38
39
  },
39
40
  "dependencies": {
40
- "@hpcc-js/api": "^3.3.12",
41
- "@hpcc-js/common": "^3.4.2"
41
+ "@hpcc-js/api": "^2.14.2",
42
+ "@hpcc-js/common": "^2.73.2"
42
43
  },
43
44
  "devDependencies": {
44
- "@hpcc-js/esbuild-plugins": "^1.5.2",
45
+ "@hpcc-js/bundle": "^2.12.0",
45
46
  "@types/d3-transition": "1.3.6",
46
47
  "d3-hierarchy": "^1",
47
48
  "d3-interpolate": "^1",
48
49
  "d3-scale": "^1",
49
50
  "d3-selection": "^1",
50
51
  "d3-shape": "^1",
51
- "d3-transition": "^1"
52
+ "d3-transition": "^1",
53
+ "tslib": "2.8.1"
52
54
  },
53
55
  "repository": {
54
56
  "type": "git",
@@ -61,5 +63,5 @@
61
63
  "url": "https://github.com/hpcc-systems/Visualization/issues"
62
64
  },
63
65
  "homepage": "https://github.com/hpcc-systems/Visualization",
64
- "gitHead": "a35882216a554b24a2586f30ce829d511941aecd"
66
+ "gitHead": "84f852a555c8d7b7381e4fcb93bfad829b1db62e"
65
67
  }
@@ -120,18 +120,18 @@ export class CirclePacking extends SVGWidget {
120
120
  this._node.attr("transform", function (d) { return "translate(" + (d.x - v[0]) * k + "," + (d.y - v[1]) * k + ")"; });
121
121
  this.circle.attr("r", function (d) { return d.r * k; });
122
122
  }
123
+
124
+ paletteID: (_?: string) => string | CirclePacking;
125
+ useClonedPalette: (_?: boolean) => boolean | CirclePacking;
126
+
127
+ // I2DChart
128
+ _palette;
129
+ click: (row, column, selected) => void;
130
+ dblclick: (row, column, selected) => void;
123
131
  }
124
132
  CirclePacking.prototype._class += " tree_CirclePacking";
125
133
  CirclePacking.prototype.implements(ITree.prototype);
126
-
127
134
  export interface CirclePacking {
128
- _palette;
129
-
130
- // I2DChart ---
131
- click(row, column, selected): void;
132
- dblclick(row, column, selected): void;
133
-
134
- // Properties ---
135
135
  showSize(): boolean;
136
136
  showSize(_: boolean): this;
137
137
  paletteDepthLevel(): number;
@@ -139,10 +139,6 @@ export interface CirclePacking {
139
139
  paletteDepthLevel_exists(): boolean;
140
140
  paletteDepthVariant(): "brighter" | "darker";
141
141
  paletteDepthVariant(_: "brighter" | "darker"): this;
142
- paletteID(): string;
143
- paletteID(_: string): this;
144
- useClonedPalette(): boolean;
145
- useClonedPalette(_: boolean): this;
146
142
  }
147
143
 
148
144
  CirclePacking.prototype.publish("showSize", true, "boolean", "Show size along with label");
package/src/Dendrogram.ts CHANGED
@@ -175,7 +175,7 @@ export class Dendrogram extends SVGZoomWidget {
175
175
  tmp = tmp.children[0];
176
176
  }
177
177
  if (d.depth > 0) {
178
- if (tmp.origRows) {
178
+ if(tmp.origRows) {
179
179
  context.click(context.rowToObj(tmp.origRows[0]), context.mappings()[d.depth - 1].column(), true);
180
180
  } else {
181
181
  context.click(tmp.data, context.mappings()[d.depth - 1].column(), true);
@@ -188,7 +188,7 @@ export class Dendrogram extends SVGZoomWidget {
188
188
  tmp = tmp.children[0];
189
189
  }
190
190
  if (d.depth > 0) {
191
- if (tmp.origRows) {
191
+ if(tmp.origRows) {
192
192
  context.dblclick(context.rowToObj(tmp.origRows[0]), context.mappings()[d.depth - 1].column(), true);
193
193
  } else {
194
194
  context.dblclick(tmp.data, context.mappings()[d.depth - 1].column(), true);
@@ -249,41 +249,29 @@ export class Dendrogram extends SVGZoomWidget {
249
249
  context.zoomToFit();
250
250
  }
251
251
  }
252
- }
253
- Dendrogram.prototype._class += " tree_Dendrogram";
254
- Dendrogram.prototype.implements(ITree.prototype);
255
- Dendrogram.prototype.mixin(Utility.SimpleSelectionMixin);
256
- Dendrogram.prototype.Column = DendrogramColumn;
257
252
 
258
- export interface Dendrogram {
259
- _palette;
253
+ paletteID: { (): string; (_: string): Dendrogram; };
254
+ useClonedPalette: { (): boolean; (_: boolean): Dendrogram; };
255
+ mappings: { (): DendrogramColumn[]; (_: DendrogramColumn[]): Dendrogram; };
260
256
 
261
- // ITree ---
262
- click(row, column, selected): void;
263
- dblclick(row, column, selected): void;
257
+ circleRadius: { (): number; (_: number): Dendrogram; };
258
+ separation: { (): number; (_: number): Dendrogram; };
259
+ dendrogram: { (): boolean; (_: boolean): Dendrogram; };
260
+ radial: { (): boolean; (_: boolean): Dendrogram; };
261
+ orientation: { (): string; (_: string): Dendrogram; };
264
262
 
265
- // SimpleSelectionMixin ---
266
- _selection;
263
+ // ITree
264
+ _palette;
265
+ click: (row, column, selected) => void;
266
+ dblclick: (row, column, selected) => void;
267
267
 
268
- // Properties ---
269
- paletteID(): string;
270
- paletteID(_: string): this;
271
- useClonedPalette(): boolean;
272
- useClonedPalette(_: boolean): this;
273
- mappings(): DendrogramColumn[];
274
- mappings(_: DendrogramColumn[]): this;
275
-
276
- circleRadius(): number;
277
- circleRadius(_: number): this;
278
- separation(): number;
279
- separation(_: number): this;
280
- dendrogram(): boolean;
281
- dendrogram(_: boolean): this;
282
- radial(): boolean;
283
- radial(_: boolean): this;
284
- orientation(): "horizontal" | "vertical";
285
- orientation(_: "horizontal" | "vertical"): this;
268
+ // SimpleSelectionMixin
269
+ _selection;
286
270
  }
271
+ Dendrogram.prototype._class += " tree_Dendrogram";
272
+ Dendrogram.prototype.implements(ITree.prototype);
273
+ Dendrogram.prototype.mixin(Utility.SimpleSelectionMixin);
274
+ Dendrogram.prototype.Column = DendrogramColumn;
287
275
 
288
276
  Dendrogram.prototype.publish("paletteID", "default", "set", "Color palette for this widget", Dendrogram.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
289
277
  Dendrogram.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
@@ -1,5 +1,5 @@
1
- import { HTMLWidget, Palette, Platform, select as d3Select, Utility, } from "@hpcc-js/common";
2
- import { max as d3Max } from "d3-array";
1
+ import { HTMLWidget, Palette, Platform, select as d3Select, Utility, } from "@hpcc-js/common";
2
+ import { max as d3Max} from "d3-array";
3
3
  import { hierarchy as d3Hierarchy } from "d3-hierarchy";
4
4
 
5
5
  interface DirectoryItem {
@@ -18,6 +18,8 @@ interface DirectoryItem {
18
18
 
19
19
  export class DirectoryTree extends HTMLWidget {
20
20
 
21
+ _palette;
22
+
21
23
  constructor() {
22
24
  super();
23
25
  }
@@ -90,7 +92,7 @@ export class DirectoryTree extends HTMLWidget {
90
92
  return widest;
91
93
  }
92
94
 
93
- rowClick(str, markers) { }
95
+ rowClick(str, markers) {}
94
96
 
95
97
  enter(domNode, element) {
96
98
  super.enter(domNode, element);
@@ -109,10 +111,10 @@ export class DirectoryTree extends HTMLWidget {
109
111
  .style("overflow-y", this.verticalScroll() ? "scroll" : null)
110
112
  ;
111
113
  const flatData = this.flattenData(this.data());
112
- const maxWeightValue = d3Max(flatData, n => Number(n.weightValue));
114
+ const maxWeightValue = d3Max(flatData, n=>Number(n.weightValue));
113
115
 
114
- flatData.forEach(d => {
115
- if (!d.weightValue) {
116
+ flatData.forEach(d=>{
117
+ if(!d.weightValue){
116
118
  d.weightColor = "transparent";
117
119
  } else {
118
120
  d.weightColor = this._palette(d.weightValue, 1, maxWeightValue);
@@ -125,7 +127,7 @@ export class DirectoryTree extends HTMLWidget {
125
127
  const rowSelection = element.selectAll(".directory-row").data(flatData);
126
128
  const fontFamily = this.fontFamily();
127
129
  const fontSize = this.fontSize();
128
- const maxWeightWidth = d3Max(flatData, d => this.textSize(d.weightValue, fontFamily, fontSize).width);
130
+ const maxWeightWidth = d3Max(flatData, d=>this.textSize(d.weightValue, fontFamily, fontSize).width);
129
131
  const rowItemPadding = `${padding}px ${padding}px ${padding / 2}px ${padding}px`;
130
132
 
131
133
  const rowEnter = rowSelection.enter().append("div")
@@ -186,7 +188,7 @@ export class DirectoryTree extends HTMLWidget {
186
188
  .style("text-overflow", "ellipsis")
187
189
  .style("line-height", lineHeight + "px")
188
190
  ;
189
-
191
+
190
192
  rowDiv
191
193
  .on("mouseenter", () => {
192
194
  labelDiv.style("font-weight", "bold");
@@ -203,7 +205,7 @@ export class DirectoryTree extends HTMLWidget {
203
205
  context.weight_mouseleave(d);
204
206
  })
205
207
  ;
206
-
208
+
207
209
  if (d.isFolder) {
208
210
  rowDiv.on("click", function (d: any) {
209
211
  let next = this.nextSibling;
@@ -247,48 +249,50 @@ export class DirectoryTree extends HTMLWidget {
247
249
 
248
250
  rowSelection.exit().remove();
249
251
  }
250
- weight_mouseenter(d) {
251
-
252
+ weight_mouseenter(d){
253
+
252
254
  }
253
- weight_mouseleave(d) {
255
+ weight_mouseleave(d){
254
256
 
255
257
  }
256
258
  }
257
259
  DirectoryTree.prototype._class += " tree_DirectoryTree";
258
- DirectoryTree.prototype._palette = Palette.rainbow("Blues");
259
260
 
260
261
  export interface DirectoryTree {
261
- _palette;
262
-
263
- depthSize(): number;
264
- depthSize(_: number): this;
265
- paletteID(): string;
266
- paletteID(_: string): this;
267
- omitRoot(): boolean;
268
- omitRoot(_: boolean): this;
269
- rowItemPadding(): number;
270
- rowItemPadding(_: number): this;
271
- selectionBackgroundColor(): string;
272
- selectionBackgroundColor(_: string): this;
273
262
  backgroundColor(): string;
274
263
  backgroundColor(_: string): this;
275
264
  fontColor(): string;
276
265
  fontColor(_: string): this;
277
266
  fontFamily(): string;
278
267
  fontFamily(_: string): this;
268
+ omitRoot(): boolean;
269
+ omitRoot(_: boolean): this;
279
270
  fontSize(): number;
280
271
  fontSize(_: number): this;
281
272
  iconSize(): number;
282
273
  iconSize(_: number): this;
274
+ fileIconSize(): number;
275
+ fileIconSize(_: number): this;
283
276
  folderIconOpen(): string;
284
277
  folderIconOpen(_: string): this;
285
278
  folderIconClosed(): string;
286
279
  folderIconClosed(_: string): this;
280
+ hoverBackgroundColor(): string;
281
+ hoverBackgroundColor(_: string): this;
282
+ selectionBackgroundColor(): string;
283
+ selectionBackgroundColor(_: string): this;
284
+ rowItemPadding(): number;
285
+ rowItemPadding(_: number): this;
287
286
  textFileIcon(): string;
288
287
  textFileIcon(_: string): this;
289
288
  verticalScroll(): boolean;
290
289
  verticalScroll(_: boolean): this;
290
+ paletteID(): string;
291
+ paletteID(_: string): this;
292
+ depthSize(): number;
293
+ depthSize(_: number): this;
291
294
  }
295
+ DirectoryTree.prototype._palette = Palette.rainbow("Blues");
292
296
 
293
297
  DirectoryTree.prototype.publish("depthSize", 14, "number", "Width of indentation per file or folder depth (pixels)");
294
298
  DirectoryTree.prototype.publish("paletteID", "Blues", "set", "Color palette for the weight backgrounds", DirectoryTree.prototype._palette.switch(), { tags: ["Basic"] });
package/src/Indented.ts CHANGED
@@ -229,31 +229,24 @@ export class Indented extends SVGZoomWidget {
229
229
  return context._collapsed[getID(d)] ? "#3182bd" : d.children ? "#c6dbef" : "#fd8d3c";
230
230
  }
231
231
  }
232
- }
233
- Indented.prototype._class += " tree_Indented";
234
- Indented.prototype.implements(ITree.prototype);
235
- Indented.prototype.mixin(Utility.SimpleSelectionMixin);
236
- Indented.prototype.Column = IndentedColumn;
237
232
 
238
- export interface Indented {
239
- _palette;
233
+ xmlColumn: { (_: string): Indented; (): string; };
234
+ xmlColumn_exists: () => boolean;
235
+ mappings: { (_: IndentedColumn[]): Indented; (): IndentedColumn[]; };
236
+ barHeight: { (_: number): Indented; (): number; };
240
237
 
241
- // ITree ---
242
- click(row, column, selected): void;
243
- dblclick(row, column, selected): void;
238
+ // ITree
239
+ _palette;
240
+ click: (row, column, selected) => void;
241
+ dblclick: (row, column, selected) => void;
244
242
 
245
- // SimpleSelectionMixin ---
243
+ // SimpleSelectionMixin
246
244
  _selection;
247
-
248
- // Properties ---
249
- xmlColumn(): string;
250
- xmlColumn(_: string): this;
251
- xmlColumn_exists(): boolean;
252
- mappings(): IndentedColumn[];
253
- mappings(_: IndentedColumn[]): this;
254
- barHeight(): number;
255
- barHeight(_: number): this;
256
245
  }
246
+ Indented.prototype._class += " tree_Indented";
247
+ Indented.prototype.implements(ITree.prototype);
248
+ Indented.prototype.mixin(Utility.SimpleSelectionMixin);
249
+ Indented.prototype.Column = IndentedColumn;
257
250
 
258
251
  Indented.prototype.publish("xmlColumn", null, "set", "Field", function () { return this.columns(); }, { optional: true });
259
252
  Indented.prototype.publish("mappings", [], "propertyArray", "Source Columns", null, { autoExpand: IndentedColumn, disable: (w) => w.xmlColumn_exists() });
@@ -135,23 +135,17 @@ export class SunburstPartition extends SVGWidget {
135
135
  .selectAll("path")
136
136
  .attrTween("d", function (d2) { return function () { return context.arc(d2); }; });
137
137
  }
138
- }
139
- SunburstPartition.prototype._class += " tree_SunburstPartition";
140
- SunburstPartition.prototype.implements(ITree.prototype);
141
-
142
- export interface SunburstPartition {
143
- _palette;
144
138
 
145
- // ITree ---
146
- click(row, column, selected): void;
147
- dblclick(row, column, selected): void;
139
+ paletteID: (_?: string) => string | SunburstPartition;
140
+ useClonedPalette: (_?: boolean) => boolean | SunburstPartition;
148
141
 
149
- // Properties ---
150
- paletteID(): string;
151
- paletteID(_: string): this;
152
- useClonedPalette(): boolean;
153
- useClonedPalette(_: boolean): this;
142
+ // ITree
143
+ _palette;
144
+ click: (row, column, selected) => void;
145
+ dblclick: (row, column, selected) => void;
154
146
  }
147
+ SunburstPartition.prototype._class += " tree_SunburstPartition";
148
+ SunburstPartition.prototype.implements(ITree.prototype);
155
149
 
156
150
  SunburstPartition.prototype.publish("paletteID", "default", "set", "Color palette for this widget", SunburstPartition.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
157
151
  SunburstPartition.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
package/src/Treemap.ts CHANGED
@@ -148,7 +148,7 @@ export class Treemap extends HTMLWidget {
148
148
  columnLabel = mapping.column();
149
149
  }
150
150
  });
151
- if (d.origRows) {
151
+ if(d.origRows) {
152
152
  context.click(context.rowToObj(d.origRows[0]), columnLabel, context._selection.selected(this));
153
153
  } else {
154
154
  context.click(d.data, columnLabel, context._selection.selected(this));
@@ -163,7 +163,7 @@ export class Treemap extends HTMLWidget {
163
163
  columnLabel = mapping.column();
164
164
  }
165
165
  });
166
- if (d.origRows) {
166
+ if(d.origRows) {
167
167
  context.dblclick(context.rowToObj(d.origRows[0]), columnLabel, context._selection.selected(this));
168
168
  } else {
169
169
  context.dblclick(d.data, columnLabel, context._selection.selected(this));
@@ -258,69 +258,43 @@ export class Treemap extends HTMLWidget {
258
258
  leafWeightHTML(d) {
259
259
  return this.showLeafWeight() ? `<span class="treemap-leaf-label">${d.data.label}</span><span class="treemap-leaf-value">${d.value}${this.weightSuffix()}</span>` : `<span class="treemap-leaf-label">${d.data.label}</span>`;
260
260
  }
261
+
262
+ paletteID: { (): string[]; (_: string[]): Treemap; };
263
+ useClonedPalette: { (): boolean[]; (_: boolean[]): Treemap; };
264
+ mappings: { (): TreemapColumn[]; (_: TreemapColumn[]): Treemap; };
265
+ aggrType: { (): string; (_: string): Treemap; };
266
+ aggrColumn: { (): string; (_: string): Treemap; };
267
+ fontSize: { (): number; (_: number): Treemap; };
268
+ fontSize_exists: () => boolean;
269
+ paddingInner: { (): number; (_: number): Treemap; };
270
+ paddingOuter: { (): number; (_: number): Treemap; };
271
+ paddingTop: { (): number; (_: number): Treemap; };
272
+ parentFontSize: { (): number; (_: number): Treemap; };
273
+ leafFontSize: { (): number; (_: number): Treemap; };
274
+ brighterLeafNodes: { (): boolean; (_: boolean): Treemap; };
275
+ showRoot: { (): boolean; (_: boolean): Treemap; };
276
+ enableParentLabels: { (): boolean; (_: boolean): Treemap; };
277
+ enableParentTooltips: { (): boolean; (_: boolean): Treemap; };
278
+ showParentWeight: { (): boolean; (_: boolean): Treemap; };
279
+ showLeafWeight: { (): boolean; (_: boolean): Treemap; };
280
+ usePaletteOnParentNodes: { (): boolean; (_: boolean): Treemap; };
281
+ depthColorLimit: { (): number; (_: number): Treemap; };
282
+ squarifyRatio: { (): number; (_: number): Treemap; };
283
+ weightSuffix: { (): string; (_: string): Treemap; };
284
+ tilingMethod: { (): string; (_: string): Treemap; };
285
+
286
+ transitionDuration: { (): number[]; (_: number[]): Treemap; };
287
+
288
+ // ITree
289
+ _palette;
290
+ click: (row, column, selected) => void;
291
+ dblclick: (row, column, selected) => void;
261
292
  }
262
293
  Treemap.prototype._class += " tree_Treemap";
263
294
  Treemap.prototype.implements(ITree.prototype);
264
295
  Treemap.prototype.mixin(Utility.SimpleSelectionMixin);
265
296
  Treemap.prototype.Column = TreemapColumn;
266
297
 
267
- export interface Treemap {
268
- _palette;
269
-
270
- // ITree ---
271
- click(row, column, selected): void;
272
- dblclick(row, column, selected): void;
273
-
274
- // Properties ---
275
- paletteID(): string;
276
- paletteID(_: string): this;
277
- useClonedPalette(): boolean;
278
- useClonedPalette(_: boolean): this;
279
- mappings(): TreemapColumn[];
280
- mappings(_: TreemapColumn[]): this;
281
- aggrType(): string;
282
- aggrType(_: string): this;
283
- aggrColumn(): string;
284
- aggrColumn(_: string): this;
285
- fontSize(): number;
286
- fontSize(_: number): this;
287
- fontSize_exists(): boolean;
288
- paddingInner(): number;
289
- paddingInner(_: number): this;
290
- paddingOuter(): number;
291
- paddingOuter(_: number): this;
292
- paddingTop(): number;
293
- paddingTop(_: number): this;
294
- showRoot(): boolean;
295
- showRoot(_: boolean): this;
296
- parentFontSize(): number;
297
- parentFontSize(_: number): this;
298
- leafFontSize(): number;
299
- leafFontSize(_: number): this;
300
- usePaletteOnParentNodes(): boolean;
301
- usePaletteOnParentNodes(_: boolean): this;
302
- depthColorLimit(): number;
303
- depthColorLimit(_: number): this;
304
- squarifyRatio(): number;
305
- squarifyRatio(_: number): this;
306
- showParentWeight(): boolean;
307
- showParentWeight(_: boolean): this;
308
- showLeafWeight(): boolean;
309
- showLeafWeight(_: boolean): this;
310
- weightSuffix(): string;
311
- weightSuffix(_: string): this;
312
- brighterLeafNodes(): boolean;
313
- brighterLeafNodes(_: boolean): this;
314
- enableParentLabels(): boolean;
315
- enableParentLabels(_: boolean): this;
316
- enableParentTooltips(): boolean;
317
- enableParentTooltips(_: boolean): this;
318
- transitionDuration(): number[];
319
- transitionDuration(_: number[]): this;
320
- tilingMethod(): string;
321
- tilingMethod(_: string): this;
322
- }
323
-
324
298
  Treemap.prototype.publish("paletteID", "default", "set", "Color palette for this widget", Treemap.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
325
299
  Treemap.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });
326
300
  Treemap.prototype.publish("mappings", [], "propertyArray", "Source Columns", null, { autoExpand: TreemapColumn });
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/tree";
2
- export const PKG_VERSION = "3.0.0";
3
- export const BUILD_VERSION = "3.2.1";
2
+ export const PKG_VERSION = "2.45.0";
3
+ export const BUILD_VERSION = "2.108.6";
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./__package__.ts";
2
- export * from "./CirclePacking.ts";
3
- export * from "./Dendrogram.ts";
4
- export * from "./DirectoryTree.ts";
5
- export * from "./Indented.ts";
6
- export * from "./SunburstPartition.ts";
7
- export * from "./Treemap.ts";
1
+ export * from "./__package__";
2
+ export * from "./CirclePacking";
3
+ export * from "./Dendrogram";
4
+ export * from "./DirectoryTree";
5
+ export * from "./Indented";
6
+ export * from "./SunburstPartition";
7
+ export * from "./Treemap";
@@ -14,11 +14,13 @@ export declare class CirclePacking extends SVGWidget {
14
14
  update(_domNode: any, _element: any): void;
15
15
  zoom(newFocus: any): void;
16
16
  zoomTo(v: any): void;
17
+ paletteID: (_?: string) => string | CirclePacking;
18
+ useClonedPalette: (_?: boolean) => boolean | CirclePacking;
19
+ _palette: any;
20
+ click: (row: any, column: any, selected: any) => void;
21
+ dblclick: (row: any, column: any, selected: any) => void;
17
22
  }
18
23
  export interface CirclePacking {
19
- _palette: any;
20
- click(row: any, column: any, selected: any): void;
21
- dblclick(row: any, column: any, selected: any): void;
22
24
  showSize(): boolean;
23
25
  showSize(_: boolean): this;
24
26
  paletteDepthLevel(): number;
@@ -26,8 +28,5 @@ export interface CirclePacking {
26
28
  paletteDepthLevel_exists(): boolean;
27
29
  paletteDepthVariant(): "brighter" | "darker";
28
30
  paletteDepthVariant(_: "brighter" | "darker"): this;
29
- paletteID(): string;
30
- paletteID(_: string): this;
31
- useClonedPalette(): boolean;
32
- useClonedPalette(_: boolean): this;
33
31
  }
32
+ //# sourceMappingURL=CirclePacking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CirclePacking.d.ts","sourceRoot":"","sources":["../src/CirclePacking.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIrD,OAAO,eAAe,CAAC;AAEvB,OAAO,0BAA0B,CAAC;AAElC,qBAAa,aAAc,SAAQ,SAAS;IACxC,QAAQ,MAAC;IACT,IAAI,MAAC;IACL,GAAG,MAAC;IACJ,MAAM,MAAC;IACP,MAAM,MAAC;IACP,IAAI,MAAC;IACL,SAAS,CAAC,KAAK,MAAC;;IAOhB,KAAK,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA;IAavB,MAAM,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA;IA2DzB,IAAI,CAAC,QAAQ,KAAA;IAqBb,MAAM,CAAC,CAAC,KAAA;IAOR,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,aAAa,CAAC;IAClD,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GAAG,aAAa,CAAC;IAG3D,QAAQ,MAAC;IACT,KAAK,EAAE,CAAC,GAAG,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,GAAG,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,KAAK,IAAI,CAAC;CAC7C;AAGD,MAAM,WAAW,aAAa;IAC1B,QAAQ,IAAI,OAAO,CAAC;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,iBAAiB,IAAI,MAAM,CAAC;IAC5B,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,wBAAwB,IAAI,OAAO,CAAC;IACpC,mBAAmB,IAAI,UAAU,GAAG,QAAQ,CAAC;IAC7C,mBAAmB,CAAC,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC;CACvD"}
@@ -20,26 +20,41 @@ export declare class Dendrogram extends SVGZoomWidget {
20
20
  dendrogramData(): any;
21
21
  enter(domNode: any, element: any): void;
22
22
  update(domNode: any, element: any): void;
23
- }
24
- export interface Dendrogram {
23
+ paletteID: {
24
+ (): string;
25
+ (_: string): Dendrogram;
26
+ };
27
+ useClonedPalette: {
28
+ (): boolean;
29
+ (_: boolean): Dendrogram;
30
+ };
31
+ mappings: {
32
+ (): DendrogramColumn[];
33
+ (_: DendrogramColumn[]): Dendrogram;
34
+ };
35
+ circleRadius: {
36
+ (): number;
37
+ (_: number): Dendrogram;
38
+ };
39
+ separation: {
40
+ (): number;
41
+ (_: number): Dendrogram;
42
+ };
43
+ dendrogram: {
44
+ (): boolean;
45
+ (_: boolean): Dendrogram;
46
+ };
47
+ radial: {
48
+ (): boolean;
49
+ (_: boolean): Dendrogram;
50
+ };
51
+ orientation: {
52
+ (): string;
53
+ (_: string): Dendrogram;
54
+ };
25
55
  _palette: any;
26
- click(row: any, column: any, selected: any): void;
27
- dblclick(row: any, column: any, selected: any): void;
56
+ click: (row: any, column: any, selected: any) => void;
57
+ dblclick: (row: any, column: any, selected: any) => void;
28
58
  _selection: any;
29
- paletteID(): string;
30
- paletteID(_: string): this;
31
- useClonedPalette(): boolean;
32
- useClonedPalette(_: boolean): this;
33
- mappings(): DendrogramColumn[];
34
- mappings(_: DendrogramColumn[]): this;
35
- circleRadius(): number;
36
- circleRadius(_: number): this;
37
- separation(): number;
38
- separation(_: number): this;
39
- dendrogram(): boolean;
40
- dendrogram(_: boolean): this;
41
- radial(): boolean;
42
- radial(_: boolean): this;
43
- orientation(): "horizontal" | "vertical";
44
- orientation(_: "horizontal" | "vertical"): this;
45
59
  }
60
+ //# sourceMappingURL=Dendrogram.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dendrogram.d.ts","sourceRoot":"","sources":["../src/Dendrogram.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAW,MAAM,iBAAiB,CAAC;AAItE,OAAO,uBAAuB,CAAC;AAE/B,qBAAa,gBAAiB,SAAQ,WAAW;IAC7C,MAAM,EAAE,UAAU,CAAC;;IAMnB,KAAK,IAAI,UAAU;IACnB,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAM1B,KAAK,IAAI,OAAO;IAIhB,MAAM,EAAE;QAAE,IAAI,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;KAAE,CAAC;CACpD;AAMD,qBAAa,UAAW,SAAQ,aAAa;IACzC,MAAM,MAAC;IACP,gBAAgB,MAAC;IACjB,aAAa,MAAC;IACd,SAAS,MAAC;;IAaV,cAAc;IAqBd,KAAK,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA;IAUtB,MAAM,CAAC,OAAO,KAAA,EAAE,OAAO,KAAA;IA4KvB,SAAS,EAAE;QAAE,IAAI,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;KAAE,CAAC;IACpD,gBAAgB,EAAE;QAAE,IAAI,OAAO,CAAC;QAAC,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;KAAE,CAAC;IAC7D,QAAQ,EAAE;QAAE,IAAI,gBAAgB,EAAE,CAAC;QAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC;KAAE,CAAC;IAE3E,YAAY,EAAE;QAAE,IAAI,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;KAAE,CAAC;IACvD,UAAU,EAAE;QAAE,IAAI,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;KAAE,CAAC;IACrD,UAAU,EAAE;QAAE,IAAI,OAAO,CAAC;QAAC,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;KAAE,CAAC;IACvD,MAAM,EAAE;QAAE,IAAI,OAAO,CAAC;QAAC,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;KAAE,CAAC;IACnD,WAAW,EAAE;QAAE,IAAI,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;KAAE,CAAC;IAGtD,QAAQ,MAAC;IACT,KAAK,EAAE,CAAC,GAAG,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,GAAG,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,KAAK,IAAI,CAAC;IAG1C,UAAU,MAAC;CACd"}