@evercam/ui 0.0.36 → 0.0.38-alpha.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/README.md +47 -47
- package/dist/attributes.json +20 -9
- package/dist/index.mjs +5653 -1318
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +15 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/ETimeline.config.d.ts +5 -0
- package/dist/src/components/ETimeline.vue.d.ts +117 -0
- package/dist/src/directives/index.d.ts +1 -1
- package/dist/src/directives/resize-observer.d.ts +2 -2
- package/dist/src/index.d.ts +98 -3
- package/dist/src/types.d.ts +14 -0
- package/dist/style.css +1 -1
- package/dist/styles.css +3208 -3146
- package/dist/tags.json +9 -6
- package/dist/web-types.json +42 -15
- package/package.json +76 -71
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as d3 from "d3";
|
|
2
|
+
import Vue from "vue";
|
|
3
|
+
import { D3ZoomEvent } from "d3";
|
|
4
|
+
import { TimelineAxesConfig, TimelineAxis, TimelineTicksConfig, Timestamp } from '../types';
|
|
5
|
+
export type TimelineEvent = {
|
|
6
|
+
timestamp: string | Date;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
} | {
|
|
9
|
+
startDate: string | Date;
|
|
10
|
+
endDate: string | Date;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
export type TimelineEventsGroup = {
|
|
14
|
+
label: string;
|
|
15
|
+
color: string;
|
|
16
|
+
events: Array<TimelineEvent>;
|
|
17
|
+
};
|
|
18
|
+
export type TimelineEventsByType = {
|
|
19
|
+
[eventsType: string]: TimelineEventsGroup;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>, {
|
|
22
|
+
tooltip: HTMLElement;
|
|
23
|
+
cursor: HTMLElement;
|
|
24
|
+
timeline: HTMLElement;
|
|
25
|
+
selectedTimestampCursor: HTMLElement;
|
|
26
|
+
svg: d3.Selection<SVGSVGElement, any, any, any>;
|
|
27
|
+
axesContainer: d3.Selection<SVGGElement, any, any, any>;
|
|
28
|
+
xAxes: Record<TimelineAxis, d3.Axis<Date>>;
|
|
29
|
+
timeScale: d3.ScaleTime<any, any, unknown>;
|
|
30
|
+
initialTimeScale: d3.ScaleTime<any, any, unknown>;
|
|
31
|
+
currentTimeScaleDensity: number;
|
|
32
|
+
zoomBehavior: d3.ZoomBehavior<SVGSVGElement, unknown>;
|
|
33
|
+
isMouseDown: boolean;
|
|
34
|
+
axisHeight: number;
|
|
35
|
+
eventGroupHeight: number;
|
|
36
|
+
eventGroupPadding: number;
|
|
37
|
+
isHoveringEvent: boolean;
|
|
38
|
+
hoveredEvent: TimelineEvent;
|
|
39
|
+
isHoveringTimeline: boolean;
|
|
40
|
+
hoveredTimestamp: Date;
|
|
41
|
+
eventTooltipStyle: {};
|
|
42
|
+
hoveredEventType: string;
|
|
43
|
+
utcOffset: number;
|
|
44
|
+
}, {
|
|
45
|
+
utcToZonedTime(timestamp: Timestamp): Date;
|
|
46
|
+
getFormattedTimestamp(timestamp: Timestamp): string;
|
|
47
|
+
handleResize({ contentRect }: ResizeObserverEntry): void;
|
|
48
|
+
initTimeline(): void;
|
|
49
|
+
initRefs(): void;
|
|
50
|
+
initSvg(): void;
|
|
51
|
+
initUtcOffset(): void;
|
|
52
|
+
initTimeScale(): void;
|
|
53
|
+
initXAxes(): void;
|
|
54
|
+
createAxis(axisName: TimelineAxis): d3.Axis<Date>;
|
|
55
|
+
getAxisTicksConfig(configs: TimelineTicksConfig[]): {
|
|
56
|
+
formatFn: (d: Date) => string;
|
|
57
|
+
interval: any;
|
|
58
|
+
};
|
|
59
|
+
initZoomBehavior(): void;
|
|
60
|
+
initSelectedTimestampCursor(): void;
|
|
61
|
+
repositionSelectedTimestampCursor(): void;
|
|
62
|
+
updateCurrentTimeScaleDensity(): void;
|
|
63
|
+
registerEventsListeners(): void;
|
|
64
|
+
handleMouseDown(): void;
|
|
65
|
+
handleDocumentMouseUp(): void;
|
|
66
|
+
handleMouseLeave(): void;
|
|
67
|
+
handleMouseMove(event: MouseEvent): void;
|
|
68
|
+
handleClick(event: MouseEvent): void;
|
|
69
|
+
handleEventMouseOver(_event: MouseEvent, eventData: TimelineEvent, eventType: string): void;
|
|
70
|
+
handleEventMouseOut(): void;
|
|
71
|
+
handleZoom(event: D3ZoomEvent<SVGSVGElement, any>): void;
|
|
72
|
+
zoomToStartAndEndDates(): void;
|
|
73
|
+
rescaleAxis(axisName: string, newScale: d3.ScaleTime<any, any, unknown>): void;
|
|
74
|
+
translateTicksText(axisName: string): void;
|
|
75
|
+
updateEventsRects(): void;
|
|
76
|
+
getEventRectX(d: TimelineEvent): any;
|
|
77
|
+
getEventRectWidth(d: TimelineEvent): number;
|
|
78
|
+
drawEventsGroups(): void;
|
|
79
|
+
drawBackground({ color, yPosition, gElement, }: {
|
|
80
|
+
gElement: d3.Selection<SVGGElement, any, any, any>;
|
|
81
|
+
yPosition: number;
|
|
82
|
+
color: string;
|
|
83
|
+
}): void;
|
|
84
|
+
drawEvents({ events, gElement, yPosition, color, type, }: {
|
|
85
|
+
events: TimelineEvent[];
|
|
86
|
+
gElement: d3.Selection<SVGGElement, any, any, any>;
|
|
87
|
+
yPosition: number;
|
|
88
|
+
color: string;
|
|
89
|
+
type: string;
|
|
90
|
+
}): void;
|
|
91
|
+
drawTextLabel({ gElement, yPosition, color, label, }: {
|
|
92
|
+
gElement: d3.Selection<SVGGElement, any, any, any>;
|
|
93
|
+
yPosition: number;
|
|
94
|
+
color: string;
|
|
95
|
+
label: string;
|
|
96
|
+
}): void;
|
|
97
|
+
getTextFillColor(baseColor: string): string;
|
|
98
|
+
getLabelBackgroundColor(baseColor: string): string;
|
|
99
|
+
onDarkModeChange(): void;
|
|
100
|
+
}, {
|
|
101
|
+
labelRectWidth: number;
|
|
102
|
+
combinedXAxesHeight: number;
|
|
103
|
+
timelineHeight: number;
|
|
104
|
+
allEventsSorted: TimelineEvent[];
|
|
105
|
+
oldestEvent: TimelineEvent;
|
|
106
|
+
latestEvent: TimelineEvent;
|
|
107
|
+
}, {
|
|
108
|
+
eventsGroups: {};
|
|
109
|
+
xAxesConfig: TimelineAxesConfig;
|
|
110
|
+
dark: boolean;
|
|
111
|
+
startDate: string;
|
|
112
|
+
endDate: string;
|
|
113
|
+
selectedTimestamp: string;
|
|
114
|
+
showEventTooltip: boolean;
|
|
115
|
+
disableZoom: boolean;
|
|
116
|
+
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin>;
|
|
117
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ResizeObserverDirective from '../directives/resize-observer';
|
|
2
2
|
export declare const DirectivesMap: {
|
|
3
3
|
name: string;
|
|
4
|
-
definition: import("vue").
|
|
4
|
+
definition: import("vue").DirectiveOptions;
|
|
5
5
|
}[];
|
|
6
6
|
export { ResizeObserverDirective };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DirectiveOptions } from "vue";
|
|
2
2
|
export interface ObservedElement extends HTMLElement {
|
|
3
3
|
__resizeObserver__?: ResizeObserver;
|
|
4
4
|
}
|
|
5
|
-
declare const ResizeObserverDirective:
|
|
5
|
+
declare const ResizeObserverDirective: DirectiveOptions;
|
|
6
6
|
export default ResizeObserverDirective;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import ESpinner from './components/ESpinner.vue';
|
|
|
5
5
|
import ERow from './components/ERow.vue';
|
|
6
6
|
import ECol from './components/ECol.vue';
|
|
7
7
|
import EVideoPlayer from './components/EVideoPlayer.vue';
|
|
8
|
-
import
|
|
8
|
+
import ETimeline from './components/ETimeline.vue';
|
|
9
9
|
import { VueConstructor } from "vue";
|
|
10
10
|
export declare const components: {
|
|
11
11
|
EAvatar: import("vue/types/vue").ExtendedVue<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>, {
|
|
@@ -170,13 +170,108 @@ export declare const components: {
|
|
|
170
170
|
videoListeners: {};
|
|
171
171
|
videoOptions: {};
|
|
172
172
|
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin>;
|
|
173
|
-
|
|
173
|
+
ETimeline: import("vue/types/vue").ExtendedVue<import("vue").default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => import("vue").default<Record<string, any>, Record<string, any>, never, never, any>>, {
|
|
174
|
+
tooltip: HTMLElement;
|
|
175
|
+
cursor: HTMLElement;
|
|
176
|
+
timeline: HTMLElement;
|
|
177
|
+
selectedTimestampCursor: HTMLElement;
|
|
178
|
+
svg: import("d3-selection").Selection<SVGSVGElement, any, any, any>;
|
|
179
|
+
axesContainer: import("d3-selection").Selection<SVGGElement, any, any, any>;
|
|
180
|
+
xAxes: Record<import('./types').TimelineAxis, import("d3-axis").Axis<Date>>;
|
|
181
|
+
timeScale: import("d3-scale").ScaleTime<any, any, unknown>;
|
|
182
|
+
initialTimeScale: import("d3-scale").ScaleTime<any, any, unknown>;
|
|
183
|
+
currentTimeScaleDensity: number;
|
|
184
|
+
zoomBehavior: import("d3-zoom").ZoomBehavior<SVGSVGElement, unknown>;
|
|
185
|
+
isMouseDown: boolean;
|
|
186
|
+
axisHeight: number;
|
|
187
|
+
eventGroupHeight: number;
|
|
188
|
+
eventGroupPadding: number;
|
|
189
|
+
isHoveringEvent: boolean;
|
|
190
|
+
hoveredEvent: import('./components/ETimeline.vue').TimelineEvent;
|
|
191
|
+
isHoveringTimeline: boolean;
|
|
192
|
+
hoveredTimestamp: Date;
|
|
193
|
+
eventTooltipStyle: {};
|
|
194
|
+
hoveredEventType: string;
|
|
195
|
+
utcOffset: number;
|
|
196
|
+
}, {
|
|
197
|
+
utcToZonedTime(timestamp: import('./types').Timestamp): Date;
|
|
198
|
+
getFormattedTimestamp(timestamp: import('./types').Timestamp): string;
|
|
199
|
+
handleResize({ contentRect }: ResizeObserverEntry): void;
|
|
200
|
+
initTimeline(): void;
|
|
201
|
+
initRefs(): void;
|
|
202
|
+
initSvg(): void;
|
|
203
|
+
initUtcOffset(): void;
|
|
204
|
+
initTimeScale(): void;
|
|
205
|
+
initXAxes(): void;
|
|
206
|
+
createAxis(axisName: import('./types').TimelineAxis): import("d3-axis").Axis<Date>;
|
|
207
|
+
getAxisTicksConfig(configs: import('./types').TimelineTicksConfig[]): {
|
|
208
|
+
formatFn: (d: Date) => string;
|
|
209
|
+
interval: any;
|
|
210
|
+
};
|
|
211
|
+
initZoomBehavior(): void;
|
|
212
|
+
initSelectedTimestampCursor(): void;
|
|
213
|
+
repositionSelectedTimestampCursor(): void;
|
|
214
|
+
updateCurrentTimeScaleDensity(): void;
|
|
215
|
+
registerEventsListeners(): void;
|
|
216
|
+
handleMouseDown(): void;
|
|
217
|
+
handleDocumentMouseUp(): void;
|
|
218
|
+
handleMouseLeave(): void;
|
|
219
|
+
handleMouseMove(event: MouseEvent): void;
|
|
220
|
+
handleClick(event: MouseEvent): void;
|
|
221
|
+
handleEventMouseOver(_event: MouseEvent, eventData: import('./components/ETimeline.vue').TimelineEvent, eventType: string): void;
|
|
222
|
+
handleEventMouseOut(): void;
|
|
223
|
+
handleZoom(event: import("d3-zoom").D3ZoomEvent<SVGSVGElement, any>): void;
|
|
224
|
+
zoomToStartAndEndDates(): void;
|
|
225
|
+
rescaleAxis(axisName: string, newScale: import("d3-scale").ScaleTime<any, any, unknown>): void;
|
|
226
|
+
translateTicksText(axisName: string): void;
|
|
227
|
+
updateEventsRects(): void;
|
|
228
|
+
getEventRectX(d: import('./components/ETimeline.vue').TimelineEvent): any;
|
|
229
|
+
getEventRectWidth(d: import('./components/ETimeline.vue').TimelineEvent): number;
|
|
230
|
+
drawEventsGroups(): void;
|
|
231
|
+
drawBackground({ color, yPosition, gElement, }: {
|
|
232
|
+
gElement: import("d3-selection").Selection<SVGGElement, any, any, any>;
|
|
233
|
+
yPosition: number;
|
|
234
|
+
color: string;
|
|
235
|
+
}): void;
|
|
236
|
+
drawEvents({ events, gElement, yPosition, color, type, }: {
|
|
237
|
+
events: import('./components/ETimeline.vue').TimelineEvent[];
|
|
238
|
+
gElement: import("d3-selection").Selection<SVGGElement, any, any, any>;
|
|
239
|
+
yPosition: number;
|
|
240
|
+
color: string;
|
|
241
|
+
type: string;
|
|
242
|
+
}): void;
|
|
243
|
+
drawTextLabel({ gElement, yPosition, color, label, }: {
|
|
244
|
+
gElement: import("d3-selection").Selection<SVGGElement, any, any, any>;
|
|
245
|
+
yPosition: number;
|
|
246
|
+
color: string;
|
|
247
|
+
label: string;
|
|
248
|
+
}): void;
|
|
249
|
+
getTextFillColor(baseColor: string): string;
|
|
250
|
+
getLabelBackgroundColor(baseColor: string): string;
|
|
251
|
+
onDarkModeChange(): void;
|
|
252
|
+
}, {
|
|
253
|
+
labelRectWidth: number;
|
|
254
|
+
combinedXAxesHeight: number;
|
|
255
|
+
timelineHeight: number;
|
|
256
|
+
allEventsSorted: import('./components/ETimeline.vue').TimelineEvent[];
|
|
257
|
+
oldestEvent: import('./components/ETimeline.vue').TimelineEvent;
|
|
258
|
+
latestEvent: import('./components/ETimeline.vue').TimelineEvent;
|
|
259
|
+
}, {
|
|
260
|
+
eventsGroups: {};
|
|
261
|
+
xAxesConfig: import('./types').TimelineAxesConfig;
|
|
262
|
+
dark: boolean;
|
|
263
|
+
startDate: string;
|
|
264
|
+
endDate: string;
|
|
265
|
+
selectedTimestamp: string;
|
|
266
|
+
showEventTooltip: boolean;
|
|
267
|
+
disableZoom: boolean;
|
|
268
|
+
}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin>;
|
|
174
269
|
};
|
|
175
270
|
declare const _default: {
|
|
176
271
|
install(Vue: VueConstructor): void;
|
|
177
272
|
};
|
|
178
273
|
export default _default;
|
|
179
|
-
export { EAvatar, EBadge, EIcon, ESpinner, ERow, ECol, EVideoPlayer,
|
|
274
|
+
export { EAvatar, EBadge, EIcon, ESpinner, ERow, ECol, EVideoPlayer, ETimeline };
|
|
180
275
|
export * from './constants';
|
|
181
276
|
export * from './types';
|
|
182
277
|
export * from './utils';
|
package/dist/src/types.d.ts
CHANGED
|
@@ -34,5 +34,19 @@ export type FlexJustifyContent = "around" | "between" | "center" | "end" | "even
|
|
|
34
34
|
export type FlexAlignItems = "start" | "center" | "end" | "baseline" | "stretch";
|
|
35
35
|
export type FlexAlignContent = "around" | "baseline" | "between" | "center" | "end" | "evenly" | "normal" | "start" | "stretch";
|
|
36
36
|
export type FlexAlignSelf = "auto" | "baseline" | "center" | "end" | "start" | "stretch";
|
|
37
|
+
export declare enum TimelineAxis {
|
|
38
|
+
overview = "overview",
|
|
39
|
+
detailed = "detailed",
|
|
40
|
+
detailedBackground = "detailedBackground"
|
|
41
|
+
}
|
|
42
|
+
export type TimelineTicksConfig = {
|
|
43
|
+
precision: number;
|
|
44
|
+
interval: any;
|
|
45
|
+
format: string | ((d: Date) => string);
|
|
46
|
+
};
|
|
47
|
+
export type TimelineAxesConfig = {
|
|
48
|
+
[key in TimelineAxis]: TimelineTicksConfig[];
|
|
49
|
+
};
|
|
50
|
+
export type Timestamp = Date | string | number;
|
|
37
51
|
declare const _default: {};
|
|
38
52
|
export default _default;
|