case-editor-tools 1.6.9 → 1.6.11
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.
|
@@ -97,6 +97,7 @@ export declare const StudyEngineActions: {
|
|
|
97
97
|
linkingCodes: {
|
|
98
98
|
set: (forKey: string | Expression, value: string | Expression) => Expression;
|
|
99
99
|
delete: (forKey?: string | Expression) => Expression;
|
|
100
|
+
drawFromStudyCodeList: (listKey: string | Expression, forKey?: string | Expression) => Expression;
|
|
100
101
|
};
|
|
101
102
|
messages: {
|
|
102
103
|
add: (messageType: string, scheduledFor: number | Expression) => Expression;
|
|
@@ -168,6 +169,7 @@ export declare const StudyEngine: {
|
|
|
168
169
|
linkingCodes: {
|
|
169
170
|
set: (forKey: string | Expression, value: string | Expression) => Expression;
|
|
170
171
|
delete: (forKey?: string | Expression) => Expression;
|
|
172
|
+
drawFromStudyCodeList: (listKey: string | Expression, forKey?: string | Expression) => Expression;
|
|
171
173
|
};
|
|
172
174
|
messages: {
|
|
173
175
|
add: (messageType: string, scheduledFor: number | Expression) => Expression;
|
|
@@ -391,7 +391,7 @@ const hasLinkingCode = (forKey) => {
|
|
|
391
391
|
* @returns
|
|
392
392
|
*/
|
|
393
393
|
const getLinkingCode = (forKey) => {
|
|
394
|
-
return expressionUtils_expressionGen.generateExpression("
|
|
394
|
+
return expressionUtils_expressionGen.generateExpression("getLinkingCodeValue", undefined, forKey);
|
|
395
395
|
};
|
|
396
396
|
/**
|
|
397
397
|
* Set a linking code for a specific key. This will override any existing value for that key, if already present.
|
|
@@ -410,6 +410,15 @@ const SET_LINKING_CODE = (forKey, value) => {
|
|
|
410
410
|
const DELETE_LINKING_CODE = (forKey) => {
|
|
411
411
|
return expressionUtils_expressionGen.generateExpression('DELETE_LINKING_CODE', undefined, forKey);
|
|
412
412
|
};
|
|
413
|
+
/**
|
|
414
|
+
* Draw (find one and delete) a study code from a list and store it as a linking code for the participant
|
|
415
|
+
* @param listKey Pick one from this list of study codes if available
|
|
416
|
+
* @param forKey optional key to store the linking code for. If not defined, the listKey will be used.
|
|
417
|
+
* @returns
|
|
418
|
+
*/
|
|
419
|
+
const DRAW_STUDY_CODE_AS_LINKING_CODE = (listKey, forKey) => {
|
|
420
|
+
return expressionUtils_expressionGen.generateExpression('DRAW_STUDY_CODE_AS_LINKING_CODE', undefined, listKey, forKey);
|
|
421
|
+
};
|
|
413
422
|
/**
|
|
414
423
|
* Method to call external event handler
|
|
415
424
|
* @param serviceName name of the external service endpoint that should be used (URL and API key are config of the service)
|
|
@@ -583,6 +592,7 @@ const StudyEngineActions = {
|
|
|
583
592
|
linkingCodes: {
|
|
584
593
|
set: SET_LINKING_CODE,
|
|
585
594
|
delete: DELETE_LINKING_CODE,
|
|
595
|
+
drawFromStudyCodeList: DRAW_STUDY_CODE_AS_LINKING_CODE,
|
|
586
596
|
},
|
|
587
597
|
messages: {
|
|
588
598
|
add: ADD_MESSAGE,
|
|
@@ -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.11",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|