case-editor-tools 1.0.0-beta.42 → 1.0.0-beta.45
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,7 @@ 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
|
+
getSelectedKeys: (itemKey: string, responseKey: string) => Expression;
|
|
10
11
|
hasResponseKey: (itemKey: string, responseKey: string) => Expression;
|
|
11
12
|
hasResponseKeyWithValue: (itemKey: string, responseKey: string, value: string) => Expression;
|
|
12
13
|
countResponseItems: (itemKey: string, responseKey: string) => Expression;
|
|
@@ -53,6 +54,7 @@ export declare const StudyEngineActions: {
|
|
|
53
54
|
ifThen: (condition: Expression, ...args: Expression[]) => Expression;
|
|
54
55
|
participantActions: {
|
|
55
56
|
updateStudyStatus: (status: string) => Expression;
|
|
57
|
+
startNewStudySession: () => Expression;
|
|
56
58
|
updateFlag: (key: string, newValue: string | number | Expression) => Expression;
|
|
57
59
|
removeFlag: (key: string) => Expression;
|
|
58
60
|
assignedSurveys: {
|
|
@@ -63,7 +65,7 @@ export declare const StudyEngineActions: {
|
|
|
63
65
|
reports: {
|
|
64
66
|
init: (reportKey: string) => Expression;
|
|
65
67
|
cancel: (reportKey: string) => Expression;
|
|
66
|
-
updateData: (reportKey: string, attributeKey: string, value: number | string | Expression, dtype?: "string" | "date" | "float" | "int" | "rawMessage" | undefined) => Expression;
|
|
68
|
+
updateData: (reportKey: string, attributeKey: string, value: number | string | Expression, dtype?: "string" | "date" | "float" | "int" | "rawMessage" | "keyList" | undefined) => Expression;
|
|
67
69
|
removeData: (reportKey: string, attributeKey: string) => Expression;
|
|
68
70
|
setReportIcon: (reportKey: string, icon: string) => Expression;
|
|
69
71
|
setReportMessage: (reportKey: string, content: string, asTranslationKey?: boolean | undefined) => Expression;
|
|
@@ -115,6 +117,7 @@ export declare const StudyEngine: {
|
|
|
115
117
|
ifThen: (condition: Expression, ...args: Expression[]) => Expression;
|
|
116
118
|
participantActions: {
|
|
117
119
|
updateStudyStatus: (status: string) => Expression;
|
|
120
|
+
startNewStudySession: () => Expression;
|
|
118
121
|
updateFlag: (key: string, newValue: string | number | Expression) => Expression;
|
|
119
122
|
removeFlag: (key: string) => Expression;
|
|
120
123
|
assignedSurveys: {
|
|
@@ -125,7 +128,7 @@ export declare const StudyEngine: {
|
|
|
125
128
|
reports: {
|
|
126
129
|
init: (reportKey: string) => Expression;
|
|
127
130
|
cancel: (reportKey: string) => Expression;
|
|
128
|
-
updateData: (reportKey: string, attributeKey: string, value: number | string | Expression, dtype?: "string" | "date" | "float" | "int" | "rawMessage" | undefined) => Expression;
|
|
131
|
+
updateData: (reportKey: string, attributeKey: string, value: number | string | Expression, dtype?: "string" | "date" | "float" | "int" | "rawMessage" | "keyList" | undefined) => Expression;
|
|
129
132
|
removeData: (reportKey: string, attributeKey: string) => Expression;
|
|
130
133
|
setReportIcon: (reportKey: string, icon: string) => Expression;
|
|
131
134
|
setReportMessage: (reportKey: string, content: string, asTranslationKey?: boolean | undefined) => Expression;
|
|
@@ -149,6 +152,7 @@ export declare const StudyEngine: {
|
|
|
149
152
|
responseHasOnlyKeysOtherThan: (itemKey: string, responseSlotKey: string, ...optionKeys: string[]) => Expression;
|
|
150
153
|
getResponseValueAsNum: (itemKey: string, responseKey: string) => Expression;
|
|
151
154
|
getResponseValueAsStr: (itemKey: string, responseKey: string) => Expression;
|
|
155
|
+
getSelectedKeys: (itemKey: string, responseKey: string) => Expression;
|
|
152
156
|
hasResponseKey: (itemKey: string, responseKey: string) => Expression;
|
|
153
157
|
hasResponseKeyWithValue: (itemKey: string, responseKey: string, value: string) => Expression;
|
|
154
158
|
countResponseItems: (itemKey: string, responseKey: string) => Expression;
|
|
@@ -62,6 +62,15 @@ const getResponseValueAsNum = (itemKey, responseKey) => {
|
|
|
62
62
|
const getResponseValueAsStr = (itemKey, responseKey) => {
|
|
63
63
|
return expressionUtils_expressionGen.generateExpression('getResponseValueAsStr', 'string', itemKey, responseKey);
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Retrieve the selected keys from a response slot
|
|
67
|
+
* @param itemKey full key to the survey item, in the form, e.g., <surveyKey>.<groupKey>.<itemKey>
|
|
68
|
+
* @param responseKey key of the response slot, where keys should be retrieved from
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
const getSelectedKeys = (itemKey, responseKey) => {
|
|
72
|
+
return expressionUtils_expressionGen.generateExpression('getSelectedKeys', 'string', itemKey, responseKey);
|
|
73
|
+
};
|
|
65
74
|
const countResponseItems = (itemKey, responseKey) => {
|
|
66
75
|
return expressionUtils_expressionGen.generateExpression('countResponseItems', undefined, itemKey, responseKey);
|
|
67
76
|
};
|
|
@@ -192,6 +201,12 @@ const IFTHEN = (condition, ...args) => expressionUtils_expressionGen.generateExp
|
|
|
192
201
|
* @returns
|
|
193
202
|
*/
|
|
194
203
|
const UPDATE_STUDY_STATUS = (status) => expressionUtils_expressionGen.generateExpression('UPDATE_STUDY_STATUS', undefined, status);
|
|
204
|
+
/**
|
|
205
|
+
* Generate and store a new session id to the participant's state
|
|
206
|
+
* @param status new status value
|
|
207
|
+
* @returns
|
|
208
|
+
*/
|
|
209
|
+
const START_NEW_STUDY_SESSION = () => expressionUtils_expressionGen.generateExpression('START_NEW_STUDY_SESSION', undefined);
|
|
195
210
|
/**
|
|
196
211
|
* Add or update a participant flag
|
|
197
212
|
* @param key
|
|
@@ -351,6 +366,7 @@ const NativeStudyEngineExpressions = {
|
|
|
351
366
|
responseHasOnlyKeysOtherThan,
|
|
352
367
|
getResponseValueAsNum,
|
|
353
368
|
getResponseValueAsStr,
|
|
369
|
+
getSelectedKeys,
|
|
354
370
|
hasResponseKey,
|
|
355
371
|
hasResponseKeyWithValue,
|
|
356
372
|
countResponseItems,
|
|
@@ -402,6 +418,7 @@ const StudyEngineActions = {
|
|
|
402
418
|
ifThen: IFTHEN,
|
|
403
419
|
participantActions: {
|
|
404
420
|
updateStudyStatus: UPDATE_STUDY_STATUS,
|
|
421
|
+
startNewStudySession: START_NEW_STUDY_SESSION,
|
|
405
422
|
updateFlag: UPDATE_FLAG,
|
|
406
423
|
removeFlag: REMOVE_FLAG,
|
|
407
424
|
assignedSurveys: {
|
|
@@ -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.45",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|