@evercam/ui 0.0.63-preview-add-context-provider-3fd127e39 → 0.0.63-preview-admin-deployment-c5e8d6e1c
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/components/ETimeline.vue.d.ts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +32 -36
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ declare const _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, a
|
|
|
8
8
|
timeline: HTMLElement;
|
|
9
9
|
wrapperDiv: HTMLElement;
|
|
10
10
|
selectedTimestampCursor: HTMLElement;
|
|
11
|
-
svgElement:
|
|
11
|
+
svgElement: SVGSVGElement;
|
|
12
12
|
svg: d3.Selection<SVGSVGElement, any, any, any>;
|
|
13
13
|
timeScale: d3.ScaleTime<any, any, unknown>;
|
|
14
14
|
currentTimeScaleDensity: number;
|
|
@@ -76,11 +76,10 @@ declare const _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, a
|
|
|
76
76
|
initSelectedTimestampCursor(): void;
|
|
77
77
|
updateMarkers(): void;
|
|
78
78
|
selectOrAppend({ parent, targetId, targetType, }: {
|
|
79
|
-
parent: any
|
|
79
|
+
parent: d3.Selection<any, any, any, any>;
|
|
80
80
|
targetId: string;
|
|
81
81
|
targetType: string;
|
|
82
|
-
}): any
|
|
83
|
-
updateAndRedrawTimeline(): void;
|
|
82
|
+
}): d3.Selection<d3.BaseType, any, any, any>;
|
|
84
83
|
clearTimeline(): void;
|
|
85
84
|
repositionSelectedTimestampCursor(): void;
|
|
86
85
|
updateCurrentTimeScaleDensity(): void;
|
|
@@ -275,6 +274,7 @@ declare const _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, a
|
|
|
275
274
|
minHoverZone: number;
|
|
276
275
|
sortedMarkers: TimelineMarker[];
|
|
277
276
|
maxVisibleCount: number;
|
|
277
|
+
defaultMaxDomain: string[];
|
|
278
278
|
domain: TimelineDomain;
|
|
279
279
|
}, {
|
|
280
280
|
eventsGroups: {};
|
package/dist/index.d.ts
CHANGED
|
@@ -226,7 +226,7 @@ export declare const components: {
|
|
|
226
226
|
timeline: HTMLElement;
|
|
227
227
|
wrapperDiv: HTMLElement;
|
|
228
228
|
selectedTimestampCursor: HTMLElement;
|
|
229
|
-
svgElement:
|
|
229
|
+
svgElement: SVGSVGElement;
|
|
230
230
|
svg: import("d3-selection").Selection<SVGSVGElement, any, any, any>;
|
|
231
231
|
timeScale: import("d3-scale").ScaleTime<any, any, unknown>;
|
|
232
232
|
currentTimeScaleDensity: number;
|
|
@@ -294,11 +294,10 @@ export declare const components: {
|
|
|
294
294
|
initSelectedTimestampCursor(): void;
|
|
295
295
|
updateMarkers(): void;
|
|
296
296
|
selectOrAppend({ parent, targetId, targetType, }: {
|
|
297
|
-
parent: any
|
|
297
|
+
parent: import("d3-selection").Selection<any, any, any, any>;
|
|
298
298
|
targetId: string;
|
|
299
299
|
targetType: string;
|
|
300
|
-
}): any
|
|
301
|
-
updateAndRedrawTimeline(): void;
|
|
300
|
+
}): import("d3-selection").Selection<import("d3-selection").BaseType, any, any, any>;
|
|
302
301
|
clearTimeline(): void;
|
|
303
302
|
repositionSelectedTimestampCursor(): void;
|
|
304
303
|
updateCurrentTimeScaleDensity(): void;
|
|
@@ -493,6 +492,7 @@ export declare const components: {
|
|
|
493
492
|
minHoverZone: number;
|
|
494
493
|
sortedMarkers: import('./types').TimelineMarker[];
|
|
495
494
|
maxVisibleCount: number;
|
|
495
|
+
defaultMaxDomain: string[];
|
|
496
496
|
domain: import('./types').TimelineDomain;
|
|
497
497
|
}, {
|
|
498
498
|
eventsGroups: {};
|
package/dist/index.mjs
CHANGED
|
@@ -9991,7 +9991,7 @@ const po = Y.extend({
|
|
|
9991
9991
|
this.zoomToFocusedDomain(t);
|
|
9992
9992
|
},
|
|
9993
9993
|
focusedTimestamp(t) {
|
|
9994
|
-
this.panToTimestamp(t);
|
|
9994
|
+
t && this.panToTimestamp(t);
|
|
9995
9995
|
},
|
|
9996
9996
|
transformDiff() {
|
|
9997
9997
|
this.$emit("transform-changed", this.transformDiff);
|
|
@@ -10089,15 +10089,7 @@ const po = Y.extend({
|
|
|
10089
10089
|
panToTimestamp(t) {
|
|
10090
10090
|
const e = this.toD3Date(t), r = this.timeScale(e), n = D.zoomTransform(
|
|
10091
10091
|
this.selection.node()
|
|
10092
|
-
), a = n.x - r + this.getWidth() / 2
|
|
10093
|
-
-a / n.k
|
|
10094
|
-
), i = this.timeScale.invert(
|
|
10095
|
-
(this.getWidth() - a) / n.k
|
|
10096
|
-
);
|
|
10097
|
-
if (this.minDate && l < this.minDate || this.maxDate && i > this.maxDate) {
|
|
10098
|
-
console.log("Pan operation would exceed bounds. Operation cancelled.");
|
|
10099
|
-
return;
|
|
10100
|
-
}
|
|
10092
|
+
), a = n.x - r + this.getWidth() / 2;
|
|
10101
10093
|
this.selection.transition().duration(this.translationDuration).call(
|
|
10102
10094
|
this.zoomBehavior.transform,
|
|
10103
10095
|
D.zoomIdentity.translate(a, 0).scale(n.k)
|
|
@@ -11069,7 +11061,7 @@ const Fo = Ao.exports, W = {
|
|
|
11069
11061
|
},
|
|
11070
11062
|
hoveredMilestone: null,
|
|
11071
11063
|
focusedDomain: null,
|
|
11072
|
-
transitionDuration:
|
|
11064
|
+
transitionDuration: 400,
|
|
11073
11065
|
focusedTimestamp: null
|
|
11074
11066
|
};
|
|
11075
11067
|
},
|
|
@@ -11163,7 +11155,7 @@ const Fo = Ao.exports, W = {
|
|
|
11163
11155
|
}, 0) * this.characterWidth + 2 * this.textPadding;
|
|
11164
11156
|
},
|
|
11165
11157
|
combinedXAxesHeight() {
|
|
11166
|
-
return this.axisHeight *
|
|
11158
|
+
return this.axisHeight * 2;
|
|
11167
11159
|
},
|
|
11168
11160
|
timelineWidth() {
|
|
11169
11161
|
var t, e, r;
|
|
@@ -11252,8 +11244,15 @@ const Fo = Ao.exports, W = {
|
|
|
11252
11244
|
});
|
|
11253
11245
|
return D.max(r, (n) => n.count);
|
|
11254
11246
|
},
|
|
11247
|
+
defaultMaxDomain() {
|
|
11248
|
+
const t = (/* @__PURE__ */ new Date()).getTime(), e = new Date(t - 365 * 24 * 60 * 60 * 1e3).getTime(), r = new Date(e).getTime(), n = new Date(t).getTime(), l = (n - r) / 2;
|
|
11249
|
+
return [
|
|
11250
|
+
new Date(r - l).toISOString(),
|
|
11251
|
+
new Date(n + l).toISOString()
|
|
11252
|
+
];
|
|
11253
|
+
},
|
|
11255
11254
|
domain() {
|
|
11256
|
-
const t = this.minDate || this.
|
|
11255
|
+
const t = this.minDate || this.defaultMaxDomain[0], e = this.maxDate || this.defaultMaxDomain[1];
|
|
11257
11256
|
return [this.tzStringToDate(t), this.tzStringToDate(e)];
|
|
11258
11257
|
}
|
|
11259
11258
|
},
|
|
@@ -11275,13 +11274,13 @@ const Fo = Ao.exports, W = {
|
|
|
11275
11274
|
},
|
|
11276
11275
|
eventsGroups: {
|
|
11277
11276
|
handler() {
|
|
11278
|
-
this.
|
|
11277
|
+
this.updateTimeline();
|
|
11279
11278
|
},
|
|
11280
11279
|
deep: !0
|
|
11281
11280
|
},
|
|
11282
|
-
barHeight: "
|
|
11283
|
-
barYPadding: "
|
|
11284
|
-
chartMinHeight: "
|
|
11281
|
+
barHeight: "updateTimeline",
|
|
11282
|
+
barYPadding: "updateTimeline",
|
|
11283
|
+
chartMinHeight: "updateTimeline",
|
|
11285
11284
|
cursorTimestamp() {
|
|
11286
11285
|
if (this.cursorTimestamp) {
|
|
11287
11286
|
this.hoveredTimestamp = this.cursorTimestamp;
|
|
@@ -11294,7 +11293,7 @@ const Fo = Ao.exports, W = {
|
|
|
11294
11293
|
t && !this.locked && (this.focusedTimestamp = t);
|
|
11295
11294
|
},
|
|
11296
11295
|
groupsVisibility() {
|
|
11297
|
-
this.
|
|
11296
|
+
this.updateTimeline();
|
|
11298
11297
|
},
|
|
11299
11298
|
forbiddenIntervals() {
|
|
11300
11299
|
this.updateForbiddenIntervals(!0);
|
|
@@ -11328,7 +11327,7 @@ const Fo = Ao.exports, W = {
|
|
|
11328
11327
|
);
|
|
11329
11328
|
return;
|
|
11330
11329
|
}
|
|
11331
|
-
this.initOrUpdateSvg(), this.initOrUpdateDefs(), this.initUtcOffset(), this.initYScale(), this.drawEventsGroups(), this.curtains && (this.initCurtains(), this.emitCurtainChange()), this.initSelectedTimestampCursor(), this.
|
|
11330
|
+
this.initOrUpdateSvg(), this.initOrUpdateDefs(), this.initUtcOffset(), this.initYScale(), this.drawEventsGroups(), this.curtains && (this.initCurtains(), this.emitCurtainChange()), this.initSelectedTimestampCursor(), this.registerEventsListeners(), this.emitVisibleInterval(nr.initial), this.selectedDate && this.panOnDateClick && (this.focusedTimestamp = this.selectedDate), this.isInitialized = !0, this.updateMarkers();
|
|
11332
11331
|
},
|
|
11333
11332
|
initRefs() {
|
|
11334
11333
|
this.tooltip = this.$refs.tooltip, this.cursor = this.$refs.cursor, this.mainContainer = this.$refs.mainContainer, this.timeline = this.$refs.timelineContainer, this.svgElement = this.$refs.timelineSvg, this.selectedTimestampCursor = this.$refs.selectedTimestamp, this.wrapperDiv = this.$refs.wrapperDiv;
|
|
@@ -11442,9 +11441,6 @@ const Fo = Ao.exports, W = {
|
|
|
11442
11441
|
let n = t.select(`#${e}`);
|
|
11443
11442
|
return n.empty() && (n = t.append(r).attr("id", e)), n;
|
|
11444
11443
|
},
|
|
11445
|
-
updateAndRedrawTimeline() {
|
|
11446
|
-
this.updateTimeline();
|
|
11447
|
-
},
|
|
11448
11444
|
clearTimeline() {
|
|
11449
11445
|
this.svg && this.svg.remove(), this.countsByTimestamp = {};
|
|
11450
11446
|
},
|
|
@@ -11482,7 +11478,7 @@ const Fo = Ao.exports, W = {
|
|
|
11482
11478
|
this.autoResize && (this.isFirstPaint ? (this.handleResize(t), this.isFirstPaint = !1) : this.debouncedOnResize(t));
|
|
11483
11479
|
},
|
|
11484
11480
|
handleResize({ contentRect: t }) {
|
|
11485
|
-
this.svg && (this.svg.attr("width", t.width), this.
|
|
11481
|
+
this.svg && (this.svg.attr("width", t.width), this.updateTimeline());
|
|
11486
11482
|
},
|
|
11487
11483
|
handleDarkModeChange() {
|
|
11488
11484
|
if (!this.showLabels)
|
|
@@ -11570,7 +11566,7 @@ const Fo = Ao.exports, W = {
|
|
|
11570
11566
|
this.transformDiff = t;
|
|
11571
11567
|
},
|
|
11572
11568
|
handleTimeScaleChange(t) {
|
|
11573
|
-
this.timeScale = t, this.updateCurrentTimeScaleDensity(), this.isInitialized && (this.updateEventsBars(), this.updateLineGraphs(), this.updateBarChart(), this.updateLineGraphHoverZones(), this.updateMilestonesPositions(), this.repositionSelectedTimestampCursor(), this.updateForbiddenIntervals(), this.updateMarkers(), this.emitVisibleInterval(nr.zoom), this.curtains && this.emitCurtainChange(), this.$emit("time-scale-change", t));
|
|
11569
|
+
this.timeScale = t, this.updateCurrentTimeScaleDensity(), this.isInitialized && (this.updateEventsBars(), this.updateLineGraphs(), this.updateBarChart(), this.updateLineGraphHoverZones(), this.updateMilestonesPositions(), this.repositionSelectedTimestampCursor(), this.updateForbiddenIntervals(), this.updateMarkers(), this.emitVisibleInterval(nr.zoom), this.curtains && this.emitCurtainChange(), this.focusedTimestamp = void 0, this.$emit("time-scale-change", t));
|
|
11574
11570
|
},
|
|
11575
11571
|
emitCurtainChange() {
|
|
11576
11572
|
const { startDate: t, endDate: e } = this.calculateDateRangeFromCurtains();
|
|
@@ -11685,9 +11681,10 @@ const Fo = Ao.exports, W = {
|
|
|
11685
11681
|
markerElement: e,
|
|
11686
11682
|
dragEvent: r
|
|
11687
11683
|
}) {
|
|
11684
|
+
var h;
|
|
11688
11685
|
if (!t.isDraggable)
|
|
11689
11686
|
return;
|
|
11690
|
-
r.type === "start" && (this.initialMarkerDragMouseOffset = r.x - e.node().querySelector(`.${W.markerLine}`).getBoundingClientRect().left, e.classed(W.markerDragged, !0));
|
|
11687
|
+
(h = r.sourceEvent) == null || h.preventDefault(), r.type === "start" && (this.initialMarkerDragMouseOffset = r.x - e.node().querySelector(`.${W.markerLine}`).getBoundingClientRect().left, e.classed(W.markerDragged, !0));
|
|
11691
11688
|
const n = r.x - this.initialMarkerDragMouseOffset, a = this.timeScale.invert(
|
|
11692
11689
|
n - this.svg.node().getBoundingClientRect().left
|
|
11693
11690
|
), l = this.timeScale(a), i = this.isTimestampAllowedForMarker(
|
|
@@ -11695,11 +11692,11 @@ const Fo = Ao.exports, W = {
|
|
|
11695
11692
|
t
|
|
11696
11693
|
);
|
|
11697
11694
|
if (r.type === "drag" && i && e.attr("style", `left: ${l}px`), r.type === "end" && i) {
|
|
11698
|
-
const
|
|
11695
|
+
const s = t.id || t.timestamp;
|
|
11699
11696
|
this.markersPositions = {
|
|
11700
11697
|
...this.markersPositions,
|
|
11701
|
-
[
|
|
11702
|
-
...this.markersPositions[
|
|
11698
|
+
[s]: {
|
|
11699
|
+
...this.markersPositions[s],
|
|
11703
11700
|
position: l
|
|
11704
11701
|
}
|
|
11705
11702
|
}, e.classed(W.markerDragged, !1);
|
|
@@ -11718,8 +11715,7 @@ const Fo = Ao.exports, W = {
|
|
|
11718
11715
|
this.removeMarkersDragBehavior();
|
|
11719
11716
|
const t = this;
|
|
11720
11717
|
this.markersDragBehavior = D.drag().on("start", function(e, r) {
|
|
11721
|
-
|
|
11722
|
-
(n = e.sourceEvent) == null || n.preventDefault(), t.handleMarkerDrag({
|
|
11718
|
+
t.handleMarkerDrag({
|
|
11723
11719
|
marker: r,
|
|
11724
11720
|
markerElement: D.select(this),
|
|
11725
11721
|
dragEvent: e
|
|
@@ -12168,7 +12164,7 @@ const Fo = Ao.exports, W = {
|
|
|
12168
12164
|
getMarkerLineStyle(t) {
|
|
12169
12165
|
return {
|
|
12170
12166
|
background: t.color,
|
|
12171
|
-
height: `${this.timelineHeight +
|
|
12167
|
+
height: `${this.timelineHeight + 12}px`
|
|
12172
12168
|
};
|
|
12173
12169
|
},
|
|
12174
12170
|
tzStringToDate(t) {
|
|
@@ -15830,12 +15826,12 @@ const Ll = Ml.exports, El = {
|
|
|
15830
15826
|
type: Object,
|
|
15831
15827
|
required: !0
|
|
15832
15828
|
}
|
|
15829
|
+
},
|
|
15830
|
+
render() {
|
|
15831
|
+
return this.$scopedSlots.default();
|
|
15833
15832
|
}
|
|
15834
|
-
};
|
|
15835
|
-
var
|
|
15836
|
-
var e = this, r = e._self._c;
|
|
15837
|
-
return r("div", { staticClass: "e-context-provider" }, [e._t("default")], 2);
|
|
15838
|
-
}, kl = [], Pl = /* @__PURE__ */ X(
|
|
15833
|
+
}, $l = null, kl = null;
|
|
15834
|
+
var Pl = /* @__PURE__ */ X(
|
|
15839
15835
|
El,
|
|
15840
15836
|
$l,
|
|
15841
15837
|
kl,
|