@vue-skuilder/db 0.2.14 → 0.2.15
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 +17 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-
|
|
1
|
+
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-B1p-vdz7.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Main factory interface for data access
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-
|
|
1
|
+
import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-Brz42x7n.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Main factory interface for data access
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-4tlwHnXo.cjs';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, G as GeneratorResult, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, S as StudySessionItem, j as ScheduledCard } from '../../contentSource-
|
|
4
|
-
export { q as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, r as getStudySource, p as isReview } from '../../contentSource-
|
|
3
|
+
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, G as GeneratorResult, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, S as StudySessionItem, j as ScheduledCard } from '../../contentSource-Brz42x7n.cjs';
|
|
4
|
+
export { q as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, r as getStudySource, p as isReview } from '../../contentSource-Brz42x7n.cjs';
|
|
5
5
|
import * as _vue_skuilder_common from '@vue-skuilder/common';
|
|
6
6
|
import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
|
|
7
7
|
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-4tlwHnXo.js';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, G as GeneratorResult, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, S as StudySessionItem, j as ScheduledCard } from '../../contentSource-
|
|
4
|
-
export { q as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, r as getStudySource, p as isReview } from '../../contentSource-
|
|
3
|
+
import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, G as GeneratorResult, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, S as StudySessionItem, j as ScheduledCard } from '../../contentSource-B1p-vdz7.js';
|
|
4
|
+
export { q as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, r as getStudySource, p as isReview } from '../../contentSource-B1p-vdz7.js';
|
|
5
5
|
import * as _vue_skuilder_common from '@vue-skuilder/common';
|
|
6
6
|
import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
|
|
7
7
|
import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.js';
|
package/dist/impl/couch/index.js
CHANGED
|
@@ -6708,6 +6708,9 @@ var init_dataDirectory = __esm({
|
|
|
6708
6708
|
});
|
|
6709
6709
|
|
|
6710
6710
|
// src/impl/common/userDBHelpers.ts
|
|
6711
|
+
function makeScheduledCardId(reviewTime) {
|
|
6712
|
+
return DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + import_moment3.default.utc(reviewTime).format(REVIEW_TIME_FORMAT2);
|
|
6713
|
+
}
|
|
6711
6714
|
function hexEncode(str) {
|
|
6712
6715
|
let hex;
|
|
6713
6716
|
let returnStr = "";
|
|
@@ -6763,7 +6766,7 @@ function scheduleCardReviewLocal(userDB, review) {
|
|
|
6763
6766
|
const now = import_moment3.default.utc();
|
|
6764
6767
|
logger.info(`Scheduling for review in: ${review.time.diff(now, "h") / 24} days`);
|
|
6765
6768
|
void userDB.put({
|
|
6766
|
-
_id:
|
|
6769
|
+
_id: makeScheduledCardId(review.time),
|
|
6767
6770
|
cardId: review.card_id,
|
|
6768
6771
|
reviewTime: review.time.toISOString(),
|
|
6769
6772
|
courseId: review.course_id,
|
|
@@ -7676,9 +7679,9 @@ Currently logged-in as ${this._username}.`
|
|
|
7676
7679
|
}
|
|
7677
7680
|
}).map((r) => r.doc);
|
|
7678
7681
|
}
|
|
7679
|
-
async getReviewsForcast(daysCount) {
|
|
7682
|
+
async getReviewsForcast(daysCount, course_id) {
|
|
7680
7683
|
const time = import_moment5.default.utc().add(daysCount, "days");
|
|
7681
|
-
return this.getReviewstoDate(time);
|
|
7684
|
+
return this.getReviewstoDate(time, course_id);
|
|
7682
7685
|
}
|
|
7683
7686
|
async getPendingReviews(course_id) {
|
|
7684
7687
|
const now = import_moment5.default.utc();
|