case-editor-tools 1.0.0-beta.38 → 1.0.0-beta.39
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/expression-utils/studyEngineExpressions.d.ts +8 -0
- package/expression-utils/studyEngineExpressions.js +19 -0
- package/expression-utils/studyEngineExpressions.js.map +1 -1
- package/package.json +1 -1
- package/surveys/utils/optionDefGenerators.d.ts +2 -0
- package/surveys/utils/optionDefGenerators.js +7 -0
- package/surveys/utils/optionDefGenerators.js.map +1 -1
|
@@ -72,6 +72,10 @@ export declare const StudyEngineActions: {
|
|
|
72
72
|
removeAll: () => Expression;
|
|
73
73
|
remove: (messageType: string) => Expression;
|
|
74
74
|
};
|
|
75
|
+
confidentialResponses: {
|
|
76
|
+
removeByKey: (key: string) => Expression;
|
|
77
|
+
removeAll: () => Expression;
|
|
78
|
+
};
|
|
75
79
|
stopParticipation: () => Expression;
|
|
76
80
|
finishParticipation: () => Expression;
|
|
77
81
|
};
|
|
@@ -130,6 +134,10 @@ export declare const StudyEngine: {
|
|
|
130
134
|
removeAll: () => Expression;
|
|
131
135
|
remove: (messageType: string) => Expression;
|
|
132
136
|
};
|
|
137
|
+
confidentialResponses: {
|
|
138
|
+
removeByKey: (key: string) => Expression;
|
|
139
|
+
removeAll: () => Expression;
|
|
140
|
+
};
|
|
133
141
|
stopParticipation: () => Expression;
|
|
134
142
|
finishParticipation: () => Expression;
|
|
135
143
|
};
|
|
@@ -236,6 +236,21 @@ const INIT_REPORT = (reportKey) => {
|
|
|
236
236
|
const CANCEL_REPORT = (reportKey) => {
|
|
237
237
|
return expressionUtils_expressionGen.generateExpression('CANCEL_REPORT', undefined, reportKey);
|
|
238
238
|
};
|
|
239
|
+
/**
|
|
240
|
+
* Remove the confidential responses with this key for the participant
|
|
241
|
+
* @param key key of the confidential responses that should be removed
|
|
242
|
+
* @returns
|
|
243
|
+
*/
|
|
244
|
+
const REMOVE_CONFIDENTIAL_RESPONSE_BY_KEY = (key) => {
|
|
245
|
+
return expressionUtils_expressionGen.generateExpression('REMOVE_CONFIDENTIAL_RESPONSE_BY_KEY', undefined, key);
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Remove all confidential responses for the participant
|
|
249
|
+
* @returns
|
|
250
|
+
*/
|
|
251
|
+
const REMOVE_ALL_CONFIDENTIAL_RESPONSES = () => {
|
|
252
|
+
return expressionUtils_expressionGen.generateExpression('REMOVE_ALL_CONFIDENTIAL_RESPONSES', undefined);
|
|
253
|
+
};
|
|
239
254
|
/**
|
|
240
255
|
* Update one value attribute in a report. If report was not initialized, one will be added to the list.
|
|
241
256
|
* @param reportKey
|
|
@@ -400,6 +415,10 @@ const StudyEngineActions = {
|
|
|
400
415
|
removeAll: REMOVE_ALL_MESSAGES,
|
|
401
416
|
remove: REMOVE_MESSAGES_BY_TYPE,
|
|
402
417
|
},
|
|
418
|
+
confidentialResponses: {
|
|
419
|
+
removeByKey: REMOVE_CONFIDENTIAL_RESPONSE_BY_KEY,
|
|
420
|
+
removeAll: REMOVE_ALL_CONFIDENTIAL_RESPONSES,
|
|
421
|
+
},
|
|
403
422
|
// Extra methods:
|
|
404
423
|
stopParticipation,
|
|
405
424
|
finishParticipation,
|
|
@@ -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.39",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|
|
@@ -30,6 +30,7 @@ export declare const SingleChoiceOptionTypes: {
|
|
|
30
30
|
cloze: (props: ClozeProps & {
|
|
31
31
|
key: string;
|
|
32
32
|
displayCondition?: Expression;
|
|
33
|
+
className?: string;
|
|
33
34
|
}) => OptionDef;
|
|
34
35
|
};
|
|
35
36
|
export declare const MultipleChoiceOptionTypes: {
|
|
@@ -50,6 +51,7 @@ export declare const MultipleChoiceOptionTypes: {
|
|
|
50
51
|
cloze: (props: ClozeProps & {
|
|
51
52
|
key: string;
|
|
52
53
|
displayCondition?: Expression;
|
|
54
|
+
className?: string;
|
|
53
55
|
}) => OptionDef;
|
|
54
56
|
};
|
|
55
57
|
export declare const ClozeItemTypes: {
|
|
@@ -156,11 +156,18 @@ const dropDown = (props) => {
|
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
158
|
const cloze = (props) => {
|
|
159
|
+
const styles = [];
|
|
160
|
+
if (props.className !== undefined) {
|
|
161
|
+
styles.push({
|
|
162
|
+
key: 'className', value: props.className
|
|
163
|
+
});
|
|
164
|
+
}
|
|
159
165
|
return {
|
|
160
166
|
key: props.key,
|
|
161
167
|
role: 'cloze',
|
|
162
168
|
items: props.items,
|
|
163
169
|
displayCondition: props.displayCondition,
|
|
170
|
+
style: styles.length > 0 ? styles : undefined,
|
|
164
171
|
};
|
|
165
172
|
};
|
|
166
173
|
const clozeLineBreak = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionDefGenerators.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"optionDefGenerators.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|