@shaxpir/duiduidui-models 1.37.0 → 1.37.2
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/models/Condition.js +16 -2
- package/dist/models/Device.d.ts +1 -1
- package/dist/models/Device.js +6 -1
- package/package.json +1 -1
package/dist/models/Condition.js
CHANGED
|
@@ -14,7 +14,14 @@ exports.Condition = {
|
|
|
14
14
|
gradeD: () => ({ type: 'grade', grade: 'D' }),
|
|
15
15
|
gradeF: () => ({ type: 'grade', grade: 'F' }),
|
|
16
16
|
// Theta conditions
|
|
17
|
-
theta: (min, max) =>
|
|
17
|
+
theta: (min, max) => {
|
|
18
|
+
const c = { type: 'theta' };
|
|
19
|
+
if (min !== undefined)
|
|
20
|
+
c.min = min;
|
|
21
|
+
if (max !== undefined)
|
|
22
|
+
c.max = max;
|
|
23
|
+
return c;
|
|
24
|
+
},
|
|
18
25
|
learningZone: () => ({ type: 'theta', min: 0.4, max: 0.6 }),
|
|
19
26
|
struggling: () => ({ type: 'theta', max: 0.3 }),
|
|
20
27
|
nearMastery: () => ({ type: 'theta', min: 0.7, max: 0.8 }),
|
|
@@ -33,7 +40,14 @@ exports.Condition = {
|
|
|
33
40
|
starred: () => ({ type: 'starred', value: true }),
|
|
34
41
|
notStarred: () => ({ type: 'starred', value: false }),
|
|
35
42
|
// Difficulty conditions
|
|
36
|
-
difficulty: (min, max) =>
|
|
43
|
+
difficulty: (min, max) => {
|
|
44
|
+
const c = { type: 'difficulty' };
|
|
45
|
+
if (min !== undefined)
|
|
46
|
+
c.min = min;
|
|
47
|
+
if (max !== undefined)
|
|
48
|
+
c.max = max;
|
|
49
|
+
return c;
|
|
50
|
+
},
|
|
37
51
|
beginner: () => ({ type: 'difficulty', max: 100 }), // Very easy content
|
|
38
52
|
elementary: () => ({ type: 'difficulty', min: 100, max: 500 }), // Easy
|
|
39
53
|
intermediate: () => ({ type: 'difficulty', min: 500, max: 1500 }), // Medium
|
package/dist/models/Device.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare class Device extends Content {
|
|
|
63
63
|
setReviewAutoPlaySpeech(value: boolean): void;
|
|
64
64
|
setReviewCardLimit(value: number | null): void;
|
|
65
65
|
setReviewChallenge(value: ChallengeLevel): void;
|
|
66
|
-
setReviewCollection(value: string |
|
|
66
|
+
setReviewCollection(value: string | null): void;
|
|
67
67
|
get reviewCustomConditions(): Conditions;
|
|
68
68
|
setReviewCustomConditions(value: Conditions): void;
|
|
69
69
|
getBuiltInDbState(): BuiltInDbState | undefined;
|
package/dist/models/Device.js
CHANGED
|
@@ -114,7 +114,12 @@ class Device extends Content_1.Content {
|
|
|
114
114
|
setReviewCollection(value) {
|
|
115
115
|
this.checkDisposed("Device.setReviewCollection");
|
|
116
116
|
const batch = new Operation_1.BatchOperation(this);
|
|
117
|
-
|
|
117
|
+
if (value) {
|
|
118
|
+
batch.setPathValue(['payload', 'review_config', 'selection', 'collection'], value);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
batch.removeValueAtPath(['payload', 'review_config', 'selection', 'collection']);
|
|
122
|
+
}
|
|
118
123
|
batch.commit();
|
|
119
124
|
}
|
|
120
125
|
// Review Custom Conditions (for Custom mode)
|