Comparing version 1.0.156 to 1.0.157
@@ -137,14 +137,19 @@ "use strict"; | ||
}); | ||
// const frames = computed(() => { | ||
// if (dirty.value) return [] | ||
// if (!lifetime.value) return [] | ||
// if (cursor.value < lifetime.value[0] || cursor.value > lifetime.value[1]) return [] | ||
// const start = new Date(cursor.value.getFullYear(), cursor.value.getMonth(), cursor.value.getDate(), cursor.value.getHours(), cursor.value.getMinutes(), 0, 0) | ||
// const end = AgHelper.offsetTime(start, 60 * 1000) | ||
// if (hot.value.deltas && hot.value.deltas.length > 0 && hot.value.deltas[0].time > start) { | ||
// return hot.value.deltas.filter(v => v.time >= start && v.time < end).map(v => v.time) | ||
// } else { | ||
// return deltas_cache.get(index.value.type, index.value.id, start).filter(v => v.time >= start && v.time < end).map(v => v.time) | ||
// } | ||
// }) | ||
var relative_phrases = (0, AgVueWrap_1.computed)(function () { | ||
var _a, _b; | ||
if (dirty.value) | ||
return []; | ||
var start = new Date(cursor.value.getFullYear(), cursor.value.getMonth(), cursor.value.getDate(), cursor.value.getHours(), cursor.value.getMinutes(), 0, 0); | ||
var end = AgHelper_1.AgHelper.offsetTime(start, 60 * 1000); | ||
var phrases = __spreadArray(__spreadArray([], (_b = (_a = hot.value.phrases) === null || _a === void 0 ? void 0 : _a.filter(function (v) { return v.start <= end && v.end >= start; })) !== null && _b !== void 0 ? _b : [], true), deltas_cache.cache.filter(function (v) { return v.type === index.type && v.id === index.id && v.start <= end && v.end >= start; }), true); | ||
return phrases; | ||
}); | ||
var frames = (0, AgVueWrap_1.computed)(function () { | ||
if (dirty.value) | ||
return []; | ||
var phrases = relative_phrases.value; | ||
var start = new Date(cursor.value.getFullYear(), cursor.value.getMonth(), cursor.value.getDate(), cursor.value.getHours(), cursor.value.getMinutes(), 0, 0); | ||
var end = AgHelper_1.AgHelper.offsetTime(start, 60 * 1000); | ||
return phrases.map(function (p) { return p.deltas.map(function (v) { return v.time; }); }).flat().filter(function (v) { return v >= start && v < end; }); | ||
}); | ||
var frequency = (0, AgVueWrap_1.computed)(function () { | ||
@@ -165,3 +170,3 @@ if (dirty.value) | ||
return { | ||
get frames() { return []; }, | ||
get frames() { return frames.value; }, | ||
// get frames(): Date[] { return frames.value }, | ||
@@ -253,2 +258,3 @@ get value() { return value.value; }, | ||
return { | ||
cache: cache, | ||
get: function (type, id, time) { | ||
@@ -255,0 +261,0 @@ var i = cache.findIndex(function (v) { return v.type === type && v.id === id && v.start <= time && v.end >= time; }); |
{ | ||
"name": "ag-repo", | ||
"version": "1.0.156", | ||
"version": "1.0.157", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "", |
160880
3602