case-editor-tools 1.0.0-beta.28 → 1.0.0-beta.29
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.
|
@@ -7,6 +7,8 @@ export declare const NativeStudyEngineExpressions: {
|
|
|
7
7
|
responseHasOnlyKeysOtherThan: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
8
8
|
getResponseValueAsNum: (itemKey: string, responseKey: string) => Expression;
|
|
9
9
|
getResponseValueAsStr: (itemKey: string, responseKey: string) => Expression;
|
|
10
|
+
hasResponseKey: (itemKey: string, responseKey: string) => Expression;
|
|
11
|
+
hasResponseKeyWithValue: (itemKey: string, responseKey: string, value: string) => Expression;
|
|
10
12
|
countResponseItems: (itemKey: string, responseKey: string) => Expression;
|
|
11
13
|
checkConditionForOldResponses: (condition: Expression, checkType?: number | "all" | "any" | undefined, surveyKey?: string | undefined, querySince?: number | Expression | undefined, queryUntil?: number | Expression | undefined) => Expression;
|
|
12
14
|
participantState: {
|
|
@@ -114,6 +116,8 @@ export declare const StudyEngine: {
|
|
|
114
116
|
responseHasOnlyKeysOtherThan: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
115
117
|
getResponseValueAsNum: (itemKey: string, responseKey: string) => Expression;
|
|
116
118
|
getResponseValueAsStr: (itemKey: string, responseKey: string) => Expression;
|
|
119
|
+
hasResponseKey: (itemKey: string, responseKey: string) => Expression;
|
|
120
|
+
hasResponseKeyWithValue: (itemKey: string, responseKey: string, value: string) => Expression;
|
|
117
121
|
countResponseItems: (itemKey: string, responseKey: string) => Expression;
|
|
118
122
|
checkConditionForOldResponses: (condition: Expression, checkType?: number | "all" | "any" | undefined, surveyKey?: string | undefined, querySince?: number | Expression | undefined, queryUntil?: number | Expression | undefined) => Expression;
|
|
119
123
|
participantState: {
|
|
@@ -37,6 +37,25 @@ const responseHasKeysAny = (itemKey, responseSlotKey, ...optionKeys) => expressi
|
|
|
37
37
|
* @returns true if a response key is present, but is not in the list defined by optionKeys. If item or the response group is not found, returns false.
|
|
38
38
|
*/
|
|
39
39
|
const responseHasOnlyKeysOtherThan = (itemKey, responseSlotKey, ...optionKeys) => expressionUtils_expressionGen.generateExpression('responseHasOnlyKeysOtherThan', undefined, itemKey, responseSlotKey, ...optionKeys);
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @param itemKey full key to the survey item, in the form, e.g., <surveyKey>.<groupKey>.<itemKey>
|
|
43
|
+
* @param responseKey full key to the response that should exists
|
|
44
|
+
* @returns if item contains responseKey return true
|
|
45
|
+
*/
|
|
46
|
+
const hasResponseKey = (itemKey, responseKey) => {
|
|
47
|
+
return expressionUtils_expressionGen.generateExpression('hasResponseKey', undefined, itemKey, responseKey);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param itemKey full key to the survey item, in the form, e.g., <surveyKey>.<groupKey>.<itemKey>
|
|
52
|
+
* @param responseKey full key to the response that should exists
|
|
53
|
+
* @param value the response object with the above key should have this value
|
|
54
|
+
* @returns if the response object exists and has the value return true
|
|
55
|
+
*/
|
|
56
|
+
const hasResponseKeyWithValue = (itemKey, responseKey, value) => {
|
|
57
|
+
return expressionUtils_expressionGen.generateExpression('hasResponseKeyWithValue', undefined, itemKey, responseKey, value);
|
|
58
|
+
};
|
|
40
59
|
const getResponseValueAsNum = (itemKey, responseKey) => {
|
|
41
60
|
return expressionUtils_expressionGen.generateExpression('getResponseValueAsNum', 'float', itemKey, responseKey);
|
|
42
61
|
};
|
|
@@ -268,6 +287,8 @@ const NativeStudyEngineExpressions = {
|
|
|
268
287
|
responseHasOnlyKeysOtherThan,
|
|
269
288
|
getResponseValueAsNum,
|
|
270
289
|
getResponseValueAsStr,
|
|
290
|
+
hasResponseKey,
|
|
291
|
+
hasResponseKeyWithValue,
|
|
271
292
|
countResponseItems,
|
|
272
293
|
// Old responses
|
|
273
294
|
checkConditionForOldResponses,
|
|
@@ -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.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.29",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|