@hpcc-js/api 2.9.2 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +209 -242
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +209 -242
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -16
- package/dist/index.min.js.map +1 -1
- package/package.json +3 -3
- package/src/IInput.ts +59 -59
- package/src/ITooltip.ts +140 -145
- package/src/ITree.ts +10 -8
- package/src/__package__.ts +2 -2
- package/types/IInput.d.ts +5 -17
- package/types/IInput.d.ts.map +1 -1
- package/types/ITooltip.d.ts +5 -26
- package/types/ITooltip.d.ts.map +1 -1
- package/types/ITree.d.ts +1 -5
- package/types/ITree.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/IInput.d.ts +5 -17
- package/types-3.4/ITooltip.d.ts +5 -26
- package/types-3.4/ITree.d.ts +1 -5
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
})(this, (function (exports, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/api";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.10.0";
|
|
9
|
+
var BUILD_VERSION = "2.103.0";
|
|
10
10
|
|
|
11
11
|
function I1DChart() {
|
|
12
12
|
}
|
|
@@ -76,100 +76,69 @@
|
|
|
76
76
|
return typeof w.highlightColumn === "function";
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
83
|
-
purpose with or without fee is hereby granted.
|
|
84
|
-
|
|
85
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
86
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
87
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
88
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
89
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
90
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
91
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
92
|
-
***************************************************************************** */
|
|
93
|
-
/* global Reflect, Promise */
|
|
94
|
-
|
|
95
|
-
var extendStatics = function(d, b) {
|
|
96
|
-
extendStatics = Object.setPrototypeOf ||
|
|
97
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
98
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
99
|
-
return extendStatics(d, b);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
function __extends(d, b) {
|
|
103
|
-
if (typeof b !== "function" && b !== null)
|
|
104
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
105
|
-
extendStatics(d, b);
|
|
106
|
-
function __() { this.constructor = d; }
|
|
107
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
79
|
+
// Use old school class declaration as this is a mixin ---
|
|
80
|
+
function IInput() {
|
|
108
81
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (this.
|
|
118
|
-
var re = new RegExp(this.validate());
|
|
119
|
-
if (!re.test(this.value())) {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return true;
|
|
124
|
-
};
|
|
125
|
-
IInput.prototype.hasValue = function () {
|
|
126
|
-
if (typeof this.type === "function") {
|
|
127
|
-
switch (this.type()) {
|
|
128
|
-
case "radio":
|
|
129
|
-
/* falls through */
|
|
130
|
-
case "checkbox":
|
|
131
|
-
if (this.value() && this.value() !== "false") {
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
break;
|
|
135
|
-
default:
|
|
136
|
-
if (this.value()) {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
82
|
+
IInput.prototype = Object.create(common.Widget.prototype);
|
|
83
|
+
IInput.prototype.constructor = IInput;
|
|
84
|
+
// abstract target(): any;
|
|
85
|
+
// abstract target(_: any): this;
|
|
86
|
+
// Implementation ---
|
|
87
|
+
IInput.prototype.isValid = function () {
|
|
88
|
+
if (this.validate()) {
|
|
89
|
+
var re = new RegExp(this.validate());
|
|
90
|
+
if (!re.test(this.value())) {
|
|
141
91
|
return false;
|
|
142
92
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
IInput.prototype.disable = function (disable) {
|
|
162
|
-
this._inputElement.forEach(function (e, idx) {
|
|
163
|
-
e.attr("disabled", disable ? "disabled" : null);
|
|
164
|
-
});
|
|
165
|
-
};
|
|
166
|
-
IInput.prototype.setFocus = function () {
|
|
167
|
-
if (this._inputElement.length) {
|
|
168
|
-
this._inputElement[0].node().focus();
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
};
|
|
96
|
+
IInput.prototype.hasValue = function () {
|
|
97
|
+
if (typeof this.type === "function") {
|
|
98
|
+
switch (this.type()) {
|
|
99
|
+
case "radio":
|
|
100
|
+
/* falls through */
|
|
101
|
+
case "checkbox":
|
|
102
|
+
if (this.value() && this.value() !== "false") {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
default:
|
|
107
|
+
if (this.value()) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
169
111
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
return this.value() !== "";
|
|
115
|
+
};
|
|
116
|
+
// Events ---
|
|
117
|
+
IInput.prototype.blur = function (_w) {
|
|
118
|
+
};
|
|
119
|
+
IInput.prototype.keyup = function (_w) {
|
|
120
|
+
};
|
|
121
|
+
IInput.prototype.focus = function (_w) {
|
|
122
|
+
};
|
|
123
|
+
IInput.prototype.click = function (_w) {
|
|
124
|
+
};
|
|
125
|
+
IInput.prototype.dblclick = function (_w) {
|
|
126
|
+
};
|
|
127
|
+
IInput.prototype.change = function (_w, complete) {
|
|
128
|
+
};
|
|
129
|
+
IInput.prototype.resetValue = function (w) {
|
|
130
|
+
w.value(w._inputElement[0].node().value);
|
|
131
|
+
};
|
|
132
|
+
IInput.prototype.disable = function (disable) {
|
|
133
|
+
this._inputElement.forEach(function (e, idx) {
|
|
134
|
+
e.attr("disabled", disable ? "disabled" : null);
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
IInput.prototype.setFocus = function () {
|
|
138
|
+
if (this._inputElement.length) {
|
|
139
|
+
this._inputElement[0].node().focus();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
173
142
|
IInput.prototype.publish("name", "", "string", "HTML name for the input");
|
|
174
143
|
IInput.prototype.publish("label", "", "string", "Descriptive label");
|
|
175
144
|
IInput.prototype.publish("value", "", "string", "Input Current Value");
|
|
@@ -580,152 +549,151 @@
|
|
|
580
549
|
var css_248z = ".d3-tip{background:rgba(0,0,0,.66);border-radius:2px;color:#fff;font-weight:700;line-height:1;padding:12px;pointer-events:none!important;z-index:10}.d3-tip.hidden{visibility:hidden}.d3-tip:after{border:4px solid rgba(0,0,0,.66);box-sizing:border-box;content:\" \";display:inline-block;height:8px;margin:0;pointer-events:none!important;position:absolute;width:8px}.d3-tip.n:after{border-right-color:transparent;border-top-width:8px;left:calc(50% - 4px);top:100%}.d3-tip.e:after,.d3-tip.n:after{border-bottom-color:transparent;border-left-color:transparent}.d3-tip.e:after{border-right-width:8px;border-top-color:transparent;left:-12px;top:calc(50% - 4px)}.d3-tip.s{margin-top:8px}.d3-tip.s:after{border-bottom-width:8px;border-left-color:transparent;left:calc(50% - 4px);top:-12px}.d3-tip.s:after,.d3-tip.w:after{border-right-color:transparent;border-top-color:transparent}.d3-tip.w:after{border-bottom-color:transparent;border-left-width:8px;left:100%;top:calc(50% - 4px)}.d3-tip.notick:after{border-color:transparent!important}.common_Widget .over{stroke:rgba(0,0,0,.66);opacity:.66}.d3-tip.ITooltip-tooltipStyle-series-table{padding:0}.d3-tip .ITooltip-series-table td,.d3-tip .ITooltip-series-table th{border:1px solid #d1d1d1;padding:6px;text-align:left}.d3-tip .ITooltip-series-table .series-table-row-color{display:inline-block;height:10px;margin-right:10px;width: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}";
|
|
581
550
|
styleInject(css_248z);
|
|
582
551
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (!this._parentOverlay) {
|
|
593
|
-
this._parentOverlay = _base._parentOverlay;
|
|
594
|
-
}
|
|
595
|
-
this.tooltipEnter(svgElement);
|
|
596
|
-
layerEnter_1.apply(this, arguments);
|
|
597
|
-
};
|
|
598
|
-
var layerUpdate_1 = _this.layerUpdate;
|
|
599
|
-
_this.layerUpdate = function (_base) {
|
|
600
|
-
layerUpdate_1.apply(this, arguments);
|
|
601
|
-
this.tooltipUpdate();
|
|
602
|
-
};
|
|
603
|
-
var layerExit_1 = _this.layerExit;
|
|
604
|
-
_this.layerExit = function (_base) {
|
|
605
|
-
this.tooltipExit();
|
|
606
|
-
layerExit_1.apply(this, arguments);
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
else {
|
|
610
|
-
var enter_1 = _this.enter;
|
|
611
|
-
_this.enter = function (_domNode, element) {
|
|
612
|
-
this.tooltipEnter(element);
|
|
613
|
-
enter_1.apply(this, arguments);
|
|
614
|
-
};
|
|
615
|
-
var update_1 = _this.update;
|
|
616
|
-
_this.update = function (_domNode, _element) {
|
|
617
|
-
update_1.apply(this, arguments);
|
|
618
|
-
this.tooltipUpdate();
|
|
619
|
-
};
|
|
620
|
-
var exit_1 = _this.exit;
|
|
621
|
-
_this.exit = function (_domNode, _element) {
|
|
622
|
-
this.tooltipExit();
|
|
623
|
-
exit_1.apply(this, arguments);
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
return _this;
|
|
627
|
-
}
|
|
628
|
-
ITooltip.prototype.tooltipEnter = function (element) {
|
|
629
|
-
var overlayElement = this.parentOverlay();
|
|
630
|
-
if (!overlayElement.empty()) {
|
|
631
|
-
this.tooltip.rootElement(overlayElement.node().parentNode);
|
|
632
|
-
}
|
|
633
|
-
element.call(this.tooltip);
|
|
634
|
-
};
|
|
635
|
-
ITooltip.prototype.tooltipUpdate = function () {
|
|
636
|
-
var _this = this;
|
|
637
|
-
this.tooltip.offset(function () {
|
|
638
|
-
if (event && _this.tooltipFollowMouse()) {
|
|
639
|
-
var d3tipElement = document.querySelector(".d3-tip"); // d3Tip offers no reference to the '.d3-tip' element...?
|
|
640
|
-
d3tipElement.style.display = "block";
|
|
641
|
-
d3tipElement.style.left = _this.tooltipOffset() + (event.clientX) + "px";
|
|
642
|
-
d3tipElement.style.top = event.clientY + "px";
|
|
643
|
-
return [];
|
|
644
|
-
}
|
|
645
|
-
switch (_this.tooltip.direction()()) {
|
|
646
|
-
case "e":
|
|
647
|
-
return [0, _this.tooltipOffset()];
|
|
648
|
-
default:
|
|
649
|
-
return [-_this.tooltipOffset(), 0];
|
|
552
|
+
// Use old school class declaration as this is a mixin ---
|
|
553
|
+
function ITooltip() {
|
|
554
|
+
this.tooltip = tip();
|
|
555
|
+
this._valueFormatter = common.format(this.tooltipValueFormat());
|
|
556
|
+
if (this.layerEnter) {
|
|
557
|
+
var layerEnter_1 = this.layerEnter;
|
|
558
|
+
this.layerEnter = function (_base, svgElement, _domElement) {
|
|
559
|
+
if (!this._parentOverlay) {
|
|
560
|
+
this._parentOverlay = _base._parentOverlay;
|
|
650
561
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
this.
|
|
662
|
-
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
562
|
+
this.tooltipEnter(svgElement);
|
|
563
|
+
layerEnter_1.apply(this, arguments);
|
|
564
|
+
};
|
|
565
|
+
var layerUpdate_1 = this.layerUpdate;
|
|
566
|
+
this.layerUpdate = function (_base) {
|
|
567
|
+
layerUpdate_1.apply(this, arguments);
|
|
568
|
+
this.tooltipUpdate();
|
|
569
|
+
};
|
|
570
|
+
var layerExit_1 = this.layerExit;
|
|
571
|
+
this.layerExit = function (_base) {
|
|
572
|
+
this.tooltipExit();
|
|
573
|
+
layerExit_1.apply(this, arguments);
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
var enter_1 = this.enter;
|
|
578
|
+
this.enter = function (_domNode, element) {
|
|
579
|
+
this.tooltipEnter(element);
|
|
580
|
+
enter_1.apply(this, arguments);
|
|
581
|
+
};
|
|
582
|
+
var update_1 = this.update;
|
|
583
|
+
this.update = function (_domNode, _element) {
|
|
584
|
+
update_1.apply(this, arguments);
|
|
585
|
+
this.tooltipUpdate();
|
|
586
|
+
};
|
|
587
|
+
var exit_1 = this.exit;
|
|
588
|
+
this.exit = function (_domNode, _element) {
|
|
589
|
+
this.tooltipExit();
|
|
590
|
+
exit_1.apply(this, arguments);
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
ITooltip.prototype = Object.create(common.Widget.prototype);
|
|
595
|
+
ITooltip.prototype.constructor = ITooltip;
|
|
596
|
+
// abstract target(): any;
|
|
597
|
+
// abstract target(_: any): this;
|
|
598
|
+
ITooltip.prototype.tooltipEnter = function (element) {
|
|
599
|
+
var overlayElement = this.parentOverlay();
|
|
600
|
+
if (!overlayElement.empty()) {
|
|
601
|
+
this.tooltip.rootElement(overlayElement.node().parentNode);
|
|
602
|
+
}
|
|
603
|
+
element.call(this.tooltip);
|
|
604
|
+
};
|
|
605
|
+
ITooltip.prototype.tooltipUpdate = function () {
|
|
606
|
+
var _this = this;
|
|
607
|
+
this.tooltip.offset(function () {
|
|
608
|
+
if (event && _this.tooltipFollowMouse()) {
|
|
609
|
+
var d3tipElement = document.querySelector(".d3-tip"); // d3Tip offers no reference to the '.d3-tip' element...?
|
|
610
|
+
d3tipElement.style.display = "block";
|
|
611
|
+
d3tipElement.style.left = _this.tooltipOffset() + (event.clientX) + "px";
|
|
612
|
+
d3tipElement.style.top = event.clientY + "px";
|
|
613
|
+
return [];
|
|
685
614
|
}
|
|
686
|
-
switch (
|
|
687
|
-
case "
|
|
688
|
-
|
|
689
|
-
case "series-table":
|
|
690
|
-
var html_1 = '<table class="ITooltip-series-table">'
|
|
691
|
-
+ "<thead>"
|
|
692
|
-
+ '<tr><th colspan="2">' + opts.label + "</th></tr>"
|
|
693
|
-
+ "</thead>"
|
|
694
|
-
+ "<tbody>";
|
|
695
|
-
opts.arr.forEach(function (row) {
|
|
696
|
-
html_1 += "<tr>";
|
|
697
|
-
html_1 += "<td>";
|
|
698
|
-
html_1 += '<div class="series-table-row-color" style="background-color:' + row.color + '"></div>';
|
|
699
|
-
html_1 += '<div class="series-table-row-label">' + row.label + "</div>";
|
|
700
|
-
html_1 += "</td>";
|
|
701
|
-
html_1 += '<td><div class="series-table-row-value">' + row.value + "</div></td>";
|
|
702
|
-
html_1 += "</tr>";
|
|
703
|
-
});
|
|
704
|
-
html_1 += "</tbody>";
|
|
705
|
-
html_1 += "</table>";
|
|
706
|
-
return html_1;
|
|
615
|
+
switch (_this.tooltip.direction()()) {
|
|
616
|
+
case "e":
|
|
617
|
+
return [0, _this.tooltipOffset()];
|
|
707
618
|
default:
|
|
708
|
-
|
|
709
|
-
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>";
|
|
710
|
-
}
|
|
711
|
-
if (opts.label !== "") {
|
|
712
|
-
return "<span style='color:" + this.tooltipLabelColor() + "'>" + opts.label + "</span>: <span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
713
|
-
}
|
|
714
|
-
return "<span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
619
|
+
return [-_this.tooltipOffset(), 0];
|
|
715
620
|
}
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
621
|
+
});
|
|
622
|
+
var classed = this.tooltip.attr("class");
|
|
623
|
+
if (classed) {
|
|
624
|
+
classed = classed.split(" notick").join("") + (this.tooltipTick() ? "" : " notick") + (this.tooltipStyle() === "none" ? " hidden" : "");
|
|
625
|
+
classed = classed.split(" ")
|
|
626
|
+
.filter(function (_class) {
|
|
627
|
+
return _class.indexOf("ITooltip-tooltipStyle-") !== 0;
|
|
628
|
+
})
|
|
629
|
+
.join(" ");
|
|
630
|
+
classed += " ITooltip-tooltipStyle-" + this.tooltipStyle();
|
|
631
|
+
this.tooltip
|
|
632
|
+
.attr("class", classed);
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
ITooltip.prototype.tooltipExit = function () {
|
|
636
|
+
if (this.tooltip) {
|
|
637
|
+
this.tooltip.destroy();
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
ITooltip.prototype._tooltipHTML = function (d) {
|
|
641
|
+
return d;
|
|
642
|
+
};
|
|
643
|
+
ITooltip.prototype.tooltipHTML = function (_) {
|
|
644
|
+
return this.tooltip.html(_);
|
|
645
|
+
};
|
|
646
|
+
ITooltip.prototype.tooltipFormat = function (opts) {
|
|
647
|
+
if (opts === void 0) { opts = {}; }
|
|
648
|
+
opts.label = opts.label === undefined ? "" : opts.label;
|
|
649
|
+
opts.series = opts.series || "";
|
|
650
|
+
if (opts.value instanceof Date) {
|
|
651
|
+
opts.value = opts.value || "";
|
|
652
|
+
}
|
|
653
|
+
else {
|
|
654
|
+
opts.value = this._valueFormatter(opts.value) || "";
|
|
655
|
+
}
|
|
656
|
+
switch (this.tooltipStyle()) {
|
|
657
|
+
case "none":
|
|
658
|
+
break;
|
|
659
|
+
case "series-table":
|
|
660
|
+
var html_1 = '<table class="ITooltip-series-table">'
|
|
661
|
+
+ "<thead>"
|
|
662
|
+
+ '<tr><th colspan="2">' + opts.label + "</th></tr>"
|
|
663
|
+
+ "</thead>"
|
|
664
|
+
+ "<tbody>";
|
|
665
|
+
opts.arr.forEach(function (row) {
|
|
666
|
+
html_1 += "<tr>";
|
|
667
|
+
html_1 += "<td>";
|
|
668
|
+
html_1 += '<div class="series-table-row-color" style="background-color:' + row.color + '"></div>';
|
|
669
|
+
html_1 += '<div class="series-table-row-label">' + row.label + "</div>";
|
|
670
|
+
html_1 += "</td>";
|
|
671
|
+
html_1 += '<td><div class="series-table-row-value">' + row.value + "</div></td>";
|
|
672
|
+
html_1 += "</tr>";
|
|
673
|
+
});
|
|
674
|
+
html_1 += "</tbody>";
|
|
675
|
+
html_1 += "</table>";
|
|
676
|
+
return html_1;
|
|
677
|
+
default:
|
|
678
|
+
if (opts.series) {
|
|
679
|
+
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>";
|
|
680
|
+
}
|
|
681
|
+
if (opts.label !== "") {
|
|
682
|
+
return "<span style='color:" + this.tooltipLabelColor() + "'>" + opts.label + "</span>: <span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
723
683
|
}
|
|
684
|
+
return "<span style='color:" + this.tooltipValueColor() + "'>" + opts.value + "</span>";
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
ITooltip.prototype.tooltipKeyValueFormat = function (titleKey, obj) {
|
|
688
|
+
var body = "";
|
|
689
|
+
for (var key in obj) {
|
|
690
|
+
if (key !== titleKey) {
|
|
691
|
+
var value = obj && obj[key] ? obj[key] : "";
|
|
692
|
+
body += "<tr><td style=\"".concat(this.tooltipLabelColor_exists() ? "color:" + this.tooltipLabelColor() : "", "\">").concat(key, "</td><td style=\"font-weight:normal\">").concat(value, "</td></tr>");
|
|
724
693
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}(common.Widget));
|
|
694
|
+
}
|
|
695
|
+
return "<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">".concat(obj[titleKey], "</th></tr>\n </thead>\n <tbody>\n ").concat(body, "\n </tbody>\n </table>");
|
|
696
|
+
};
|
|
729
697
|
ITooltip.prototype.publish("tooltipStyle", "default", "set", "Style mode", ["default", "none", "series-table"], {});
|
|
730
698
|
ITooltip.prototype.publish("tooltipFollowMouse", false, "boolean", "If true, the tooltip will follow mouse movement", null, {});
|
|
731
699
|
ITooltip.prototype.publish("tooltipValueFormat", ",.2f", "string", "Number format of tooltip value(s)", null, {});
|
|
@@ -743,16 +711,15 @@
|
|
|
743
711
|
return retVal;
|
|
744
712
|
};
|
|
745
713
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
}());
|
|
714
|
+
// Use old school class declaration as this is a mixin ---
|
|
715
|
+
function ITree() {
|
|
716
|
+
}
|
|
717
|
+
ITree.prototype.constructor = ITree;
|
|
718
|
+
// Events ---
|
|
719
|
+
ITree.prototype.click = function (row, column, selected) {
|
|
720
|
+
};
|
|
721
|
+
ITree.prototype.dblclick = function (row, column, selected) {
|
|
722
|
+
};
|
|
756
723
|
ITree.prototype._palette = common.Palette.ordinal("default");
|
|
757
724
|
|
|
758
725
|
exports.BUILD_VERSION = BUILD_VERSION;
|