@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
package/dist/index.mjs
CHANGED
|
@@ -221,6 +221,9 @@ var init_dataDirectory = __esm({
|
|
|
221
221
|
|
|
222
222
|
// src/impl/common/userDBHelpers.ts
|
|
223
223
|
import moment from "moment";
|
|
224
|
+
function makeScheduledCardId(reviewTime) {
|
|
225
|
+
return DocTypePrefixes["SCHEDULED_CARD" /* SCHEDULED_CARD */] + moment.utc(reviewTime).format(REVIEW_TIME_FORMAT);
|
|
226
|
+
}
|
|
224
227
|
function hexEncode(str) {
|
|
225
228
|
let hex;
|
|
226
229
|
let returnStr = "";
|
|
@@ -276,7 +279,7 @@ function scheduleCardReviewLocal(userDB, review) {
|
|
|
276
279
|
const now = moment.utc();
|
|
277
280
|
logger.info(`Scheduling for review in: ${review.time.diff(now, "h") / 24} days`);
|
|
278
281
|
void userDB.put({
|
|
279
|
-
_id:
|
|
282
|
+
_id: makeScheduledCardId(review.time),
|
|
280
283
|
cardId: review.card_id,
|
|
281
284
|
reviewTime: review.time.toISOString(),
|
|
282
285
|
courseId: review.course_id,
|
|
@@ -7989,9 +7992,9 @@ Currently logged-in as ${this._username}.`
|
|
|
7989
7992
|
}
|
|
7990
7993
|
}).map((r) => r.doc);
|
|
7991
7994
|
}
|
|
7992
|
-
async getReviewsForcast(daysCount) {
|
|
7995
|
+
async getReviewsForcast(daysCount, course_id) {
|
|
7993
7996
|
const time = moment6.utc().add(daysCount, "days");
|
|
7994
|
-
return this.getReviewstoDate(time);
|
|
7997
|
+
return this.getReviewstoDate(time, course_id);
|
|
7995
7998
|
}
|
|
7996
7999
|
async getPendingReviews(course_id) {
|
|
7997
8000
|
const now = moment6.utc();
|
|
@@ -11542,7 +11545,7 @@ var CardHydrationService = class {
|
|
|
11542
11545
|
}
|
|
11543
11546
|
const data = dataDocs.map(displayableDataToViewData).reverse();
|
|
11544
11547
|
this.hydratedCards.set(item.cardID, {
|
|
11545
|
-
item,
|
|
11548
|
+
item: { ...item, elo: toCourseElo8(cardData.elo).global.score },
|
|
11546
11549
|
view,
|
|
11547
11550
|
data,
|
|
11548
11551
|
tags: tagsByCard.get(item.cardID) ?? []
|
|
@@ -15160,6 +15163,7 @@ init_TagFilteredContentSource();
|
|
|
15160
15163
|
|
|
15161
15164
|
// src/index.ts
|
|
15162
15165
|
init_factory();
|
|
15166
|
+
init_userDBHelpers();
|
|
15163
15167
|
export {
|
|
15164
15168
|
ContentNavigator,
|
|
15165
15169
|
CouchDBToStaticPacker,
|
|
@@ -15177,6 +15181,7 @@ export {
|
|
|
15177
15181
|
NavigatorRoles,
|
|
15178
15182
|
Navigators,
|
|
15179
15183
|
QuotaRoundRobinMixer,
|
|
15184
|
+
REVIEW_TIME_FORMAT,
|
|
15180
15185
|
SessionController,
|
|
15181
15186
|
StaticToCouchDBMigrator,
|
|
15182
15187
|
TagFilteredContentSource,
|
|
@@ -15197,6 +15202,7 @@ export {
|
|
|
15197
15202
|
docIsDeleted,
|
|
15198
15203
|
endSessionTracking,
|
|
15199
15204
|
ensureAppDataDirectory,
|
|
15205
|
+
getActiveController,
|
|
15200
15206
|
getActivePipeline,
|
|
15201
15207
|
getAppDataDirectory,
|
|
15202
15208
|
getCardHistoryID,
|
|
@@ -15222,6 +15228,7 @@ export {
|
|
|
15222
15228
|
isQuestionTypeRegistered,
|
|
15223
15229
|
isReview,
|
|
15224
15230
|
log,
|
|
15231
|
+
makeScheduledCardId,
|
|
15225
15232
|
mixerDebugAPI,
|
|
15226
15233
|
mountMixerDebugger,
|
|
15227
15234
|
mountPipelineDebugger,
|
|
@@ -15233,6 +15240,7 @@ export {
|
|
|
15233
15240
|
processCustomQuestionsData,
|
|
15234
15241
|
recordCardPresentation,
|
|
15235
15242
|
recordUserOutcome,
|
|
15243
|
+
registerActiveController,
|
|
15236
15244
|
registerBlanksCard,
|
|
15237
15245
|
registerCustomQuestionTypes,
|
|
15238
15246
|
registerDataShape,
|
|
@@ -15247,6 +15255,7 @@ export {
|
|
|
15247
15255
|
sessionDebugAPI,
|
|
15248
15256
|
snapshotQueues,
|
|
15249
15257
|
startSessionTracking,
|
|
15258
|
+
toggleSessionOverlay,
|
|
15250
15259
|
updateLearningState,
|
|
15251
15260
|
updateStrategyWeight,
|
|
15252
15261
|
userDBDebugAPI,
|