case-editor-tools 1.6.5 → 1.6.6
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Expression } from "survey-engine/data_types";
|
|
2
2
|
import { Duration } from "../types/duration";
|
|
3
3
|
export declare const NativeStudyEngineExpressions: {
|
|
4
|
-
checkEventType: (equalsType: 'ENTER' | 'SUBMIT' | 'TIMER' | 'MERGE' | 'LEAVE') => Expression;
|
|
4
|
+
checkEventType: (equalsType: 'ENTER' | 'SUBMIT' | 'TIMER' | 'MERGE' | 'CUSTOM' | 'LEAVE') => Expression;
|
|
5
|
+
checkEventKey: (equalsKey: string) => Expression;
|
|
5
6
|
checkSurveyResponseKey: (surveyKey: string) => Expression;
|
|
6
7
|
responseHasKeysAny: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
7
8
|
responseHasOnlyKeysOtherThan: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
@@ -157,7 +158,8 @@ export declare const StudyEngine: {
|
|
|
157
158
|
finishParticipation: () => Expression;
|
|
158
159
|
};
|
|
159
160
|
notifyResearcher: (messageType: string, ...payload: Expression[] | string[]) => Expression;
|
|
160
|
-
checkEventType: (equalsType: 'ENTER' | 'SUBMIT' | 'TIMER' | 'MERGE' | 'LEAVE') => Expression;
|
|
161
|
+
checkEventType: (equalsType: 'ENTER' | 'SUBMIT' | 'TIMER' | 'MERGE' | 'CUSTOM' | 'LEAVE') => Expression;
|
|
162
|
+
checkEventKey: (equalsKey: string) => Expression;
|
|
161
163
|
checkSurveyResponseKey: (surveyKey: string) => Expression;
|
|
162
164
|
responseHasKeysAny: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
163
165
|
responseHasOnlyKeysOtherThan: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
@@ -17,6 +17,12 @@ const not = (arg) => expressionUtils_expressionGen.generateExpression('not', und
|
|
|
17
17
|
* @returns if event type matches the argument, return true otherwise false
|
|
18
18
|
*/
|
|
19
19
|
const checkEventType = (equalsType) => expressionUtils_expressionGen.generateExpression('checkEventType', undefined, equalsType);
|
|
20
|
+
/**
|
|
21
|
+
* Check if the current event has the given key
|
|
22
|
+
* @param equalsKey string
|
|
23
|
+
* @returns if event key matches the argument, return true otherwise false
|
|
24
|
+
*/
|
|
25
|
+
const checkEventKey = (equalsKey) => expressionUtils_expressionGen.generateExpression('checkEventKey', undefined, equalsKey);
|
|
20
26
|
/**
|
|
21
27
|
* Check if the submitted survey has a specific key
|
|
22
28
|
* @param surveyKey string to check for
|
|
@@ -411,6 +417,7 @@ const hasSurveyKeyValidUntilSoonerThan = (surveyKey, delta, reference) => {
|
|
|
411
417
|
};
|
|
412
418
|
const NativeStudyEngineExpressions = {
|
|
413
419
|
checkEventType,
|
|
420
|
+
checkEventKey,
|
|
414
421
|
// Response checkers
|
|
415
422
|
checkSurveyResponseKey,
|
|
416
423
|
responseHasKeysAny,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studyEngineExpressions.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"studyEngineExpressions.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "case-editor-tools",
|
|
3
3
|
"description": "Javascript tools to simplify survey and study coding for CASE.",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.6",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|