@hpcc-js/timeline 2.50.2 → 2.50.5

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 CHANGED
@@ -45,3 +45,47 @@ This package is part of the mono repository "@hpcc-js" (aka Visualization Framew
45
45
  * _[Tutorials](https://github.com/hpcc-systems/Visualization/wiki/Tutorials)_
46
46
  * _[Gallery](https://raw.githack.com/hpcc-systems/Visualization/trunk/demos/gallery/gallery.html)_ ([alt](https://rawgit.com/hpcc-systems/Visualization/trunk/demos/gallery/gallery.html))
47
47
  * _[Wiki](https://github.com/hpcc-systems/Visualization/wiki)_
48
+
49
+ <ClientOnly>
50
+ <hpcc-vitepress style="width:100%;height:600px">
51
+ <div id="target" style="width:100%;height:600px">
52
+ </div>
53
+ <script type="module">
54
+ import { MiniGantt } from "@hpcc-js/timeline";
55
+
56
+ new MiniGantt()
57
+ .target("target")
58
+ .columns(["Label", "start", "end"])
59
+ .data(random_datetime_ranges(10).concat(random_datetime_events(1)))
60
+ .timePattern("%Y-%m-%dT%H:%M:%S.%LZ")
61
+ .render()
62
+ ;
63
+
64
+
65
+ function random_datetime_string() {
66
+ const yyyy = 2004 + Math.floor(Math.random() * 2);
67
+ const mm = 1 + Math.floor(Math.random() * 12);
68
+ const dd = 1 + Math.floor(Math.random() * 28);
69
+ const hh = 1 + Math.floor(Math.random() * 23);
70
+ const min = 1 + Math.floor(Math.random() * 59);
71
+ const sec = 0 + Math.floor(Math.random() * 59);
72
+ return `${yyyy}-${mm < 10 ? '0' + mm : mm}-${dd < 10 ? '0' + dd : dd}T${hh < 10 ? '0' + hh : hh}:${min < 10 ? '0' + min : min}:${sec < 10 ? '0' + sec : sec}.0Z`;
73
+ }
74
+
75
+ function random_datetime_ranges(n) {
76
+ return Array(n).fill("").map((row, row_idx) => {
77
+ const d1 = random_datetime_string();
78
+ const d2 = random_datetime_string();
79
+ const icon = ["", "", ""][Math.floor(Math.random() * 3)];
80
+ return new Date(d1) - new Date(d2) > 0 ? [`Random Range #${row_idx}`, d2, d1, icon] : [`Random Range #${row_idx}`, d1, d2, icon];
81
+ });
82
+ }
83
+
84
+ function random_datetime_events(n) {
85
+ return Array(n).fill("").map((row, row_idx) => {
86
+ return [`Random Event #${row_idx}`, random_datetime_string()];
87
+ });
88
+ }
89
+ </script>
90
+ </hpcc-vitepress>
91
+ </ClientOnly>
package/dist/index.es6.js CHANGED
@@ -6,8 +6,8 @@ import { render, LabelledRect } from '@hpcc-js/react';
6
6
  import { Border2 } from '@hpcc-js/layout';
7
7
 
8
8
  var PKG_NAME = "@hpcc-js/timeline";
9
- var PKG_VERSION = "2.50.2";
10
- var BUILD_VERSION = "2.102.4";
9
+ var PKG_VERSION = "2.50.5";
10
+ var BUILD_VERSION = "2.103.0";
11
11
 
12
12
  /*! *****************************************************************************
13
13
  Copyright (c) Microsoft Corporation.
@@ -1333,7 +1333,6 @@ var ReactAxisGanttSeries = /** @class */ (function (_super) {
1333
1333
  };
1334
1334
  };
1335
1335
  ReactAxisGanttSeries.prototype.onzoom = function (transform) {
1336
- console.log("called onzoom");
1337
1336
  var w = this.width();
1338
1337
  var low = this._gantt._minStart;
1339
1338
  var high = this._gantt._maxEnd;