@hpcc-js/timeline 2.49.1 → 2.50.4
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/README.md +44 -0
- package/dist/index.es6.js +25 -26
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +28 -29
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +12 -28
- package/src/ReactAxisGanttSeries.ts +13 -14
- package/src/__package__.ts +2 -2
- package/types/ReactAxisGanttSeries.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/api'), require('@hpcc-js/chart'), require('@hpcc-js/common'), require('@hpcc-js/html'), require('@hpcc-js/react'), require('@hpcc-js/layout')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/api', '@hpcc-js/chart', '@hpcc-js/common', '@hpcc-js/html', '@hpcc-js/react', '@hpcc-js/layout'], factory) :
|
|
4
|
-
(global = global || self, factory(global[
|
|
5
|
-
}(this, (function (exports, api, chart, common, html, react, layout) { 'use strict';
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/timeline"] = {}, global["@hpcc-js/api"], global["@hpcc-js/chart"], global["@hpcc-js/common"], global["@hpcc-js/html"], global["@hpcc-js/react"], global["@hpcc-js/layout"]));
|
|
5
|
+
})(this, (function (exports, api, chart, common, html, react, layout) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/timeline";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.50.4";
|
|
9
|
+
var BUILD_VERSION = "2.102.11";
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
ar[i] = from[i];
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return to.concat(ar || from);
|
|
60
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function styleInject(css, ref) {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
var css_248z = ".timeline_MiniGantt .line{fill:none;stroke:#d3d3d3;opacity:.7}.timeline_MiniGantt .common_TextBox .rect{fill:#87cefa;stroke
|
|
90
|
+
var css_248z = ".timeline_MiniGantt .line{fill:none;stroke:#d3d3d3;opacity:.7}.timeline_MiniGantt .common_TextBox .rect{fill:#87cefa;stroke:blue;opacity:.5}.timeline_MiniGantt .buckets .entity_shape rect{stroke:#333}.timeline_MiniGantt .buckets.selected .common_EntityRect .common_Shape>rect{stroke:red}.timeline_MiniGantt .common_TextBox .rect text{fill:#000;stroke:none}.timeline_MiniGantt .over{stroke:transparent;opacity:.8}.timeline_MiniGantt rect{shape-rendering:crispEdges}";
|
|
91
91
|
styleInject(css_248z);
|
|
92
92
|
|
|
93
93
|
var MiniGantt = /** @class */ (function (_super) {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
api.ITooltip.call(_this);
|
|
106
106
|
common.Utility.SimpleSelectionMixin.call(_this);
|
|
107
107
|
_this._drawStartPos = "origin";
|
|
108
|
-
_this.tooltipHTML(function (d) { return "<center>"
|
|
108
|
+
_this.tooltipHTML(function (d) { return "<center>".concat(d[_this._title_idx], "</center><br>").concat(_this.tooltipFormatter(_this.brAxis.parse(d[_this._startDate_idx])), " -> ").concat(_this.tooltipFormatter(_this.brAxis.parse(d[_this._endDate_idx]))); });
|
|
109
109
|
_this.tlAxis = new chart.Axis()
|
|
110
110
|
.type("time");
|
|
111
111
|
_this.brAxis = new chart.Axis()
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
};
|
|
121
121
|
MiniGantt.prototype.fullExtent = function () {
|
|
122
122
|
var _this = this;
|
|
123
|
-
var data = __spreadArray(__spreadArray([], this.data().map(function (d) { return d[_this._startDate_idx]; })), this.data().filter(function (d) { return !!d[_this._endDate_idx]; }).map(function (d) { return d[_this._endDate_idx]; }));
|
|
123
|
+
var data = __spreadArray(__spreadArray([], this.data().map(function (d) { return d[_this._startDate_idx]; }), true), this.data().filter(function (d) { return !!d[_this._endDate_idx]; }).map(function (d) { return d[_this._endDate_idx]; }), true);
|
|
124
124
|
return common.extent(data);
|
|
125
125
|
};
|
|
126
126
|
MiniGantt.prototype.extent = function () {
|
|
@@ -304,23 +304,23 @@
|
|
|
304
304
|
var upperContentYOffset = (height / 2) + y_offset;
|
|
305
305
|
var lowerAxisYOffset = ((height / 2) - lowerAxisHeight - y_offset) * -1;
|
|
306
306
|
var halfMinYOffset = minYOffset !== 0 ? minYOffset / 2 : 0;
|
|
307
|
-
this.gUpperContent.attr("transform", "translate(0, "
|
|
308
|
-
this.gLowerAxis.attr("transform", "translate(0, "
|
|
307
|
+
this.gUpperContent.attr("transform", "translate(0, ".concat(upperContentYOffset - halfMinYOffset, ")"));
|
|
308
|
+
this.gLowerAxis.attr("transform", "translate(0, ".concat(lowerAxisYOffset - halfMinYOffset, ")"));
|
|
309
309
|
}
|
|
310
310
|
else if (events.length === 0 && ranges.length > 0) {
|
|
311
311
|
// ONLY RANGES
|
|
312
312
|
this.tlAxis.visible(true);
|
|
313
|
-
this.gUpperContent.attr("transform", "translate(0, "
|
|
314
|
-
this.gUpperAxis.attr("transform", "translate(0, "
|
|
313
|
+
this.gUpperContent.attr("transform", "translate(0, ".concat(upperContentHeight, ")"));
|
|
314
|
+
this.gUpperAxis.attr("transform", "translate(0, ".concat(upperContentHeight, ")"));
|
|
315
315
|
}
|
|
316
316
|
else {
|
|
317
317
|
upperContentHeight -= minYOffset;
|
|
318
318
|
lowerHeight += minYOffset;
|
|
319
319
|
// BOTH
|
|
320
320
|
this.tlAxis.visible(true);
|
|
321
|
-
this.gUpperContent.attr("transform", "translate(0, "
|
|
322
|
-
this.gUpperAxis.attr("transform", "translate(0, "
|
|
323
|
-
this.gMiddleContent.attr("transform", "translate(0, "
|
|
321
|
+
this.gUpperContent.attr("transform", "translate(0, ".concat(upperContentHeight, ")"));
|
|
322
|
+
this.gUpperAxis.attr("transform", "translate(0, ".concat(upperContentHeight, ")"));
|
|
323
|
+
this.gMiddleContent.attr("transform", "translate(0, ".concat(upperContentHeight, ")"));
|
|
324
324
|
}
|
|
325
325
|
this.tlAxis
|
|
326
326
|
.render();
|
|
@@ -490,8 +490,8 @@
|
|
|
490
490
|
.on("mousemove.tooltip", this.tooltip.show)
|
|
491
491
|
.merge(buckets)
|
|
492
492
|
.attr("transform", function (d) { return context.isHorizontal() ?
|
|
493
|
-
"translate("
|
|
494
|
-
"translate("
|
|
493
|
+
"translate(".concat(_this.dataStartPos(d), ", ").concat(_this.verticalBands(bucketIndex[d]), ") ") :
|
|
494
|
+
"translate(".concat(_this.verticalBands(bucketIndex[d]), ", ").concat(_this.dataStartPos(d), ") "); })
|
|
495
495
|
.each(function (d) {
|
|
496
496
|
var textBox = context.localRect.get(this);
|
|
497
497
|
var x = context.dataWidth(d) / 2;
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
_this._tooltip = new html.HTMLTooltip();
|
|
596
596
|
_this._tooltip
|
|
597
597
|
.tooltipHTML(function (d) {
|
|
598
|
-
return "<div style=\"text-align:center;\">"
|
|
598
|
+
return "<div style=\"text-align:center;\">".concat(d[0], "<br/><br/>").concat(d[1], " -> ").concat(d[2], "</div>");
|
|
599
599
|
});
|
|
600
600
|
_this._tooltip
|
|
601
601
|
.followCursor(true);
|
|
@@ -783,7 +783,7 @@
|
|
|
783
783
|
d.y += borderOffset1;
|
|
784
784
|
d.props.width -= borderOffset2;
|
|
785
785
|
d.props.height -= borderOffset2;
|
|
786
|
-
d.element.attr("transform", "translate("
|
|
786
|
+
d.element.attr("transform", "translate(".concat(d.x + (d.props.width / 2), " ").concat(d.y + (d.props.height / 2), ")"));
|
|
787
787
|
}); }, function (update) { return update; }, function (exit) { return exit
|
|
788
788
|
.each(function (d) {
|
|
789
789
|
delete d.element;
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
if (d.element === undefined && d.that) {
|
|
863
863
|
d.element = common.select(d.that);
|
|
864
864
|
}
|
|
865
|
-
d.element.attr("transform", "translate("
|
|
865
|
+
d.element.attr("transform", "translate(".concat(d.x + (d.props.width / 2), " ").concat(d.y + (d.props.height / 2), ")"));
|
|
866
866
|
d.x += borderOffset1;
|
|
867
867
|
d.y += borderOffset1;
|
|
868
868
|
d.props.width -= borderOffset2;
|
|
@@ -906,7 +906,7 @@
|
|
|
906
906
|
case "scale-all":
|
|
907
907
|
this._zoomScale = transform.k;
|
|
908
908
|
this._zoomTranslate = [transform.x, 0];
|
|
909
|
-
this._zoomG.attr("transform", "translate("
|
|
909
|
+
this._zoomG.attr("transform", "translate(".concat(transform.x, " ").concat(0, ")scale(").concat(transform.k, " 1)"));
|
|
910
910
|
break;
|
|
911
911
|
default:
|
|
912
912
|
var options_1 = this._rangeOptions;
|
|
@@ -1131,13 +1131,13 @@
|
|
|
1131
1131
|
.attr("height", contentHeight)
|
|
1132
1132
|
.attr("width", w)
|
|
1133
1133
|
.attr("fill", "transparent");
|
|
1134
|
-
this._contentElement.attr("transform", "translate(0 "
|
|
1134
|
+
this._contentElement.attr("transform", "translate(0 ".concat(axisHeight + borderOffset1, ")"));
|
|
1135
1135
|
this._gantt.resize({ height: contentHeight, width: w });
|
|
1136
1136
|
this._bottomRect
|
|
1137
1137
|
.attr("height", axisHeight)
|
|
1138
1138
|
.attr("width", w)
|
|
1139
1139
|
.attr("fill", "transparent");
|
|
1140
|
-
this._bottomAxisElement.attr("transform", "translate(0 "
|
|
1140
|
+
this._bottomAxisElement.attr("transform", "translate(0 ".concat(axisHeight + contentHeight + borderOffset1, ")"));
|
|
1141
1141
|
this._bottomAxis.resize({ height: axisHeight, width: w });
|
|
1142
1142
|
};
|
|
1143
1143
|
ReactAxisGantt.prototype.enter = function (domNode, element) {
|
|
@@ -1210,7 +1210,7 @@
|
|
|
1210
1210
|
var retVal = _super.prototype.data.apply(this, arguments);
|
|
1211
1211
|
if (arguments.length > 0) {
|
|
1212
1212
|
var ganttData = this.data().map(function (n) {
|
|
1213
|
-
var ret = __spreadArray([], n);
|
|
1213
|
+
var ret = __spreadArray([], n, true);
|
|
1214
1214
|
ret[1] = isNaN(n[1]) ? new Date(n[1]).getTime() : Number(n[1]);
|
|
1215
1215
|
ret[2] = isNaN(n[2]) ? new Date(n[2]).getTime() : Number(n[2]);
|
|
1216
1216
|
return ret;
|
|
@@ -1332,7 +1332,6 @@
|
|
|
1332
1332
|
};
|
|
1333
1333
|
};
|
|
1334
1334
|
ReactAxisGanttSeries.prototype.onzoom = function (transform) {
|
|
1335
|
-
console.log("called onzoom");
|
|
1336
1335
|
var w = this.width();
|
|
1337
1336
|
var low = this._gantt._minStart;
|
|
1338
1337
|
var high = this._gantt._maxEnd;
|
|
@@ -1372,7 +1371,7 @@
|
|
|
1372
1371
|
var retVal = _super.prototype.data.apply(this, arguments);
|
|
1373
1372
|
if (arguments.length > 0) {
|
|
1374
1373
|
var ganttData = this.data().map(function (n) {
|
|
1375
|
-
var ret = __spreadArray([], n);
|
|
1374
|
+
var ret = __spreadArray([], n, true);
|
|
1376
1375
|
ret[1] = isNaN(n[1]) ? new Date(n[1]).getTime() : Number(n[1]);
|
|
1377
1376
|
ret[2] = isNaN(n[2]) ? new Date(n[2]).getTime() : Number(n[2]);
|
|
1378
1377
|
return ret;
|
|
@@ -1438,7 +1437,7 @@
|
|
|
1438
1437
|
var startTime = parser(d[1]);
|
|
1439
1438
|
var endTime = parser(d[2]);
|
|
1440
1439
|
var formatter = common.timeFormat(_this.tooltipTimeFormat());
|
|
1441
|
-
return "<div style=\"text-align:center;\">"
|
|
1440
|
+
return "<div style=\"text-align:center;\">".concat(d[0], "<br/><br/>").concat(formatter(startTime), " -> ").concat(formatter(endTime), "</div>");
|
|
1442
1441
|
});
|
|
1443
1442
|
return _this;
|
|
1444
1443
|
}
|
|
@@ -1524,7 +1523,7 @@
|
|
|
1524
1523
|
var startTime = parseTime(d[1]);
|
|
1525
1524
|
var endTime = parseTime(d[2]);
|
|
1526
1525
|
var formatter = common.timeFormat(_this.tooltipTimeFormat());
|
|
1527
|
-
return "<div style=\"text-align:center;\">"
|
|
1526
|
+
return "<div style=\"text-align:center;\">".concat(d[0], "<br/><br/>").concat(formatter(startTime), " -> ").concat(formatter(endTime), "</div>");
|
|
1528
1527
|
});
|
|
1529
1528
|
return _this;
|
|
1530
1529
|
}
|
|
@@ -1610,5 +1609,5 @@
|
|
|
1610
1609
|
|
|
1611
1610
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1612
1611
|
|
|
1613
|
-
}))
|
|
1612
|
+
}));
|
|
1614
1613
|
//# sourceMappingURL=index.js.map
|