@hpcc-js/api 3.3.8 → 3.3.10
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 +297 -89
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -9
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
1
3
|
import { Palette, hsl, Widget, map, selection, select, format } from "@hpcc-js/common";
|
|
2
|
-
const PKG_NAME = "@hpcc-js/api"
|
|
4
|
+
const PKG_NAME = "@hpcc-js/api";
|
|
5
|
+
const PKG_VERSION = "3.2.0";
|
|
6
|
+
const BUILD_VERSION = "3.2.1";
|
|
3
7
|
function I1DChart() {
|
|
4
8
|
}
|
|
9
|
+
__name(I1DChart, "I1DChart");
|
|
5
10
|
I1DChart.prototype._dataFamily = "1D";
|
|
6
11
|
I1DChart.prototype._palette = Palette.rainbow("default");
|
|
7
12
|
I1DChart.prototype.click = function(row, column, selected) {
|
|
@@ -10,6 +15,7 @@ I1DChart.prototype.dblclick = function(row, column, selected) {
|
|
|
10
15
|
};
|
|
11
16
|
function I2DChart() {
|
|
12
17
|
}
|
|
18
|
+
__name(I2DChart, "I2DChart");
|
|
13
19
|
I2DChart.prototype._dataFamily = "2D";
|
|
14
20
|
I2DChart.prototype._palette = Palette.ordinal("default");
|
|
15
21
|
I2DChart.prototype.fillColor = function(row, column, value, origRow) {
|
|
@@ -27,6 +33,7 @@ I2DChart.prototype.dblclick = function(row, column, selected) {
|
|
|
27
33
|
};
|
|
28
34
|
function I2DAggrChart() {
|
|
29
35
|
}
|
|
36
|
+
__name(I2DAggrChart, "I2DAggrChart");
|
|
30
37
|
I2DAggrChart.prototype._palette = Palette.rainbow("default");
|
|
31
38
|
I2DAggrChart.prototype.fillColor = function(row, column, value) {
|
|
32
39
|
return this._palette(row.length);
|
|
@@ -43,43 +50,55 @@ I2DAggrChart.prototype.dblclick = function(row, column, selected) {
|
|
|
43
50
|
};
|
|
44
51
|
function IGraph() {
|
|
45
52
|
}
|
|
53
|
+
__name(IGraph, "IGraph");
|
|
46
54
|
IGraph.prototype._dataFamily = "graph";
|
|
47
55
|
IGraph.prototype.vertex_click = function(_row, _col, _sel, more) {
|
|
48
|
-
more && more.vertex;
|
|
56
|
+
if (more && more.vertex) ;
|
|
49
57
|
};
|
|
50
58
|
IGraph.prototype.vertex_dblclick = function(_row, _col, _sel, more) {
|
|
51
|
-
more && more.vertex;
|
|
59
|
+
if (more && more.vertex) ;
|
|
52
60
|
};
|
|
53
61
|
IGraph.prototype.edge_click = function(_row, _col, _sel, more) {
|
|
54
|
-
more && more.edge;
|
|
62
|
+
if (more && more.edge) ;
|
|
55
63
|
};
|
|
56
64
|
IGraph.prototype.edge_dblclick = function(_row, _col, _sel, more) {
|
|
57
|
-
more && more.edge;
|
|
65
|
+
if (more && more.edge) ;
|
|
58
66
|
};
|
|
59
67
|
function instanceOfIHighlight(w) {
|
|
60
|
-
return typeof w.highlightColumn
|
|
68
|
+
return typeof w.highlightColumn === "function";
|
|
61
69
|
}
|
|
70
|
+
__name(instanceOfIHighlight, "instanceOfIHighlight");
|
|
62
71
|
function IInput() {
|
|
63
72
|
}
|
|
73
|
+
__name(IInput, "IInput");
|
|
64
74
|
IInput.prototype = Object.create(Widget.prototype);
|
|
65
75
|
IInput.prototype.constructor = IInput;
|
|
66
76
|
IInput.prototype.isValid = function() {
|
|
67
|
-
|
|
77
|
+
if (this.validate()) {
|
|
78
|
+
const re = new RegExp(this.validate());
|
|
79
|
+
if (!re.test(this.value())) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return true;
|
|
68
84
|
};
|
|
69
85
|
IInput.prototype.hasValue = function() {
|
|
70
|
-
if (typeof this.type
|
|
86
|
+
if (typeof this.type === "function") {
|
|
71
87
|
switch (this.type()) {
|
|
72
88
|
case "radio":
|
|
89
|
+
/* falls through */
|
|
73
90
|
case "checkbox":
|
|
74
|
-
if (this.value() && this.value() !== "false")
|
|
75
|
-
return
|
|
91
|
+
if (this.value() && this.value() !== "false") {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
76
94
|
break;
|
|
77
95
|
default:
|
|
78
|
-
if (this.value())
|
|
79
|
-
return
|
|
96
|
+
if (this.value()) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
80
99
|
break;
|
|
81
100
|
}
|
|
82
|
-
return
|
|
101
|
+
return false;
|
|
83
102
|
}
|
|
84
103
|
return this.value() !== "";
|
|
85
104
|
};
|
|
@@ -104,7 +123,9 @@ IInput.prototype.disable = function(disable) {
|
|
|
104
123
|
});
|
|
105
124
|
};
|
|
106
125
|
IInput.prototype.setFocus = function() {
|
|
107
|
-
this._inputElement.length
|
|
126
|
+
if (this._inputElement.length) {
|
|
127
|
+
this._inputElement[0].node().focus();
|
|
128
|
+
}
|
|
108
129
|
};
|
|
109
130
|
IInput.prototype.publish("name", "", "string", "HTML name for the input");
|
|
110
131
|
IInput.prototype.publish("label", "", "string", "Descriptive label");
|
|
@@ -112,6 +133,7 @@ IInput.prototype.publish("value", "", "string", "Input Current Value");
|
|
|
112
133
|
IInput.prototype.publish("validate", null, "string", "Input Validation");
|
|
113
134
|
function INDChart() {
|
|
114
135
|
}
|
|
136
|
+
__name(INDChart, "INDChart");
|
|
115
137
|
INDChart.prototype._dataFamily = "ND";
|
|
116
138
|
INDChart.prototype._palette = Palette.ordinal("default");
|
|
117
139
|
INDChart.prototype.fillColor = function(row, column, value, origRow) {
|
|
@@ -128,86 +150,158 @@ INDChart.prototype.click = function(row, column, selected) {
|
|
|
128
150
|
INDChart.prototype.dblclick = function(row, column, selected) {
|
|
129
151
|
};
|
|
130
152
|
function tip() {
|
|
131
|
-
let direction = d3TipDirection
|
|
132
|
-
|
|
133
|
-
|
|
153
|
+
let direction = d3TipDirection;
|
|
154
|
+
let offset = d3TipOffset;
|
|
155
|
+
let html = d3TipHTML;
|
|
156
|
+
let rootElement = functor(document.body);
|
|
157
|
+
let node = initNode();
|
|
158
|
+
let svg = null;
|
|
159
|
+
let point = null;
|
|
160
|
+
let target = null;
|
|
161
|
+
const tip2 = /* @__PURE__ */ __name(function(vis) {
|
|
162
|
+
svg = getSVGNode(vis);
|
|
163
|
+
if (!svg) return;
|
|
134
164
|
point = svg.createSVGPoint();
|
|
135
165
|
const re = rootElement();
|
|
136
|
-
|
|
137
|
-
|
|
166
|
+
if (!re) return;
|
|
167
|
+
if (!node) return;
|
|
168
|
+
re.appendChild(node);
|
|
169
|
+
}, "tip2");
|
|
138
170
|
tip2.show = function(d, idx, arr) {
|
|
139
171
|
target = arr[idx];
|
|
140
|
-
const args = Array.prototype.slice.call(arguments)
|
|
141
|
-
|
|
172
|
+
const args = Array.prototype.slice.call(arguments);
|
|
173
|
+
const content = html.apply(this, args);
|
|
174
|
+
if (content === null) {
|
|
142
175
|
return tip2;
|
|
143
|
-
|
|
144
|
-
|
|
176
|
+
}
|
|
177
|
+
const poffset = offset.apply(this, args);
|
|
178
|
+
const nodel = getNodeEl();
|
|
179
|
+
let i = directions.length;
|
|
180
|
+
let coords;
|
|
145
181
|
const root_bbox = rootElement().getBoundingClientRect();
|
|
146
|
-
|
|
147
|
-
|
|
182
|
+
nodel.html(content).style("opacity", 1).style("pointer-events", "all");
|
|
183
|
+
while (i--) nodel.classed(directions[i], false);
|
|
184
|
+
let placement_success = false;
|
|
148
185
|
const placement_overflow = {};
|
|
149
186
|
let least_overflow_direction = directions[0];
|
|
150
|
-
for (let i2 = 0; i2 < directions.length
|
|
151
|
-
;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
nodel.classed("notick",
|
|
156
|
-
const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction])
|
|
187
|
+
for (let i2 = 0; i2 < directions.length; i2++) {
|
|
188
|
+
placement_success = _placement_attempt(directions[i2]);
|
|
189
|
+
if (placement_success) break;
|
|
190
|
+
}
|
|
191
|
+
if (!placement_success) {
|
|
192
|
+
nodel.classed("notick", true);
|
|
193
|
+
const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);
|
|
194
|
+
const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);
|
|
157
195
|
_placement_attempt(least_overflow_direction, top_offset, left_offset);
|
|
196
|
+
} else {
|
|
197
|
+
nodel.classed("notick", false);
|
|
158
198
|
}
|
|
159
199
|
return tip2;
|
|
160
200
|
function _horizontal_adjustment(overflow_obj) {
|
|
161
|
-
|
|
201
|
+
if (overflow_obj.left > overflow_obj.right) {
|
|
202
|
+
return overflow_obj.left > 0 ? -overflow_obj.left : 0;
|
|
203
|
+
} else {
|
|
204
|
+
return overflow_obj.right > 0 ? overflow_obj.right : 0;
|
|
205
|
+
}
|
|
162
206
|
}
|
|
207
|
+
__name(_horizontal_adjustment, "_horizontal_adjustment");
|
|
163
208
|
function _vertical_adjustment(overflow_obj) {
|
|
164
|
-
|
|
209
|
+
if (overflow_obj.top > overflow_obj.bottom) {
|
|
210
|
+
return overflow_obj.top > 0 ? -overflow_obj.top : 0;
|
|
211
|
+
} else {
|
|
212
|
+
return overflow_obj.bottom;
|
|
213
|
+
}
|
|
165
214
|
}
|
|
215
|
+
__name(_vertical_adjustment, "_vertical_adjustment");
|
|
166
216
|
function _placement_attempt(_dir, _top_offset, _left_offset) {
|
|
167
|
-
_top_offset = _top_offset
|
|
168
|
-
|
|
169
|
-
|
|
217
|
+
_top_offset = _top_offset ? _top_offset : 0;
|
|
218
|
+
_left_offset = _left_offset ? _left_offset : 0;
|
|
219
|
+
nodel.style("white-space", "nowrap");
|
|
220
|
+
coords = directionCallbacks.get(_dir).apply(this);
|
|
221
|
+
nodel.classed(_dir, true).style("top", coords.top + poffset[0] - _top_offset + "px").style("left", coords.left + poffset[1] - _left_offset + "px");
|
|
222
|
+
const nodel_bbox = nodel.node().getBoundingClientRect();
|
|
223
|
+
const ret = nodel_bbox.top > root_bbox.top && nodel_bbox.left > root_bbox.left && nodel_bbox.bottom < root_bbox.bottom && nodel_bbox.right < root_bbox.right;
|
|
224
|
+
placement_overflow[_dir] = {
|
|
170
225
|
top: root_bbox.top - nodel_bbox.top,
|
|
171
226
|
right: nodel_bbox.right - root_bbox.right,
|
|
172
227
|
bottom: nodel_bbox.bottom - root_bbox.bottom,
|
|
173
228
|
left: root_bbox.left - nodel_bbox.left
|
|
174
|
-
}
|
|
229
|
+
};
|
|
230
|
+
nodel.style("white-space", "normal");
|
|
231
|
+
placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir]).filter((side) => placement_overflow[_dir][side] > 0).reduce((sum, side) => {
|
|
175
232
|
const side_overflow = placement_overflow[_dir][side];
|
|
176
233
|
return sum + side_overflow;
|
|
177
|
-
}, 0)
|
|
234
|
+
}, 0);
|
|
235
|
+
if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {
|
|
236
|
+
least_overflow_direction = _dir;
|
|
237
|
+
}
|
|
238
|
+
if (!ret) {
|
|
239
|
+
nodel.classed(_dir, false);
|
|
240
|
+
}
|
|
241
|
+
return ret;
|
|
178
242
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
243
|
+
__name(_placement_attempt, "_placement_attempt");
|
|
244
|
+
};
|
|
245
|
+
tip2.hide = function() {
|
|
246
|
+
const nodel = getNodeEl();
|
|
247
|
+
nodel.style("opacity", 0).style("pointer-events", "none");
|
|
248
|
+
return tip2;
|
|
249
|
+
};
|
|
250
|
+
tip2.attr = function(n, v) {
|
|
251
|
+
if (arguments.length < 2 && typeof n === "string") {
|
|
183
252
|
return getNodeEl().attr(n);
|
|
253
|
+
}
|
|
184
254
|
const args = Array.prototype.slice.call(arguments);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
255
|
+
selection.prototype.attr.apply(getNodeEl(), args);
|
|
256
|
+
return tip2;
|
|
257
|
+
};
|
|
258
|
+
tip2.style = function(n, v) {
|
|
259
|
+
if (arguments.length < 2 && typeof n === "string") {
|
|
188
260
|
return getNodeEl().style(n);
|
|
261
|
+
}
|
|
189
262
|
const args = Array.prototype.slice.call(arguments);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
return
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
263
|
+
selection.prototype.style.apply(getNodeEl(), args);
|
|
264
|
+
return tip2;
|
|
265
|
+
};
|
|
266
|
+
tip2.direction = function(v) {
|
|
267
|
+
if (!arguments.length) return direction;
|
|
268
|
+
direction = v == null ? v : functor(v);
|
|
269
|
+
return tip2;
|
|
270
|
+
};
|
|
271
|
+
tip2.offset = function(v) {
|
|
272
|
+
if (!arguments.length) return offset;
|
|
273
|
+
offset = v == null ? v : functor(v);
|
|
274
|
+
return tip2;
|
|
275
|
+
};
|
|
276
|
+
tip2.html = function(v) {
|
|
277
|
+
if (!arguments.length) return html;
|
|
278
|
+
html = v == null ? v : functor(v);
|
|
279
|
+
return tip2;
|
|
280
|
+
};
|
|
281
|
+
tip2.rootElement = function(v) {
|
|
282
|
+
if (!arguments.length) return rootElement;
|
|
283
|
+
rootElement = functor(v);
|
|
284
|
+
return tip2;
|
|
285
|
+
};
|
|
286
|
+
tip2.destroy = function() {
|
|
287
|
+
if (node) {
|
|
288
|
+
getNodeEl().remove();
|
|
289
|
+
node = null;
|
|
290
|
+
}
|
|
291
|
+
return tip2;
|
|
201
292
|
};
|
|
202
293
|
function d3TipDirection() {
|
|
203
294
|
return "n";
|
|
204
295
|
}
|
|
296
|
+
__name(d3TipDirection, "d3TipDirection");
|
|
205
297
|
function d3TipOffset() {
|
|
206
298
|
return [0, 0];
|
|
207
299
|
}
|
|
300
|
+
__name(d3TipOffset, "d3TipOffset");
|
|
208
301
|
function d3TipHTML() {
|
|
209
302
|
return " ";
|
|
210
303
|
}
|
|
304
|
+
__name(d3TipHTML, "d3TipHTML");
|
|
211
305
|
const directionCallbacks = map({
|
|
212
306
|
n: directionNorth,
|
|
213
307
|
s: directionSouth,
|
|
@@ -217,7 +311,8 @@ function tip() {
|
|
|
217
311
|
ne: directionNorthEast,
|
|
218
312
|
sw: directionSouthWest,
|
|
219
313
|
se: directionSouthEast
|
|
220
|
-
})
|
|
314
|
+
});
|
|
315
|
+
const directions = directionCallbacks.keys();
|
|
221
316
|
function directionNorth() {
|
|
222
317
|
const bbox = getScreenBBox(window);
|
|
223
318
|
return {
|
|
@@ -225,6 +320,7 @@ function tip() {
|
|
|
225
320
|
left: bbox.n.x - node.offsetWidth / 2
|
|
226
321
|
};
|
|
227
322
|
}
|
|
323
|
+
__name(directionNorth, "directionNorth");
|
|
228
324
|
function directionSouth() {
|
|
229
325
|
const bbox = getScreenBBox(window);
|
|
230
326
|
return {
|
|
@@ -232,6 +328,7 @@ function tip() {
|
|
|
232
328
|
left: bbox.s.x - node.offsetWidth / 2
|
|
233
329
|
};
|
|
234
330
|
}
|
|
331
|
+
__name(directionSouth, "directionSouth");
|
|
235
332
|
function directionEast() {
|
|
236
333
|
const bbox = getScreenBBox(window);
|
|
237
334
|
return {
|
|
@@ -239,6 +336,7 @@ function tip() {
|
|
|
239
336
|
left: bbox.e.x + 8
|
|
240
337
|
};
|
|
241
338
|
}
|
|
339
|
+
__name(directionEast, "directionEast");
|
|
242
340
|
function directionWest() {
|
|
243
341
|
const bbox = getScreenBBox(window);
|
|
244
342
|
return {
|
|
@@ -246,6 +344,7 @@ function tip() {
|
|
|
246
344
|
left: bbox.w.x - node.offsetWidth - 8
|
|
247
345
|
};
|
|
248
346
|
}
|
|
347
|
+
__name(directionWest, "directionWest");
|
|
249
348
|
function directionNorthWest() {
|
|
250
349
|
const bbox = getScreenBBox(window);
|
|
251
350
|
return {
|
|
@@ -253,6 +352,7 @@ function tip() {
|
|
|
253
352
|
left: bbox.nw.x - node.offsetWidth
|
|
254
353
|
};
|
|
255
354
|
}
|
|
355
|
+
__name(directionNorthWest, "directionNorthWest");
|
|
256
356
|
function directionNorthEast() {
|
|
257
357
|
const bbox = getScreenBBox(window);
|
|
258
358
|
return {
|
|
@@ -260,6 +360,7 @@ function tip() {
|
|
|
260
360
|
left: bbox.ne.x
|
|
261
361
|
};
|
|
262
362
|
}
|
|
363
|
+
__name(directionNorthEast, "directionNorthEast");
|
|
263
364
|
function directionSouthWest() {
|
|
264
365
|
const bbox = getScreenBBox(window);
|
|
265
366
|
return {
|
|
@@ -267,6 +368,7 @@ function tip() {
|
|
|
267
368
|
left: bbox.sw.x - node.offsetWidth
|
|
268
369
|
};
|
|
269
370
|
}
|
|
371
|
+
__name(directionSouthWest, "directionSouthWest");
|
|
270
372
|
function directionSouthEast() {
|
|
271
373
|
const bbox = getScreenBBox(window);
|
|
272
374
|
return {
|
|
@@ -274,71 +376,133 @@ function tip() {
|
|
|
274
376
|
left: bbox.se.x
|
|
275
377
|
};
|
|
276
378
|
}
|
|
379
|
+
__name(directionSouthEast, "directionSouthEast");
|
|
277
380
|
function initNode() {
|
|
278
381
|
const div = select(document.createElement("div"));
|
|
279
|
-
|
|
382
|
+
div.attr("class", "d3-tip").style("position", "absolute").style("top", "0px").style("opacity", 0).style("pointer-events", "none").style("box-sizing", "border-box");
|
|
383
|
+
return div.node();
|
|
280
384
|
}
|
|
385
|
+
__name(initNode, "initNode");
|
|
281
386
|
function getSVGNode(element) {
|
|
282
387
|
const svgNode = element.node();
|
|
283
|
-
|
|
388
|
+
if (!svgNode) return null;
|
|
389
|
+
if (svgNode.tagName.toLowerCase() === "svg") return svgNode;
|
|
390
|
+
return svgNode.ownerSVGElement;
|
|
284
391
|
}
|
|
392
|
+
__name(getSVGNode, "getSVGNode");
|
|
285
393
|
function getNodeEl() {
|
|
286
|
-
|
|
394
|
+
if (node == null) {
|
|
395
|
+
node = initNode();
|
|
396
|
+
rootElement().appendChild(node);
|
|
397
|
+
}
|
|
398
|
+
return select(node);
|
|
287
399
|
}
|
|
400
|
+
__name(getNodeEl, "getNodeEl");
|
|
288
401
|
function getScreenBBox(targetShape) {
|
|
289
402
|
let targetel = target || targetShape;
|
|
290
|
-
|
|
403
|
+
while (targetel.getCTM == null && targetel.parentNode != null) {
|
|
291
404
|
targetel = targetel.parentNode;
|
|
292
|
-
|
|
293
|
-
|
|
405
|
+
}
|
|
406
|
+
const bbox = {};
|
|
407
|
+
const matrix = targetel.getCTM();
|
|
408
|
+
const tbbox = targetel.getBBox();
|
|
409
|
+
const width = tbbox.width;
|
|
410
|
+
const height = tbbox.height;
|
|
411
|
+
const x = tbbox.x;
|
|
412
|
+
const y = tbbox.y;
|
|
413
|
+
point.x = x;
|
|
414
|
+
point.y = y;
|
|
415
|
+
bbox.nw = point.matrixTransform(matrix);
|
|
416
|
+
point.x += width;
|
|
417
|
+
bbox.ne = point.matrixTransform(matrix);
|
|
418
|
+
point.y += height;
|
|
419
|
+
bbox.se = point.matrixTransform(matrix);
|
|
420
|
+
point.x -= width;
|
|
421
|
+
bbox.sw = point.matrixTransform(matrix);
|
|
422
|
+
point.y -= height / 2;
|
|
423
|
+
bbox.w = point.matrixTransform(matrix);
|
|
424
|
+
point.x += width;
|
|
425
|
+
bbox.e = point.matrixTransform(matrix);
|
|
426
|
+
point.x -= width / 2;
|
|
427
|
+
point.y -= height / 2;
|
|
428
|
+
bbox.n = point.matrixTransform(matrix);
|
|
429
|
+
point.y += height;
|
|
430
|
+
bbox.s = point.matrixTransform(matrix);
|
|
431
|
+
return bbox;
|
|
294
432
|
}
|
|
433
|
+
__name(getScreenBBox, "getScreenBBox");
|
|
295
434
|
function functor(v) {
|
|
296
|
-
return typeof v
|
|
435
|
+
return typeof v === "function" ? v : function() {
|
|
297
436
|
return v;
|
|
298
437
|
};
|
|
299
438
|
}
|
|
439
|
+
__name(functor, "functor");
|
|
300
440
|
return tip2;
|
|
301
441
|
}
|
|
442
|
+
__name(tip, "tip");
|
|
302
443
|
function ITooltip() {
|
|
303
|
-
|
|
444
|
+
this.tooltip = tip();
|
|
445
|
+
if (this.tooltipLabelFormat_exists()) {
|
|
446
|
+
this._labelFormatter = format(this.tooltipLabelFormat());
|
|
447
|
+
}
|
|
448
|
+
if (this.tooltipValueFormat_exists()) {
|
|
449
|
+
this._valueFormatter = format(this.tooltipValueFormat());
|
|
450
|
+
}
|
|
451
|
+
if (this.layerEnter) {
|
|
304
452
|
const layerEnter = this.layerEnter;
|
|
305
453
|
this.layerEnter = function(_base, svgElement, _domElement) {
|
|
306
|
-
|
|
454
|
+
if (!this._parentOverlay) {
|
|
455
|
+
this._parentOverlay = _base._parentOverlay;
|
|
456
|
+
}
|
|
457
|
+
this.tooltipEnter(svgElement);
|
|
458
|
+
layerEnter.apply(this, arguments);
|
|
307
459
|
};
|
|
308
460
|
const layerUpdate = this.layerUpdate;
|
|
309
461
|
this.layerUpdate = function(_base) {
|
|
310
|
-
layerUpdate.apply(this, arguments)
|
|
462
|
+
layerUpdate.apply(this, arguments);
|
|
463
|
+
this.tooltipUpdate();
|
|
311
464
|
};
|
|
312
465
|
const layerExit = this.layerExit;
|
|
313
466
|
this.layerExit = function(_base) {
|
|
314
|
-
this.tooltipExit()
|
|
467
|
+
this.tooltipExit();
|
|
468
|
+
layerExit.apply(this, arguments);
|
|
315
469
|
};
|
|
316
470
|
} else {
|
|
317
471
|
const enter = this.enter;
|
|
318
472
|
this.enter = function(_domNode, element) {
|
|
319
|
-
this.tooltipEnter(element)
|
|
473
|
+
this.tooltipEnter(element);
|
|
474
|
+
enter.apply(this, arguments);
|
|
320
475
|
};
|
|
321
476
|
const update = this.update;
|
|
322
477
|
this.update = function(_domNode, _element) {
|
|
323
|
-
update.apply(this, arguments)
|
|
478
|
+
update.apply(this, arguments);
|
|
479
|
+
this.tooltipUpdate();
|
|
324
480
|
};
|
|
325
481
|
const exit = this.exit;
|
|
326
482
|
this.exit = function(_domNode, _element) {
|
|
327
|
-
this.tooltipExit()
|
|
483
|
+
this.tooltipExit();
|
|
484
|
+
exit.apply(this, arguments);
|
|
328
485
|
};
|
|
329
486
|
}
|
|
330
487
|
}
|
|
488
|
+
__name(ITooltip, "ITooltip");
|
|
331
489
|
ITooltip.prototype = Object.create(Widget.prototype);
|
|
332
490
|
ITooltip.prototype.constructor = ITooltip;
|
|
333
491
|
ITooltip.prototype.tooltipEnter = function(element) {
|
|
334
492
|
const overlayElement = this.parentOverlay();
|
|
335
|
-
|
|
493
|
+
if (!overlayElement.empty()) {
|
|
494
|
+
this.tooltip.rootElement(overlayElement.node().parentNode);
|
|
495
|
+
}
|
|
496
|
+
element.call(this.tooltip);
|
|
336
497
|
};
|
|
337
498
|
ITooltip.prototype.tooltipUpdate = function() {
|
|
338
499
|
this.tooltip.offset(() => {
|
|
339
500
|
if (event && this.tooltipFollowMouse()) {
|
|
340
501
|
const d3tipElement = document.querySelector(".d3-tip");
|
|
341
|
-
|
|
502
|
+
d3tipElement.style.display = "block";
|
|
503
|
+
d3tipElement.style.left = this.tooltipOffset() + event.clientX + "px";
|
|
504
|
+
d3tipElement.style.top = event.clientY + "px";
|
|
505
|
+
return [];
|
|
342
506
|
}
|
|
343
507
|
switch (this.tooltip.direction()()) {
|
|
344
508
|
case "e":
|
|
@@ -348,12 +512,19 @@ ITooltip.prototype.tooltipUpdate = function() {
|
|
|
348
512
|
}
|
|
349
513
|
});
|
|
350
514
|
let classed = this.tooltip.attr("class");
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
515
|
+
if (classed) {
|
|
516
|
+
classed = classed.split(" notick").join("") + (this.tooltipTick() ? "" : " notick") + (this.tooltipStyle() === "none" ? " hidden" : "");
|
|
517
|
+
classed = classed.split(" ").filter(function(_class) {
|
|
518
|
+
return _class.indexOf("ITooltip-tooltipStyle-") !== 0;
|
|
519
|
+
}).join(" ");
|
|
520
|
+
classed += " ITooltip-tooltipStyle-" + this.tooltipStyle();
|
|
521
|
+
this.tooltip.attr("class", classed);
|
|
522
|
+
}
|
|
354
523
|
};
|
|
355
524
|
ITooltip.prototype.tooltipExit = function() {
|
|
356
|
-
|
|
525
|
+
if (this.tooltip) {
|
|
526
|
+
this.tooltip.destroy();
|
|
527
|
+
}
|
|
357
528
|
};
|
|
358
529
|
ITooltip.prototype._tooltipHTML = function(d) {
|
|
359
530
|
return d;
|
|
@@ -362,25 +533,55 @@ ITooltip.prototype.tooltipHTML = function(_) {
|
|
|
362
533
|
return this.tooltip.html(_);
|
|
363
534
|
};
|
|
364
535
|
ITooltip.prototype.tooltipFormat = function(opts = {}) {
|
|
365
|
-
|
|
536
|
+
opts.label = opts.label === void 0 ? "" : opts.label;
|
|
537
|
+
if (this._labelFormatter) {
|
|
538
|
+
opts.label = this._labelFormatter(opts.label) || "";
|
|
539
|
+
} else if (this.formatData && this.parseData) {
|
|
540
|
+
opts.label = this.formatData(this.parseData(opts.label));
|
|
541
|
+
}
|
|
542
|
+
opts.series = opts.series || "";
|
|
543
|
+
if (opts.value instanceof Date) {
|
|
544
|
+
opts.value = opts.value || "";
|
|
545
|
+
} else if (this._valueFormatter) {
|
|
546
|
+
opts.value = this._valueFormatter(opts.value) || "";
|
|
547
|
+
} else if (this.formatValue && this.parseValue) {
|
|
548
|
+
opts.value = this.formatValue(this.parseValue(opts.value));
|
|
549
|
+
}
|
|
550
|
+
switch (this.tooltipStyle()) {
|
|
366
551
|
case "none":
|
|
367
552
|
break;
|
|
368
553
|
case "series-table":
|
|
369
554
|
let html = '<table class="ITooltip-series-table"><thead><tr><th colspan="2">' + opts.label + "</th></tr></thead><tbody>";
|
|
370
|
-
|
|
371
|
-
html += "<tr>"
|
|
372
|
-
|
|
555
|
+
opts.arr.forEach(function(row) {
|
|
556
|
+
html += "<tr>";
|
|
557
|
+
html += "<td>";
|
|
558
|
+
html += '<div class="series-table-row-color" style="background-color:' + row.color + '"></div>';
|
|
559
|
+
html += '<div class="series-table-row-label">' + row.label + "</div>";
|
|
560
|
+
html += "</td>";
|
|
561
|
+
html += '<td><div class="series-table-row-value">' + row.value + "</div></td>";
|
|
562
|
+
html += "</tr>";
|
|
563
|
+
});
|
|
564
|
+
html += "</tbody>";
|
|
565
|
+
html += "</table>";
|
|
566
|
+
return html;
|
|
373
567
|
default:
|
|
374
|
-
|
|
568
|
+
if (opts.series) {
|
|
569
|
+
return "<span style='color:" + this.tooltipSeriesColor() + "'>" + opts.series + "</span> / <span style='color:" + this.tooltipLabelColor() + "'>" + opts.label + "</span>: <span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
570
|
+
}
|
|
571
|
+
if (opts.label !== "") {
|
|
572
|
+
return "<span style='color:" + this.tooltipLabelColor() + "'>" + opts.label + "</span>: <span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
573
|
+
}
|
|
574
|
+
return "<span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
375
575
|
}
|
|
376
576
|
};
|
|
377
577
|
ITooltip.prototype.tooltipKeyValueFormat = function(titleKey, obj) {
|
|
378
578
|
let body = "";
|
|
379
|
-
for (const key in obj)
|
|
579
|
+
for (const key in obj) {
|
|
380
580
|
if (key !== titleKey) {
|
|
381
581
|
const value = obj && obj[key] ? obj[key] : "";
|
|
382
582
|
body += `<tr><td style="${this.tooltipLabelColor_exists() ? "color:" + this.tooltipLabelColor() : ""}">${key}</td><td style="font-weight:normal">${value}</td></tr>`;
|
|
383
583
|
}
|
|
584
|
+
}
|
|
384
585
|
return `<table>
|
|
385
586
|
<thead>
|
|
386
587
|
<tr><th colspan="2" style="font-weight:bold;font-size:16px">${obj[titleKey]}</th></tr>
|
|
@@ -391,26 +592,33 @@ ITooltip.prototype.tooltipKeyValueFormat = function(titleKey, obj) {
|
|
|
391
592
|
</table>`;
|
|
392
593
|
};
|
|
393
594
|
ITooltip.prototype.publish("tooltipStyle", "default", "set", "Style mode", ["default", "none", "series-table"], {});
|
|
394
|
-
ITooltip.prototype.publish("tooltipFollowMouse",
|
|
595
|
+
ITooltip.prototype.publish("tooltipFollowMouse", false, "boolean", "If true, the tooltip will follow mouse movement", null, {});
|
|
395
596
|
ITooltip.prototype.publish("tooltipLabelFormat", void 0, "string", "Format of tooltip label(s) (the domain axis)", null, {});
|
|
396
597
|
ITooltip.prototype.publish("tooltipValueFormat", void 0, "string", "Number format of tooltip value(s)", null, {});
|
|
397
598
|
ITooltip.prototype.publish("tooltipSeriesColor", "#EAFFFF", "html-color", "Color of tooltip series text", null, {});
|
|
398
599
|
ITooltip.prototype.publish("tooltipLabelColor", "#CCFFFF", "html-color", "Color of tooltip label text (the domain axis)", null, {});
|
|
399
600
|
ITooltip.prototype.publish("tooltipValueColor", "white", "html-color", "Color of tooltip value(s)", null, {});
|
|
400
|
-
ITooltip.prototype.publish("tooltipTick",
|
|
601
|
+
ITooltip.prototype.publish("tooltipTick", true, "boolean", "Show tooltip tick", null, {});
|
|
401
602
|
ITooltip.prototype.publish("tooltipOffset", 8, "number", "Offset from the cursor", null, {});
|
|
402
603
|
const tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;
|
|
403
604
|
ITooltip.prototype.tooltipLabelFormat = function(_) {
|
|
404
605
|
const retVal = tooltipLabelFormat.apply(this, arguments);
|
|
405
|
-
|
|
606
|
+
if (arguments.length) {
|
|
607
|
+
this._labelFormatter = format(_);
|
|
608
|
+
}
|
|
609
|
+
return retVal;
|
|
406
610
|
};
|
|
407
611
|
const tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;
|
|
408
612
|
ITooltip.prototype.tooltipValueFormat = function(_) {
|
|
409
613
|
const retVal = tooltipValueFormat.apply(this, arguments);
|
|
410
|
-
|
|
614
|
+
if (arguments.length) {
|
|
615
|
+
this._valueFormatter = format(_);
|
|
616
|
+
}
|
|
617
|
+
return retVal;
|
|
411
618
|
};
|
|
412
619
|
function ITree() {
|
|
413
620
|
}
|
|
621
|
+
__name(ITree, "ITree");
|
|
414
622
|
ITree.prototype.constructor = ITree;
|
|
415
623
|
ITree.prototype.click = function(row, column, selected) {
|
|
416
624
|
};
|
|
@@ -432,4 +640,4 @@ export {
|
|
|
432
640
|
instanceOfIHighlight
|
|
433
641
|
};
|
|
434
642
|
//# sourceMappingURL=index.js.map
|
|
435
|
-
|
|
643
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.d3-tip{line-height:1;font-weight:700;padding:12px;background:#000000a8;color:#fff;border-radius:2px;pointer-events:none!important;z-index:10}.d3-tip.hidden{visibility:hidden}.d3-tip:after{content:" ";box-sizing:border-box;display:inline-block;border:4px solid rgba(0,0,0,.66);position:absolute;pointer-events:none!important;width:8px;height:8px;margin:0}.d3-tip.n:after{top:100%;left:calc(50% - 4px);border-top-width:8px;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.d3-tip.e:after{top:calc(50% - 4px);left:-12px;border-top-color:transparent;border-right-width:8px;border-bottom-color:transparent;border-left-color:transparent}.d3-tip.s{margin-top:8px}.d3-tip.s:after{top:-12px;left:calc(50% - 4px);border-top-color:transparent;border-right-color:transparent;border-bottom-width:8px;border-left-color:transparent}.d3-tip.w:after{top:calc(50% - 4px);left:100%;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-width:8px}.d3-tip.notick:after{border-color:transparent!important}.common_Widget .over{stroke:#000000a8;opacity:.66}.d3-tip.ITooltip-tooltipStyle-series-table{padding:0}.d3-tip .ITooltip-series-table th,.d3-tip .ITooltip-series-table td{padding:6px;text-align:left;border:1px solid #D1D1D1}.d3-tip .ITooltip-series-table .series-table-row-color{display:inline-block;height:10px;width:10px;margin-right:10px}.d3-tip .ITooltip-series-table .series-table-row-label{display:inline-block}.d3-tip .ITooltip-series-table th{background-color:#b3b3b3}.d3-tip .ITooltip-series-table td{background-color:#fff;color:#555;font-weight:400}.d3-tip .ITooltip-series-table td:first-child{border-right:0}table.ITooltip-series-table td:last-child{border-left:1px dotted #A3A3A3}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/api\";\nexport const PKG_VERSION = \"3.2.0\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"names":["d3Hsl","tip","i","d3Format"],"mappings":";AAAO,MAAM,WAAW,gBACX,cAAc,SACd,gBAAgB;ACAtB,SAAS,WAAW;AAC3B;AACA,SAAS,UAAU,cAAc;AACjC,SAAS,UAAU,WAAW,QAAQ,QAAQ,SAAS;AAGvD,SAAS,UAAU,QAAQ,SAAU,KAAK,QAAQ,UAAU;AAC5D;AAEA,SAAS,UAAU,WAAW,SAAU,KAAK,QAAQ,UAAU;AAC/D;ACTO,SAAS,WAAW;AAC3B;AACA,SAAS,UAAU,cAAc;AACjC,SAAS,UAAU,WAAW,QAAQ,QAAQ,SAAS;AAEvD,SAAS,UAAU,YAAY,SAAU,KAAY,QAAQ,OAAO,SAAiB;AACjF,SAAO,KAAK,SAAS,IAAI,CAAC,CAAC;AAC/B;AAEA,SAAS,UAAU,cAAc,SAAU,KAAY,QAAQ,OAAO,SAAiB;AACnF,SAAOA,IAAM,KAAK,UAAU,KAAK,QAAQ,OAAO,OAAO,CAAC,EAAE,OAAA,EAAS,SAAA;AACvE;AAEA,SAAS,UAAU,YAAY,SAAU,KAAY,QAAQ,OAAO,SAAiB;AACjF,SAAO,QAAQ,UAAU,KAAK,UAAU,KAAK,QAAQ,OAAO,OAAO,CAAC;AACxE;AAGA,SAAS,UAAU,QAAQ,SAAU,KAAa,QAAQ,UAAU;A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,UAAU,WAAW,SAAU,KAAK,QAAQ,UAAU;AAC5D;AAEA,MAAM,UAAU,WAAW,QAAQ,QAAQ,SAAS;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/api\";\nexport const PKG_VERSION = \"3.2.0\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"names":["d3Hsl","tip","i","d3Format"],"mappings":";;;AAAO,MAAM,WAAW;AACjB,MAAM,cAAc;AACpB,MAAM,gBAAgB;ACAtB,SAAS,WAAW;AAC3B;AADgB;AAEhB,SAAS,UAAU,cAAc;AACjC,SAAS,UAAU,WAAW,QAAQ,QAAQ,SAAS;AAGvD,SAAS,UAAU,QAAQ,SAAU,KAAK,QAAQ,UAAU;AAC5D;AAEA,SAAS,UAAU,WAAW,SAAU,KAAK,QAAQ,UAAU;AAC/D;ACTO,SAAS,WAAW;AAC3B;AADgB;AAEhB,SAAS,UAAU,cAAc;AACjC,SAAS,UAAU,WAAW,QAAQ,QAAQ,SAAS;AAEvD,SAAS,UAAU,YAAY,SAAU,KAAY,QAAQ,OAAO,SAAiB;AACjF,SAAO,KAAK,SAAS,IAAI,CAAC,CAAC;AAC/B;AAEA,SAAS,UAAU,cAAc,SAAU,KAAY,QAAQ,OAAO,SAAiB;AACnF,SAAOA,IAAM,KAAK,UAAU,KAAK,QAAQ,OAAO,OAAO,CAAC,EAAE,OAAA,EAAS,SAAA;AACvE;AAEA,SAAS,UAAU,YAAY,SAAU,KAAY,QAAQ,OAAO,SAAiB;AACjF,SAAO,QAAQ,UAA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B,SAAK,kBAAkBA,OAAS,CAAC;AAAA,EACrC;AACA,SAAO;AACX;AC7NO,SAAS,QAAQ;AACxB;AADgB;AAEhB,MAAM,UAAU,cAAc;AAG9B,MAAM,UAAU,QAAQ,SAAU,KAAK,QAAQ,UAAU;AACzD;AAEA,MAAM,UAAU,WAAW,SAAU,KAAK,QAAQ,UAAU;AAC5D;AAEA,MAAM,UAAU,WAAW,QAAQ,QAAQ,SAAS;"}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@hpcc-js/common")):typeof define=="function"&&define.amd?define(["exports","@hpcc-js/common"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/api"]={},global["@hpcc-js/common"]))})(this,function(exports2,common){"use strict";const PKG_NAME="@hpcc-js/api",PKG_VERSION="3.2.0",BUILD_VERSION="3.2.1";function I1DChart(){}I1DChart.prototype._dataFamily="1D",I1DChart.prototype._palette=common.Palette.rainbow("default"),I1DChart.prototype.click=function(row,column,selected){},I1DChart.prototype.dblclick=function(row,column,selected){};function I2DChart(){}I2DChart.prototype._dataFamily="2D",I2DChart.prototype._palette=common.Palette.ordinal("default"),I2DChart.prototype.fillColor=function(row,column,value,origRow){return this._palette(row[0])},I2DChart.prototype.strokeColor=function(row,column,value,origRow){return common.hsl(this.fillColor(row,column,value,origRow)).darker().toString()},I2DChart.prototype.textColor=function(row,column,value,origRow){return common.Palette.textColor(this.fillColor(row,column,value,origRow))},I2DChart.prototype.click=function(row,column,selected){},I2DChart.prototype.dblclick=function(row,column,selected){};function I2DAggrChart(){}I2DAggrChart.prototype._palette=common.Palette.rainbow("default"),I2DAggrChart.prototype.fillColor=function(row,column,value){return this._palette(row.length)},I2DAggrChart.prototype.strokeColor=function(row,column,value){return common.hsl(this.fillColor(row,column,value)).darker().toString()},I2DAggrChart.prototype.textColor=function(row,column,value){return common.Palette.textColor(this.fillColor(row,column,value))},I2DAggrChart.prototype.click=function(row,column,selected){},I2DAggrChart.prototype.dblclick=function(row,column,selected){};function IGraph(){}IGraph.prototype._dataFamily="graph",IGraph.prototype.vertex_click=function(_row,_col,_sel,more){more&&more.vertex},IGraph.prototype.vertex_dblclick=function(_row,_col,_sel,more){more&&more.vertex},IGraph.prototype.edge_click=function(_row,_col,_sel,more){more&&more.edge},IGraph.prototype.edge_dblclick=function(_row,_col,_sel,more){more&&more.edge};function instanceOfIHighlight(w){return typeof w.highlightColumn=="function"}function IInput(){}IInput.prototype=Object.create(common.Widget.prototype),IInput.prototype.constructor=IInput,IInput.prototype.isValid=function(){return!(this.validate()&&!new RegExp(this.validate()).test(this.value()))},IInput.prototype.hasValue=function(){if(typeof this.type=="function"){switch(this.type()){case"radio":case"checkbox":if(this.value()&&this.value()!=="false")return!0;break;default:if(this.value())return!0;break}return!1}return this.value()!==""},IInput.prototype.blur=function(_w){},IInput.prototype.keyup=function(_w){},IInput.prototype.focus=function(_w){},IInput.prototype.click=function(_w){},IInput.prototype.dblclick=function(_w){},IInput.prototype.change=function(_w,complete){},IInput.prototype.resetValue=function(w){w.value(w._inputElement[0].node().value)},IInput.prototype.disable=function(disable){this._inputElement.forEach(function(e,idx){e.attr("disabled",disable?"disabled":null)})},IInput.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},IInput.prototype.publish("name","","string","HTML name for the input"),IInput.prototype.publish("label","","string","Descriptive label"),IInput.prototype.publish("value","","string","Input Current Value"),IInput.prototype.publish("validate",null,"string","Input Validation");function INDChart(){}INDChart.prototype._dataFamily="ND",INDChart.prototype._palette=common.Palette.ordinal("default"),INDChart.prototype.fillColor=function(row,column,value,origRow){return this._palette(column)},INDChart.prototype.strokeColor=function(row,column,value,origRow){return common.hsl(this.fillColor(row,column,value,origRow)).darker().toString()},INDChart.prototype.textColor=function(row,column,value,origRow){return common.Palette.textColor(this.fillColor(row,column,value,origRow))},INDChart.prototype.click=function(row,column,selected){},INDChart.prototype.dblclick=function(row,column,selected){};function tip(){let direction=d3TipDirection,offset=d3TipOffset,html=d3TipHTML,rootElement=functor(document.body),node=initNode(),svg=null,point=null,target=null;const tip2=function(vis){if(svg=getSVGNode(vis),!svg)return;point=svg.createSVGPoint();const re=rootElement();re&&node&&re.appendChild(node)};tip2.show=function(d,idx,arr){target=arr[idx];const args=Array.prototype.slice.call(arguments),content=html.apply(this,args);if(content===null)return tip2;const poffset=offset.apply(this,args),nodel=getNodeEl();let i=directions.length,coords;const root_bbox=rootElement().getBoundingClientRect();for(nodel.html(content).style("opacity",1).style("pointer-events","all");i--;)nodel.classed(directions[i],!1);let placement_success=!1;const placement_overflow={};let least_overflow_direction=directions[0];for(let i2=0;i2<directions.length&&(placement_success=_placement_attempt(directions[i2]),!placement_success);i2++);if(placement_success)nodel.classed("notick",!1);else{nodel.classed("notick",!0);const top_offset=_vertical_adjustment(placement_overflow[least_overflow_direction]),left_offset=_horizontal_adjustment(placement_overflow[least_overflow_direction]);_placement_attempt(least_overflow_direction,top_offset,left_offset)}return tip2;function _horizontal_adjustment(overflow_obj){return overflow_obj.left>overflow_obj.right?overflow_obj.left>0?-overflow_obj.left:0:overflow_obj.right>0?overflow_obj.right:0}function _vertical_adjustment(overflow_obj){return overflow_obj.top>overflow_obj.bottom?overflow_obj.top>0?-overflow_obj.top:0:overflow_obj.bottom}function _placement_attempt(_dir,_top_offset,_left_offset){_top_offset=_top_offset||0,_left_offset=_left_offset||0,nodel.style("white-space","nowrap"),coords=directionCallbacks.get(_dir).apply(this),nodel.classed(_dir,!0).style("top",coords.top+poffset[0]-_top_offset+"px").style("left",coords.left+poffset[1]-_left_offset+"px");const nodel_bbox=nodel.node().getBoundingClientRect(),ret=nodel_bbox.top>root_bbox.top&&nodel_bbox.left>root_bbox.left&&nodel_bbox.bottom<root_bbox.bottom&&nodel_bbox.right<root_bbox.right;return placement_overflow[_dir]={top:root_bbox.top-nodel_bbox.top,right:nodel_bbox.right-root_bbox.right,bottom:nodel_bbox.bottom-root_bbox.bottom,left:root_bbox.left-nodel_bbox.left},nodel.style("white-space","normal"),placement_overflow[_dir].total_overflow=Object.keys(placement_overflow[_dir]).filter(side=>placement_overflow[_dir][side]>0).reduce((sum,side)=>{const side_overflow=placement_overflow[_dir][side];return sum+side_overflow},0),placement_overflow[least_overflow_direction].total_overflow>placement_overflow[_dir].total_overflow&&(least_overflow_direction=_dir),ret||nodel.classed(_dir,!1),ret}},tip2.hide=function(){return getNodeEl().style("opacity",0).style("pointer-events","none"),tip2},tip2.attr=function(n,v){if(arguments.length<2&&typeof n=="string")return getNodeEl().attr(n);const args=Array.prototype.slice.call(arguments);return common.selection.prototype.attr.apply(getNodeEl(),args),tip2},tip2.style=function(n,v){if(arguments.length<2&&typeof n=="string")return getNodeEl().style(n);const args=Array.prototype.slice.call(arguments);return common.selection.prototype.style.apply(getNodeEl(),args),tip2},tip2.direction=function(v){return arguments.length?(direction=v==null?v:functor(v),tip2):direction},tip2.offset=function(v){return arguments.length?(offset=v==null?v:functor(v),tip2):offset},tip2.html=function(v){return arguments.length?(html=v==null?v:functor(v),tip2):html},tip2.rootElement=function(v){return arguments.length?(rootElement=functor(v),tip2):rootElement},tip2.destroy=function(){return node&&(getNodeEl().remove(),node=null),tip2};function d3TipDirection(){return"n"}function d3TipOffset(){return[0,0]}function d3TipHTML(){return" "}const directionCallbacks=common.map({n:directionNorth,s:directionSouth,e:directionEast,w:directionWest,nw:directionNorthWest,ne:directionNorthEast,sw:directionSouthWest,se:directionSouthEast}),directions=directionCallbacks.keys();function directionNorth(){const bbox=getScreenBBox(window);return{top:bbox.n.y-node.offsetHeight,left:bbox.n.x-node.offsetWidth/2}}function directionSouth(){const bbox=getScreenBBox(window);return{top:bbox.s.y+8,left:bbox.s.x-node.offsetWidth/2}}function directionEast(){const bbox=getScreenBBox(window);return{top:bbox.e.y-node.offsetHeight/2,left:bbox.e.x+8}}function directionWest(){const bbox=getScreenBBox(window);return{top:bbox.w.y-node.offsetHeight/2,left:bbox.w.x-node.offsetWidth-8}}function directionNorthWest(){const bbox=getScreenBBox(window);return{top:bbox.nw.y-node.offsetHeight,left:bbox.nw.x-node.offsetWidth}}function directionNorthEast(){const bbox=getScreenBBox(window);return{top:bbox.ne.y-node.offsetHeight,left:bbox.ne.x}}function directionSouthWest(){const bbox=getScreenBBox(window);return{top:bbox.sw.y,left:bbox.sw.x-node.offsetWidth}}function directionSouthEast(){const bbox=getScreenBBox(window);return{top:bbox.se.y,left:bbox.se.x}}function initNode(){const div=common.select(document.createElement("div"));return div.attr("class","d3-tip").style("position","absolute").style("top","0px").style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),div.node()}function getSVGNode(element){const svgNode=element.node();return svgNode?svgNode.tagName.toLowerCase()==="svg"?svgNode:svgNode.ownerSVGElement:null}function getNodeEl(){return node==null&&(node=initNode(),rootElement().appendChild(node)),common.select(node)}function getScreenBBox(targetShape){let targetel=target||targetShape;for(;targetel.getCTM==null&&targetel.parentNode!=null;)targetel=targetel.parentNode;const bbox={},matrix=targetel.getCTM(),tbbox=targetel.getBBox(),width=tbbox.width,height=tbbox.height,x=tbbox.x,y=tbbox.y;return point.x=x,point.y=y,bbox.nw=point.matrixTransform(matrix),point.x+=width,bbox.ne=point.matrixTransform(matrix),point.y+=height,bbox.se=point.matrixTransform(matrix),point.x-=width,bbox.sw=point.matrixTransform(matrix),point.y-=height/2,bbox.w=point.matrixTransform(matrix),point.x+=width,bbox.e=point.matrixTransform(matrix),point.x-=width/2,point.y-=height/2,bbox.n=point.matrixTransform(matrix),point.y+=height,bbox.s=point.matrixTransform(matrix),bbox}function functor(v){return typeof v=="function"?v:function(){return v}}return tip2}function ITooltip(){if(this.tooltip=tip(),this.tooltipLabelFormat_exists()&&(this._labelFormatter=common.format(this.tooltipLabelFormat())),this.tooltipValueFormat_exists()&&(this._valueFormatter=common.format(this.tooltipValueFormat())),this.layerEnter){const layerEnter=this.layerEnter;this.layerEnter=function(_base,svgElement,_domElement){this._parentOverlay||(this._parentOverlay=_base._parentOverlay),this.tooltipEnter(svgElement),layerEnter.apply(this,arguments)};const layerUpdate=this.layerUpdate;this.layerUpdate=function(_base){layerUpdate.apply(this,arguments),this.tooltipUpdate()};const layerExit=this.layerExit;this.layerExit=function(_base){this.tooltipExit(),layerExit.apply(this,arguments)}}else{const enter=this.enter;this.enter=function(_domNode,element){this.tooltipEnter(element),enter.apply(this,arguments)};const update=this.update;this.update=function(_domNode,_element){update.apply(this,arguments),this.tooltipUpdate()};const exit=this.exit;this.exit=function(_domNode,_element){this.tooltipExit(),exit.apply(this,arguments)}}}ITooltip.prototype=Object.create(common.Widget.prototype),ITooltip.prototype.constructor=ITooltip,ITooltip.prototype.tooltipEnter=function(element){const overlayElement=this.parentOverlay();overlayElement.empty()||this.tooltip.rootElement(overlayElement.node().parentNode),element.call(this.tooltip)},ITooltip.prototype.tooltipUpdate=function(){this.tooltip.offset(()=>{if(event&&this.tooltipFollowMouse()){const d3tipElement=document.querySelector(".d3-tip");return d3tipElement.style.display="block",d3tipElement.style.left=this.tooltipOffset()+event.clientX+"px",d3tipElement.style.top=event.clientY+"px",[]}switch(this.tooltip.direction()()){case"e":return[0,this.tooltipOffset()];default:return[-this.tooltipOffset(),0]}});let classed=this.tooltip.attr("class");classed&&(classed=classed.split(" notick").join("")+(this.tooltipTick()?"":" notick")+(this.tooltipStyle()==="none"?" hidden":""),classed=classed.split(" ").filter(function(_class){return _class.indexOf("ITooltip-tooltipStyle-")!==0}).join(" "),classed+=" ITooltip-tooltipStyle-"+this.tooltipStyle(),this.tooltip.attr("class",classed))},ITooltip.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},ITooltip.prototype._tooltipHTML=function(d){return d},ITooltip.prototype.tooltipHTML=function(_){return this.tooltip.html(_)},ITooltip.prototype.tooltipFormat=function(opts={}){switch(opts.label=opts.label===void 0?"":opts.label,this._labelFormatter?opts.label=this._labelFormatter(opts.label)||"":this.formatData&&this.parseData&&(opts.label=this.formatData(this.parseData(opts.label))),opts.series=opts.series||"",opts.value instanceof Date?opts.value=opts.value||"":this._valueFormatter?opts.value=this._valueFormatter(opts.value)||"":this.formatValue&&this.parseValue&&(opts.value=this.formatValue(this.parseValue(opts.value))),this.tooltipStyle()){case"none":break;case"series-table":let html='<table class="ITooltip-series-table"><thead><tr><th colspan="2">'+opts.label+"</th></tr></thead><tbody>";return opts.arr.forEach(function(row){html+="<tr>",html+="<td>",html+='<div class="series-table-row-color" style="background-color:'+row.color+'"></div>',html+='<div class="series-table-row-label">'+row.label+"</div>",html+="</td>",html+='<td><div class="series-table-row-value">'+row.value+"</div></td>",html+="</tr>"}),html+="</tbody>",html+="</table>",html;default:return opts.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+opts.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+opts.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+opts.value+"</span>":opts.label!==""?"<span style='color:"+this.tooltipLabelColor()+"'>"+opts.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+opts.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+opts.value+"</span>"}},ITooltip.prototype.tooltipKeyValueFormat=function(titleKey,obj){let body="";for(const key in obj)if(key!==titleKey){const value=obj&&obj[key]?obj[key]:"";body+=`<tr><td style="${this.tooltipLabelColor_exists()?"color:"+this.tooltipLabelColor():""}">${key}</td><td style="font-weight:normal">${value}</td></tr>`}return`<table>
|
|
2
|
-
<thead>
|
|
3
|
-
<tr><th colspan="2" style="font-weight:bold;font-size:16px">${obj[titleKey]}</th></tr>
|
|
4
|
-
</thead>
|
|
5
|
-
<tbody>
|
|
6
|
-
${body}
|
|
7
|
-
</tbody>
|
|
8
|
-
</table>`},ITooltip.prototype.publish("tooltipStyle","default","set","Style mode",["default","none","series-table"],{}),ITooltip.prototype.publish("tooltipFollowMouse",!1,"boolean","If true, the tooltip will follow mouse movement",null,{}),ITooltip.prototype.publish("tooltipLabelFormat",void 0,"string","Format of tooltip label(s) (the domain axis)",null,{}),ITooltip.prototype.publish("tooltipValueFormat",void 0,"string","Number format of tooltip value(s)",null,{}),ITooltip.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Color of tooltip series text",null,{}),ITooltip.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Color of tooltip label text (the domain axis)",null,{}),ITooltip.prototype.publish("tooltipValueColor","white","html-color","Color of tooltip value(s)",null,{}),ITooltip.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),ITooltip.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});const tooltipLabelFormat=ITooltip.prototype.tooltipLabelFormat;ITooltip.prototype.tooltipLabelFormat=function(_){const retVal=tooltipLabelFormat.apply(this,arguments);return arguments.length&&(this._labelFormatter=common.format(_)),retVal};const tooltipValueFormat=ITooltip.prototype.tooltipValueFormat;ITooltip.prototype.tooltipValueFormat=function(_){const retVal=tooltipValueFormat.apply(this,arguments);return arguments.length&&(this._valueFormatter=common.format(_)),retVal};function ITree(){}ITree.prototype.constructor=ITree,ITree.prototype.click=function(row,column,selected){},ITree.prototype.dblclick=function(row,column,selected){},ITree.prototype._palette=common.Palette.ordinal("default"),exports2.BUILD_VERSION=BUILD_VERSION,exports2.I1DChart=I1DChart,exports2.I2DAggrChart=I2DAggrChart,exports2.I2DChart=I2DChart,exports2.IGraph=IGraph,exports2.IInput=IInput,exports2.INDChart=INDChart,exports2.ITooltip=ITooltip,exports2.ITree=ITree,exports2.PKG_NAME=PKG_NAME,exports2.PKG_VERSION=PKG_VERSION,exports2.instanceOfIHighlight=instanceOfIHighlight,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],o):o((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,o){"use strict";var e=Object.defineProperty,l=(t,o)=>e(t,"name",{value:o,configurable:!0});function i(){}function n(){}function r(){}function p(){}function s(t){return"function"==typeof t.highlightColumn}function a(){}function u(){}function c(){let t=c,e=f,i=h,n=T(document.body),r=k(),p=null,s=null,a=null;const u=l(function(t){if(p=F(t),!p)return;s=p.createSVGPoint();const o=n();o&&r&&o.appendChild(r)},"tip2");function c(){return"n"}function f(){return[0,0]}function h(){return" "}u.show=function(t,o,l){a=l[o];const r=Array.prototype.slice.call(arguments),p=i.apply(this,r);if(null===p)return u;const s=e.apply(this,r),c=E();let f,h=d.length;const b=n().getBoundingClientRect();for(c.html(p).style("opacity",1).style("pointer-events","all");h--;)c.classed(d[h],!1);let m=!1;const g={};let v=d[0];for(let e=0;e<d.length&&(m=C(d[e]),!m);e++);if(m)c.classed("notick",!1);else{c.classed("notick",!0);const t=w(g[v]),o=x(g[v]);C(v,t,o)}return u;function x(t){return t.left>t.right?t.left>0?-t.left:0:t.right>0?t.right:0}function w(t){return t.top>t.bottom?t.top>0?-t.top:0:t.bottom}function C(t,o,e){o=o||0,e=e||0,c.style("white-space","nowrap"),f=y.get(t).apply(this),c.classed(t,!0).style("top",f.top+s[0]-o+"px").style("left",f.left+s[1]-e+"px");const l=c.node().getBoundingClientRect(),i=l.top>b.top&&l.left>b.left&&l.bottom<b.bottom&&l.right<b.right;return g[t]={top:b.top-l.top,right:l.right-b.right,bottom:l.bottom-b.bottom,left:b.left-l.left},c.style("white-space","normal"),g[t].total_overflow=Object.keys(g[t]).filter(o=>g[t][o]>0).reduce((o,e)=>o+g[t][e],0),g[v].total_overflow>g[t].total_overflow&&(v=t),i||c.classed(t,!1),i}},u.hide=function(){return E().style("opacity",0).style("pointer-events","none"),u},u.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return E().attr(t);const l=Array.prototype.slice.call(arguments);return o.selection.prototype.attr.apply(E(),l),u},u.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return E().style(t);const l=Array.prototype.slice.call(arguments);return o.selection.prototype.style.apply(E(),l),u},u.direction=function(o){return arguments.length?(t=null==o?o:T(o),u):t},u.offset=function(t){return arguments.length?(e=null==t?t:T(t),u):e},u.html=function(t){return arguments.length?(i=null==t?t:T(t),u):i},u.rootElement=function(t){return arguments.length?(n=T(t),u):n},u.destroy=function(){return r&&(E().remove(),r=null),u},l(c,"d3TipDirection"),l(f,"d3TipOffset"),l(h,"d3TipHTML");const y=o.map({n:b,s:m,e:g,w:v,nw:x,ne:w,sw:C,se:_}),d=y.keys();function b(){const t=I(window);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}}function m(){const t=I(window);return{top:t.s.y+8,left:t.s.x-r.offsetWidth/2}}function g(){const t=I(window);return{top:t.e.y-r.offsetHeight/2,left:t.e.x+8}}function v(){const t=I(window);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth-8}}function x(){const t=I(window);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}}function w(){const t=I(window);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}}function C(){const t=I(window);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}}function _(){const t=I(window);return{top:t.se.y,left:t.se.x}}function k(){const t=o.select(document.createElement("div"));return t.attr("class","d3-tip").style("position","absolute").style("top","0px").style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function F(t){const o=t.node();return o?"svg"===o.tagName.toLowerCase()?o:o.ownerSVGElement:null}function E(){return null==r&&(r=k(),n().appendChild(r)),o.select(r)}function I(t){let o=a||t;for(;null==o.getCTM&&null!=o.parentNode;)o=o.parentNode;const e={},l=o.getCTM(),i=o.getBBox(),n=i.width,r=i.height,p=i.x,u=i.y;return s.x=p,s.y=u,e.nw=s.matrixTransform(l),s.x+=n,e.ne=s.matrixTransform(l),s.y+=r,e.se=s.matrixTransform(l),s.x-=n,e.sw=s.matrixTransform(l),s.y-=r/2,e.w=s.matrixTransform(l),s.x+=n,e.e=s.matrixTransform(l),s.x-=n/2,s.y-=r/2,e.n=s.matrixTransform(l),s.y+=r,e.s=s.matrixTransform(l),e}function T(t){return"function"==typeof t?t:function(){return t}}return l(b,"directionNorth"),l(m,"directionSouth"),l(g,"directionEast"),l(v,"directionWest"),l(x,"directionNorthWest"),l(w,"directionNorthEast"),l(C,"directionSouthWest"),l(_,"directionSouthEast"),l(k,"initNode"),l(F,"getSVGNode"),l(E,"getNodeEl"),l(I,"getScreenBBox"),l(T,"functor"),u}function f(){if(this.tooltip=c(),this.tooltipLabelFormat_exists()&&(this._labelFormatter=o.format(this.tooltipLabelFormat())),this.tooltipValueFormat_exists()&&(this._valueFormatter=o.format(this.tooltipValueFormat())),this.layerEnter){const t=this.layerEnter;this.layerEnter=function(o,e,l){this._parentOverlay||(this._parentOverlay=o._parentOverlay),this.tooltipEnter(e),t.apply(this,arguments)};const o=this.layerUpdate;this.layerUpdate=function(t){o.apply(this,arguments),this.tooltipUpdate()};const e=this.layerExit;this.layerExit=function(t){this.tooltipExit(),e.apply(this,arguments)}}else{const t=this.enter;this.enter=function(o,e){this.tooltipEnter(e),t.apply(this,arguments)};const o=this.update;this.update=function(t,e){o.apply(this,arguments),this.tooltipUpdate()};const e=this.exit;this.exit=function(t,o){this.tooltipExit(),e.apply(this,arguments)}}}l(i,"I1DChart"),i.prototype._dataFamily="1D",i.prototype._palette=o.Palette.rainbow("default"),i.prototype.click=function(t,o,e){},i.prototype.dblclick=function(t,o,e){},l(n,"I2DChart"),n.prototype._dataFamily="2D",n.prototype._palette=o.Palette.ordinal("default"),n.prototype.fillColor=function(t,o,e,l){return this._palette(t[0])},n.prototype.strokeColor=function(t,e,l,i){return o.hsl(this.fillColor(t,e,l,i)).darker().toString()},n.prototype.textColor=function(t,e,l,i){return o.Palette.textColor(this.fillColor(t,e,l,i))},n.prototype.click=function(t,o,e){},n.prototype.dblclick=function(t,o,e){},l(r,"I2DAggrChart"),r.prototype._palette=o.Palette.rainbow("default"),r.prototype.fillColor=function(t,o,e){return this._palette(t.length)},r.prototype.strokeColor=function(t,e,l){return o.hsl(this.fillColor(t,e,l)).darker().toString()},r.prototype.textColor=function(t,e,l){return o.Palette.textColor(this.fillColor(t,e,l))},r.prototype.click=function(t,o,e){},r.prototype.dblclick=function(t,o,e){},l(p,"IGraph"),p.prototype._dataFamily="graph",p.prototype.vertex_click=function(t,o,e,l){l&&l.vertex},p.prototype.vertex_dblclick=function(t,o,e,l){l&&l.vertex},p.prototype.edge_click=function(t,o,e,l){l&&l.edge},p.prototype.edge_dblclick=function(t,o,e,l){l&&l.edge},l(s,"instanceOfIHighlight"),l(a,"IInput"),a.prototype=Object.create(o.Widget.prototype),a.prototype.constructor=a,a.prototype.isValid=function(){if(this.validate()){if(!new RegExp(this.validate()).test(this.value()))return!1}return!0},a.prototype.hasValue=function(){if("function"==typeof this.type){switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1}return""!==this.value()},a.prototype.blur=function(t){},a.prototype.keyup=function(t){},a.prototype.focus=function(t){},a.prototype.click=function(t){},a.prototype.dblclick=function(t){},a.prototype.change=function(t,o){},a.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},a.prototype.disable=function(t){this._inputElement.forEach(function(o,e){o.attr("disabled",t?"disabled":null)})},a.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},a.prototype.publish("name","","string","HTML name for the input"),a.prototype.publish("label","","string","Descriptive label"),a.prototype.publish("value","","string","Input Current Value"),a.prototype.publish("validate",null,"string","Input Validation"),l(u,"INDChart"),u.prototype._dataFamily="ND",u.prototype._palette=o.Palette.ordinal("default"),u.prototype.fillColor=function(t,o,e,l){return this._palette(o)},u.prototype.strokeColor=function(t,e,l,i){return o.hsl(this.fillColor(t,e,l,i)).darker().toString()},u.prototype.textColor=function(t,e,l,i){return o.Palette.textColor(this.fillColor(t,e,l,i))},u.prototype.click=function(t,o,e){},u.prototype.dblclick=function(t,o,e){},l(c,"tip"),l(f,"ITooltip"),f.prototype=Object.create(o.Widget.prototype),f.prototype.constructor=f,f.prototype.tooltipEnter=function(t){const o=this.parentOverlay();o.empty()||this.tooltip.rootElement(o.node().parentNode),t.call(this.tooltip)},f.prototype.tooltipUpdate=function(){this.tooltip.offset(()=>{if(event&&this.tooltipFollowMouse()){const t=document.querySelector(".d3-tip");return t.style.display="block",t.style.left=this.tooltipOffset()+event.clientX+"px",t.style.top=event.clientY+"px",[]}return"e"===this.tooltip.direction()()?[0,this.tooltipOffset()]:[-this.tooltipOffset(),0]});let t=this.tooltip.attr("class");t&&(t=t.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":""),t=t.split(" ").filter(function(t){return 0!==t.indexOf("ITooltip-tooltipStyle-")}).join(" "),t+=" ITooltip-tooltipStyle-"+this.tooltipStyle(),this.tooltip.attr("class",t))},f.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},f.prototype._tooltipHTML=function(t){return t},f.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},f.prototype.tooltipFormat=function(t={}){switch(t.label=void 0===t.label?"":t.label,this._labelFormatter?t.label=this._labelFormatter(t.label)||"":this.formatData&&this.parseData&&(t.label=this.formatData(this.parseData(t.label))),t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":this._valueFormatter?t.value=this._valueFormatter(t.value)||"":this.formatValue&&this.parseValue&&(t.value=this.formatValue(this.parseValue(t.value))),this.tooltipStyle()){case"none":break;case"series-table":let o='<table class="ITooltip-series-table"><thead><tr><th colspan="2">'+t.label+"</th></tr></thead><tbody>";return t.arr.forEach(function(t){o+="<tr>",o+="<td>",o+='<div class="series-table-row-color" style="background-color:'+t.color+'"></div>',o+='<div class="series-table-row-label">'+t.label+"</div>",o+="</td>",o+='<td><div class="series-table-row-value">'+t.value+"</div></td>",o+="</tr>"}),o+="</tbody>",o+="</table>",o;default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},f.prototype.tooltipKeyValueFormat=function(t,o){let e="";for(const l in o)if(l!==t){const t=o&&o[l]?o[l]:"";e+=`<tr><td style="${this.tooltipLabelColor_exists()?"color:"+this.tooltipLabelColor():""}">${l}</td><td style="font-weight:normal">${t}</td></tr>`}return`<table>\n <thead>\n <tr><th colspan="2" style="font-weight:bold;font-size:16px">${o[t]}</th></tr>\n </thead>\n <tbody>\n ${e}\n </tbody>\n </table>`},f.prototype.publish("tooltipStyle","default","set","Style mode",["default","none","series-table"],{}),f.prototype.publish("tooltipFollowMouse",!1,"boolean","If true, the tooltip will follow mouse movement",null,{}),f.prototype.publish("tooltipLabelFormat",void 0,"string","Format of tooltip label(s) (the domain axis)",null,{}),f.prototype.publish("tooltipValueFormat",void 0,"string","Number format of tooltip value(s)",null,{}),f.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Color of tooltip series text",null,{}),f.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Color of tooltip label text (the domain axis)",null,{}),f.prototype.publish("tooltipValueColor","white","html-color","Color of tooltip value(s)",null,{}),f.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),f.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});const h=f.prototype.tooltipLabelFormat;f.prototype.tooltipLabelFormat=function(t){const e=h.apply(this,arguments);return arguments.length&&(this._labelFormatter=o.format(t)),e};const y=f.prototype.tooltipValueFormat;function d(){}f.prototype.tooltipValueFormat=function(t){const e=y.apply(this,arguments);return arguments.length&&(this._valueFormatter=o.format(t)),e},l(d,"ITree"),d.prototype.constructor=d,d.prototype.click=function(t,o,e){},d.prototype.dblclick=function(t,o,e){},d.prototype._palette=o.Palette.ordinal("default"),t.BUILD_VERSION="3.2.1",t.I1DChart=i,t.I2DAggrChart=r,t.I2DChart=n,t.IGraph=p,t.IInput=a,t.INDChart=u,t.ITooltip=f,t.ITree=d,t.PKG_NAME="@hpcc-js/api",t.PKG_VERSION="3.2.0",t.instanceOfIHighlight=s,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
|
9
2
|
//# sourceMappingURL=index.umd.cjs.map
|
|
10
|
-
|
|
3
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.d3-tip{line-height:1;font-weight:700;padding:12px;background:#000000a8;color:#fff;border-radius:2px;pointer-events:none!important;z-index:10}.d3-tip.hidden{visibility:hidden}.d3-tip:after{content:" ";box-sizing:border-box;display:inline-block;border:4px solid rgba(0,0,0,.66);position:absolute;pointer-events:none!important;width:8px;height:8px;margin:0}.d3-tip.n:after{top:100%;left:calc(50% - 4px);border-top-width:8px;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.d3-tip.e:after{top:calc(50% - 4px);left:-12px;border-top-color:transparent;border-right-width:8px;border-bottom-color:transparent;border-left-color:transparent}.d3-tip.s{margin-top:8px}.d3-tip.s:after{top:-12px;left:calc(50% - 4px);border-top-color:transparent;border-right-color:transparent;border-bottom-width:8px;border-left-color:transparent}.d3-tip.w:after{top:calc(50% - 4px);left:100%;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-width:8px}.d3-tip.notick:after{border-color:transparent!important}.common_Widget .over{stroke:#000000a8;opacity:.66}.d3-tip.ITooltip-tooltipStyle-series-table{padding:0}.d3-tip .ITooltip-series-table th,.d3-tip .ITooltip-series-table td{padding:6px;text-align:left;border:1px solid #D1D1D1}.d3-tip .ITooltip-series-table .series-table-row-color{display:inline-block;height:10px;width:10px;margin-right:10px}.d3-tip .ITooltip-series-table .series-table-row-label{display:inline-block}.d3-tip .ITooltip-series-table th{background-color:#b3b3b3}.d3-tip .ITooltip-series-table td{background-color:#fff;color:#555;font-weight:400}.d3-tip .ITooltip-series-table td:first-child{border-right:0}table.ITooltip-series-table td:last-child{border-left:1px dotted #A3A3A3}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
package/dist/index.umd.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/api\";\nexport const PKG_VERSION = \"3.2.0\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"names":["Palette","d3Hsl","Widget","tip","i","selection","map","select","d3Format"],"mappings":"wWAAO,MAAM,SAAW,eACX,YAAc,QACd,cAAgB,QCAtB,SAAS,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAWA,eAAQ,QAAQ,SAAS,EAGvD,SAAS,UAAU,MAAQ,SAAU,IAAK,OAAQ,SAAU,CAC5D,EAEA,SAAS,UAAU,SAAW,SAAU,IAAK,OAAQ,SAAU,CAC/D,ECTO,SAAS,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAWA,eAAQ,QAAQ,SAAS,EAEvD,SAAS,UAAU,UAAY,SAAU,IAAY,OAAQ,MAAO,QAAiB,CACjF,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAC/B,EAEA,SAAS,UAAU,YAAc,SAAU,IAAY,OAAQ,MAAO,QAAiB,CACnF,OAAOC,WAAM,KAAK,UAAU,IAAK,OAAQ,MAAO,OAAO,CAAC,EAAE,OAAA,EAAS,SAAA,CACvE,EAEA,S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W,SAAU,oCAAqC,KAAM,EAAE,EACnH,SAAS,UAAU,QAAQ,qBAAsB,UAAW,aAAc,+BAAgC,KAAM,EAAE,EAClH,SAAS,UAAU,QAAQ,oBAAqB,UAAW,aAAc,gDAAiD,KAAM,EAAE,EAClI,SAAS,UAAU,QAAQ,oBAAqB,QAAS,aAAc,4BAA6B,KAAM,EAAE,EAC5G,SAAS,UAAU,QAAQ,cAAe,GAAM,UAAW,oBAAqB,KAAM,EAAE,EACxF,SAAS,UAAU,QAAQ,gBAAiB,EAAG,SAAU,yBAA0B,KAAM,EAAE,EAE3F,MAAM,mBAAqB,SAAS,UAAU,mBAC9C,SAAS,UAAU,mBAAqB,SAAU,EAAuB,CACrE,MAAM,OAAS,mBAAmB,MAAM,KAAM,SAAS,EACvD,OAAI,UAAU,SACV,KAAK,gBAAkBM,OAAAA,OAAS,CAAC,GAE9B,MACX,EAEA,MAAM,mBAAqB,SAAS,UAAU,mBAC9C,SAAS,UAAU,mBAAqB,SAAU,EAAuB,CACrE,MAAM,OAAS,mBAAmB,MAAM,KAAM,SAAS,EACvD,OAAI,UAAU,SACV,KAAK,gBAAkBA,OAAAA,OAAS,CAAC,GAE9B,MACX,EC7NO,SAAS,OAAQ,CACxB,CACA,MAAM,UAAU,YAAc,MAG9B,MAAM,UAAU,MAAQ,SAAU,IAAK,OAAQ,SAAU,CACzD,EAEA,MAAM,UAAU,SAAW,SAAU,IAAK,OAAQ,SAAU,CAC5D,EAEA,MAAM,UAAU,SAAWR,eAAQ,QAAQ,SAAS"}
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","sources":["../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts","../src/__package__.ts"],"sourcesContent":["import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n","export const PKG_NAME = \"@hpcc-js/api\";\nexport const PKG_VERSION = \"3.2.0\";\nexport const BUILD_VERSION = \"3.2.1\";\n"],"names":["I1DChart","I2DChart","I2DAggrChart","IGraph","instanceOfIHighlight","w","highlightColumn","IInput","INDChart","tip","direction","d3TipDirection","offset","d3TipOffset","html","d3TipHTML","rootElement","functor","document","body","node","initNode","svg","point","target","vis","getSVGNode","createSVGPoint","re","appendChild","show","d","idx","arr","args","Array","prototype","slice","call","arguments","content","apply","this","poffset","nodel","getNodeEl","coords","i","directions","length","root_bbox","getBoundingClientRect","style","classed","placement_success","placement_overflow","least_overflow_direction","_placement_attempt","top_offset","_vertical_adjustment","left_offset","_horizontal_adjustment","overflow_obj","left","right","top","bottom","_dir","_top_offset","_left_offset","directionCallbacks","get","nodel_bbox","ret","total_overflow","Object","keys","filter","side","reduce","sum","hide","attr","n","v","selection","destroy","remove","__name","map","directionNorth","s","directionSouth","e","directionEast","directionWest","nw","directionNorthWest","ne","directionNorthEast","sw","directionSouthWest","se","directionSouthEast","bbox","getScreenBBox","window","y","offsetHeight","x","offsetWidth","div","select","createElement","element","svgNode","tagName","toLowerCase","ownerSVGElement","targetShape","targetel","getCTM","parentNode","matrix","tbbox","getBBox","width","height","matrixTransform","ITooltip","tooltip","tooltipLabelFormat_exists","_labelFormatter","d3Format","tooltipLabelFormat","tooltipValueFormat_exists","_valueFormatter","tooltipValueFormat","layerEnter","_base","svgElement","_domElement","_parentOverlay","tooltipEnter","layerUpdate","tooltipUpdate","layerExit","tooltipExit","enter","_domNode","update","_element","exit","_dataFamily","_palette","Palette","rainbow","click","row","column","selected","dblclick","ordinal","fillColor","value","origRow","strokeColor","d3Hsl","darker","toString","textColor","vertex_click","_row","_col","_sel","more","vertex","vertex_dblclick","edge_click","edge","edge_dblclick","create","Widget","constructor","isValid","validate","RegExp","test","hasValue","type","blur","_w","keyup","focus","change","complete","resetValue","_inputElement","disable","forEach","setFocus","publish","overlayElement","parentOverlay","empty","event","tooltipFollowMouse","d3tipElement","querySelector","display","tooltipOffset","clientX","clientY","split","join","tooltipTick","tooltipStyle","_class","indexOf","_tooltipHTML","tooltipHTML","_","tooltipFormat","opts","label","formatData","parseData","series","Date","formatValue","parseValue","color","tooltipSeriesColor","tooltipLabelColor","tooltipValueColor","tooltipKeyValueFormat","titleKey","obj","key","tooltipLabelColor_exists","retVal","ITree"],"mappings":"qYAEO,SAASA,IAChB,CCAO,SAASC,IAChB,CCDO,SAASC,IAChB,CCJO,SAASC,IAChB,CCGO,SAASC,EAAqBC,GACjC,MAA6C,mBAA9BA,EAAUC,eAC7B,CCHO,SAASC,IAChB,CCDO,SAASC,IAChB,CCCO,SAASC,IACZ,IAAIC,EAAYC,EACZC,EAASC,EACTC,EAAOC,EACPC,EAAcC,EAAQC,SAASC,MAC/BC,EAAOC,IACPC,EAAM,KACNC,EAAQ,KACRC,EAAS,KAEb,MAAMf,aAAqBgB,GAEvB,GADAH,EAAMI,EAAWD,IACZH,EAAK,OACVC,EAAQD,EAAIK,iBACZ,MAAMC,EAAKZ,IACNY,GACAR,GACLQ,EAAGC,YAAYT,EACnB,EARiB,QAyMjB,SAAST,IAAmB,MAAO,GAAK,CACxC,SAASE,IAAgB,MAAO,CAAC,EAAG,EAAI,CACxC,SAASE,IAAc,MAAO,GAAK,CA9LnCN,EAAIqB,KAAO,SAAUC,EAAGC,EAAKC,GACzBT,EAASS,EAAID,GACb,MAAME,EAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WAClCC,EAAU1B,EAAK2B,MAAMC,KAAMR,GACjC,GAAgB,OAAZM,EACA,OAAO/B,EAEX,MAAMkC,EAAU/B,EAAO6B,MAAMC,KAAMR,GAC7BU,EAAQC,IACd,IACIC,EADAC,EAAIC,EAAWC,OAEnB,MAAMC,EAAYlC,IAAcmC,wBAIhC,IAHAP,EAAM9B,KAAK0B,GACNY,MAAM,UAAW,GAAGA,MAAM,iBAAkB,OAE1CL,KAAKH,EAAMS,QAAQ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EAEAiF,EAAM7M,UAAU6H,SAAW,SAAUH,EAAKC,EAAQC,GAClD,EAEAiF,EAAM7M,UAAUsH,SAAWC,UAAQO,QAAQ,2BCZd,wHAFL,6BACG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/api",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.10",
|
|
4
4
|
"description": "hpcc-js - Viz api",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"update-major": "npx --yes npm-check-updates -u"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@hpcc-js/common": "^3.
|
|
40
|
+
"@hpcc-js/common": "^3.4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@hpcc-js/esbuild-plugins": "^1.
|
|
43
|
+
"@hpcc-js/esbuild-plugins": "^1.5.0",
|
|
44
44
|
"d3-collection": "^1",
|
|
45
45
|
"d3-color": "3.1.0",
|
|
46
46
|
"d3-format": "^1",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
58
58
|
},
|
|
59
59
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "e0dd2c2201ba3d9bd92665026ef38e3220065a9c"
|
|
61
61
|
}
|