@vue-skuilder/db 0.2.14 → 0.2.16
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/{contentSource-C-0t0y0V.d.ts → contentSource-B1p-vdz7.d.ts} +7 -0
- package/dist/{contentSource-jSkcOt2s.d.cts → contentSource-Brz42x7n.d.cts} +7 -0
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +6 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +6 -3
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BB0oi9T0.d.ts → dataLayerProvider-BWayUIoK.d.ts} +1 -1
- package/dist/{dataLayerProvider-BDClIrFC.d.cts → dataLayerProvider-CpwpT1rM.d.cts} +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +6 -3
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +6 -3
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +6 -3
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +6 -3
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +41 -5
- package/dist/index.d.ts +41 -5
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/interfaces/userDB.ts +8 -0
- package/src/impl/common/BaseUserDB.ts +2 -2
- package/src/impl/common/userDBHelpers.ts +14 -1
- package/src/index.ts +6 -0
- package/src/study/SessionOverlay.ts +16 -3
- package/src/study/index.ts +4 -0
- package/src/study/services/CardHydrationService.ts +9 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-
|
|
2
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-Brz42x7n.cjs';
|
|
2
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-CpwpT1rM.cjs';
|
|
3
3
|
import { S as StaticCourseManifest } from '../../types-BFUa1pa3.cjs';
|
|
4
4
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
5
5
|
import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-4tlwHnXo.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-
|
|
2
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-B1p-vdz7.js';
|
|
2
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-BWayUIoK.js';
|
|
3
3
|
import { S as StaticCourseManifest } from '../../types-CHgpWQAY.js';
|
|
4
4
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
5
5
|
import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-4tlwHnXo.js';
|
|
@@ -199,6 +199,9 @@ var init_dataDirectory = __esm({
|
|
|
199
199
|
});
|
|
200
200
|
|
|
201
201
|
// src/impl/common/userDBHelpers.ts
|
|
202
|
+
function makeScheduledCardId(reviewTime) {
|
|
203
|
+
return DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + import_moment.default.utc(reviewTime).format(REVIEW_TIME_FORMAT);
|
|
204
|
+
}
|
|
202
205
|
function filterAllDocsByPrefix(db, prefix, opts) {
|
|
203
206
|
const options = {
|
|
204
207
|
startkey: prefix,
|
|
@@ -228,7 +231,7 @@ function scheduleCardReviewLocal(userDB, review) {
|
|
|
228
231
|
const now = import_moment.default.utc();
|
|
229
232
|
logger.info(`Scheduling for review in: ${review.time.diff(now, "h") / 24} days`);
|
|
230
233
|
void userDB.put({
|
|
231
|
-
_id:
|
|
234
|
+
_id: makeScheduledCardId(review.time),
|
|
232
235
|
cardId: review.card_id,
|
|
233
236
|
reviewTime: review.time.toISOString(),
|
|
234
237
|
courseId: review.course_id,
|
|
@@ -5749,9 +5752,9 @@ Currently logged-in as ${this._username}.`
|
|
|
5749
5752
|
}
|
|
5750
5753
|
}).map((r) => r.doc);
|
|
5751
5754
|
}
|
|
5752
|
-
async getReviewsForcast(daysCount) {
|
|
5755
|
+
async getReviewsForcast(daysCount, course_id) {
|
|
5753
5756
|
const time = import_moment6.default.utc().add(daysCount, "days");
|
|
5754
|
-
return this.getReviewstoDate(time);
|
|
5757
|
+
return this.getReviewstoDate(time, course_id);
|
|
5755
5758
|
}
|
|
5756
5759
|
async getPendingReviews(course_id) {
|
|
5757
5760
|
const now = import_moment6.default.utc();
|