case-editor-tools 1.0.0-beta.9 → 1.0.2
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/constants/key-definitions.d.ts +3 -0
- package/constants/key-definitions.js +7 -1
- package/constants/key-definitions.js.map +1 -1
- package/exporter/index.d.ts +2 -0
- package/exporter/index.js +128 -0
- package/exporter/index.js.map +1 -0
- package/expression-utils/expressionGen.d.ts +1 -1
- package/expression-utils/studyEngineExpressions.d.ts +94 -13
- package/expression-utils/studyEngineExpressions.js +215 -19
- package/expression-utils/studyEngineExpressions.js.map +1 -1
- package/{item-editor-cb5ebc1a.js → item-editor-59f51ecc.js} +67 -46
- package/item-editor-59f51ecc.js.map +1 -0
- package/logger/index.d.ts +1 -0
- package/logger/index.js +10 -0
- package/logger/index.js.map +1 -0
- package/package.json +5 -5
- package/surveys/index.d.ts +1 -0
- package/surveys/index.js +9 -1
- package/surveys/index.js.map +1 -1
- package/surveys/responseTypeGenerators/likertGroupComponents.d.ts +27 -0
- package/surveys/responseTypeGenerators/likertGroupComponents.js +350 -0
- package/surveys/responseTypeGenerators/likertGroupComponents.js.map +1 -0
- package/surveys/responseTypeGenerators/matrixGroupComponent.d.ts +49 -0
- package/surveys/responseTypeGenerators/matrixGroupComponent.js +100 -0
- package/surveys/responseTypeGenerators/matrixGroupComponent.js.map +1 -0
- package/surveys/responseTypeGenerators/optionGroupComponents.d.ts +7 -0
- package/surveys/responseTypeGenerators/optionGroupComponents.js +129 -0
- package/surveys/responseTypeGenerators/optionGroupComponents.js.map +1 -0
- package/surveys/survey-editor/component-editor.d.ts +1 -1
- package/surveys/survey-editor/data-types.d.ts +1 -1
- package/surveys/survey-editor/item-editor.d.ts +2 -1
- package/surveys/survey-editor/item-editor.js +2 -1
- package/surveys/survey-editor/item-editor.js.map +1 -1
- package/surveys/survey-editor/survey-editor.d.ts +6 -1
- package/surveys/survey-editor/survey-editor.js +13 -6
- package/surveys/survey-editor/survey-editor.js.map +1 -1
- package/surveys/survey-engine-expressions.d.ts +12 -2
- package/surveys/survey-engine-expressions.js +43 -2
- package/surveys/survey-engine-expressions.js.map +1 -1
- package/surveys/survey-items.d.ts +33 -227
- package/surveys/survey-items.js +215 -780
- package/surveys/survey-items.js.map +1 -1
- package/surveys/types/group.d.ts +1 -1
- package/surveys/types/group.js +2 -1
- package/surveys/types/group.js.map +1 -1
- package/surveys/types/index.js +3 -1
- package/surveys/types/index.js.map +1 -1
- package/surveys/types/item-properties.d.ts +206 -2
- package/surveys/types/item-properties.js +7 -0
- package/surveys/types/item-properties.js.map +1 -1
- package/surveys/types/item.d.ts +1 -1
- package/surveys/types/survey-definition.d.ts +7 -3
- package/surveys/types/survey-definition.js +11 -2
- package/surveys/types/survey-definition.js.map +1 -1
- package/surveys/utils/componentGenerators.d.ts +2 -13
- package/surveys/utils/componentGenerators.js +1 -34
- package/surveys/utils/componentGenerators.js.map +1 -1
- package/surveys/utils/optionDefGenerators.d.ts +84 -0
- package/surveys/utils/optionDefGenerators.js +211 -0
- package/surveys/utils/optionDefGenerators.js.map +1 -0
- package/surveys/utils/simple-generators.d.ts +4 -3
- package/surveys/utils/simple-generators.js +29 -0
- package/surveys/utils/simple-generators.js.map +1 -1
- package/surveys/utils/simple-question-editor.d.ts +5 -5
- package/surveys/utils/simple-question-editor.js +5 -2
- package/surveys/utils/simple-question-editor.js.map +1 -1
- package/types/expression.d.ts +1 -1
- package/types/messageConfig.d.ts +49 -0
- package/types/messageConfig.js +23 -0
- package/types/messageConfig.js.map +1 -0
- package/types/study.d.ts +3 -1
- package/types/studyRules.d.ts +3 -2
- package/types/studyRules.js +5 -1
- package/types/studyRules.js.map +1 -1
- package/item-editor-cb5ebc1a.js.map +0 -1
|
@@ -11,7 +11,7 @@ const and = (...args) => expressionUtils_expressionGen.generateExpression('and',
|
|
|
11
11
|
const not = (arg) => expressionUtils_expressionGen.generateExpression('not', undefined, arg);
|
|
12
12
|
/**
|
|
13
13
|
* Check if the current event has the given type
|
|
14
|
-
* @param equalsType string with the possible values: 'ENTER', 'SUBMIT', 'TIMER
|
|
14
|
+
* @param equalsType string with the possible values: 'ENTER', 'SUBMIT', 'TIMER', 'MERGE'
|
|
15
15
|
* @returns if event type matches the argument, return true otherwise false
|
|
16
16
|
*/
|
|
17
17
|
const checkEventType = (equalsType) => expressionUtils_expressionGen.generateExpression('checkEventType', undefined, equalsType);
|
|
@@ -37,12 +37,40 @@ 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
|
};
|
|
43
62
|
const getResponseValueAsStr = (itemKey, responseKey) => {
|
|
44
63
|
return expressionUtils_expressionGen.generateExpression('getResponseValueAsStr', 'string', itemKey, responseKey);
|
|
45
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
|
+
};
|
|
46
74
|
const countResponseItems = (itemKey, responseKey) => {
|
|
47
75
|
return expressionUtils_expressionGen.generateExpression('countResponseItems', undefined, itemKey, responseKey);
|
|
48
76
|
};
|
|
@@ -61,37 +89,71 @@ const checkConditionForOldResponses = (condition, checkType, surveyKey, querySin
|
|
|
61
89
|
* @returns timestamp
|
|
62
90
|
*/
|
|
63
91
|
const getStudyEntryTime = () => expressionUtils_expressionGen.generateExpression('getStudyEntryTime');
|
|
92
|
+
const getStudyEntryTimeForIncoming = () => expressionUtils_expressionGen.generateExpression('incomingState:getStudyEntryTime');
|
|
64
93
|
/**
|
|
65
94
|
* Determines if a specific survey key is currently assigned to the participant.
|
|
66
95
|
* @param surveyKey - string - key of the survey to check for.
|
|
67
96
|
* @returns true if the participant has a survey with this surveyKey assigned, otherwise false.
|
|
68
97
|
*/
|
|
69
98
|
const hasSurveyKeyAssigned = (surveyKey) => expressionUtils_expressionGen.generateExpression('hasSurveyKeyAssigned', undefined, surveyKey);
|
|
99
|
+
const hasSurveyKeyAssignedForIncoming = (surveyKey) => expressionUtils_expressionGen.generateExpression('incomingState:hasSurveyKeyAssigned', undefined, surveyKey);
|
|
70
100
|
/**
|
|
71
101
|
* Method to access the timestamp for a surveyKey is assigned from
|
|
72
102
|
* @param surveyKey - string - key of the survey to check for.
|
|
73
103
|
* @returns timestamp
|
|
74
104
|
*/
|
|
75
105
|
const getSurveyKeyAssignedFrom = (surveyKey) => expressionUtils_expressionGen.generateExpression('getSurveyKeyAssignedFrom', undefined, surveyKey);
|
|
106
|
+
const getSurveyKeyAssignedFromForIncoming = (surveyKey) => expressionUtils_expressionGen.generateExpression('incomingState:getSurveyKeyAssignedFrom', undefined, surveyKey);
|
|
76
107
|
/**
|
|
77
108
|
* Method to access the timestamp for a surveyKey is assigned until
|
|
78
109
|
* @param surveyKey - string - key of the survey to check for.
|
|
79
110
|
* @returns timestamp
|
|
80
111
|
*/
|
|
81
112
|
const getSurveyKeyAssignedUntil = (surveyKey) => expressionUtils_expressionGen.generateExpression('getSurveyKeyAssignedUntil', undefined, surveyKey);
|
|
113
|
+
const getSurveyKeyAssignedUntilForIncoming = (surveyKey) => expressionUtils_expressionGen.generateExpression('incomingState:getSurveyKeyAssignedUntil', undefined, surveyKey);
|
|
82
114
|
/**
|
|
83
115
|
* Check if a participant has a specific study status
|
|
84
116
|
* @param status - string
|
|
85
117
|
* @returns true/false
|
|
86
118
|
*/
|
|
87
119
|
const hasStudyStatus = (status) => expressionUtils_expressionGen.generateExpression('getSurveyKeyAssignedUntil', undefined, status);
|
|
120
|
+
const hasStudyStatusForIncoming = (status) => expressionUtils_expressionGen.generateExpression('incomingState:getSurveyKeyAssignedUntil', undefined, status);
|
|
88
121
|
/**
|
|
89
|
-
* Check if a participant flag is present
|
|
122
|
+
* Check if a participant flag with specific value is present
|
|
90
123
|
* @param key look up this flag
|
|
91
124
|
* @param value and for this value
|
|
92
125
|
* @returns return true if key - value pair (with case sensitive matching for both key and value) is present. If any of the two is different, or participant flags is empty, it returns false.
|
|
93
126
|
*/
|
|
94
|
-
const
|
|
127
|
+
const hasParticipantFlagKeyAndValue = (key, value) => expressionUtils_expressionGen.generateExpression('hasParticipantFlag', undefined, key, value);
|
|
128
|
+
const hasParticipantFlagKeyAndValueForIncoming = (key, value) => expressionUtils_expressionGen.generateExpression('incomingState:hasParticipantFlag', undefined, key, value);
|
|
129
|
+
/**
|
|
130
|
+
* Check if a participant flag is present
|
|
131
|
+
* @param key look up this flag
|
|
132
|
+
* @returns return true if key is present. If any of the two is different, or participant flags is empty, it returns false.
|
|
133
|
+
*/
|
|
134
|
+
const hasParticipantFlagKey = (key) => expressionUtils_expressionGen.generateExpression('hasParticipantFlagKey', undefined, key);
|
|
135
|
+
const hasParticipantFlagKeyForIncoming = (key) => expressionUtils_expressionGen.generateExpression('incomingState:hasParticipantFlagKey', undefined, key);
|
|
136
|
+
/**
|
|
137
|
+
* Retrieve the value of a participant flag
|
|
138
|
+
* @param key look up this flag
|
|
139
|
+
* @returns return the value or an empty string if not present
|
|
140
|
+
*/
|
|
141
|
+
const getParticipantFlagValue = (key) => expressionUtils_expressionGen.generateExpression('getParticipantFlagValue', undefined, key);
|
|
142
|
+
const getParticipantFlagValueForIncoming = (key) => expressionUtils_expressionGen.generateExpression('incomingState:getParticipantFlagValue', undefined, key);
|
|
143
|
+
/**
|
|
144
|
+
* Checks if the participant has a message type assigned (at least one)
|
|
145
|
+
* @param messageType
|
|
146
|
+
* @returns return true if a message with the given message type is assigned
|
|
147
|
+
*/
|
|
148
|
+
const hasMessageTypeAssigned = (messageType) => expressionUtils_expressionGen.generateExpression('hasMessageTypeAssigned', undefined, messageType);
|
|
149
|
+
const hasMessageTypeAssignedForIncoming = (messageType) => expressionUtils_expressionGen.generateExpression('incomingState:hasMessageTypeAssigned', undefined, messageType);
|
|
150
|
+
/**
|
|
151
|
+
* Retrieve the timestamp (scheduledFor) for a particular message type. Return 0 if not assigned.
|
|
152
|
+
* @param messageType
|
|
153
|
+
* @returns timestamp value or zero
|
|
154
|
+
*/
|
|
155
|
+
const getMessageNextTime = (messageType) => expressionUtils_expressionGen.generateExpression('getMessageNextTime', undefined, messageType);
|
|
156
|
+
const getMessageNextTimeForIncoming = (messageType) => expressionUtils_expressionGen.generateExpression('incomingState:getMessageNextTime', undefined, messageType);
|
|
95
157
|
/**
|
|
96
158
|
* Check if the last submission is older than the reference timestamp
|
|
97
159
|
* @param reference look up this flag
|
|
@@ -99,6 +161,7 @@ const hasParticipantFlag = (key, value) => expressionUtils_expressionGen.generat
|
|
|
99
161
|
* @returns boolean
|
|
100
162
|
*/
|
|
101
163
|
const lastSubmissionDateOlderThan = (reference, surveyKey) => expressionUtils_expressionGen.generateExpression('lastSubmissionDateOlderThan', undefined, reference, surveyKey);
|
|
164
|
+
const lastSubmissionDateOlderThanForIncoming = (reference, surveyKey) => expressionUtils_expressionGen.generateExpression('incomingState:lastSubmissionDateOlderThan', undefined, reference, surveyKey);
|
|
102
165
|
const eq = (val1, val2) => expressionUtils_expressionGen.generateExpression('eq', undefined, val1, val2);
|
|
103
166
|
const lt = (val1, val2) => expressionUtils_expressionGen.generateExpression('lt', undefined, val1, val2);
|
|
104
167
|
const lte = (val1, val2) => expressionUtils_expressionGen.generateExpression('lte', undefined, val1, val2);
|
|
@@ -138,10 +201,16 @@ const IFTHEN = (condition, ...args) => expressionUtils_expressionGen.generateExp
|
|
|
138
201
|
* @returns
|
|
139
202
|
*/
|
|
140
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);
|
|
141
210
|
/**
|
|
142
211
|
* Add or update a participant flag
|
|
143
212
|
* @param key
|
|
144
|
-
* @param newValue
|
|
213
|
+
* @param newValue: string, number or expression where result should be written in the flag's value
|
|
145
214
|
* @returns
|
|
146
215
|
*/
|
|
147
216
|
const UPDATE_FLAG = (key, newValue) => expressionUtils_expressionGen.generateExpression('UPDATE_FLAG', undefined, key, newValue);
|
|
@@ -149,11 +218,23 @@ const REMOVE_FLAG = (key) => expressionUtils_expressionGen.generateExpression('R
|
|
|
149
218
|
const ADD_NEW_SURVEY = (surveyKey, category, activeFrom, activeUntil) => expressionUtils_expressionGen.generateExpression('ADD_NEW_SURVEY', undefined, surveyKey, activeFrom !== undefined ? activeFrom : 0, activeUntil !== undefined ? activeUntil : 0, category);
|
|
150
219
|
const REMOVE_ALL_SURVEYS = () => expressionUtils_expressionGen.generateExpression('REMOVE_ALL_SURVEYS');
|
|
151
220
|
/**
|
|
152
|
-
*
|
|
153
|
-
* @param
|
|
221
|
+
* Add participant message
|
|
222
|
+
* @param messageType message type
|
|
223
|
+
* @param scheduledFor timestamp or expression returning a timestamp
|
|
154
224
|
* @returns
|
|
155
225
|
*/
|
|
156
|
-
const
|
|
226
|
+
const ADD_MESSAGE = (messageType, scheduledFor) => expressionUtils_expressionGen.generateExpression('ADD_MESSAGE', undefined, messageType, scheduledFor);
|
|
227
|
+
/**
|
|
228
|
+
* Remove all messages scheduled for the participant
|
|
229
|
+
* @returns
|
|
230
|
+
*/
|
|
231
|
+
const REMOVE_ALL_MESSAGES = () => expressionUtils_expressionGen.generateExpression('REMOVE_ALL_MESSAGES', undefined);
|
|
232
|
+
/**
|
|
233
|
+
* Remove all messages with this message type
|
|
234
|
+
* @param messageType message type
|
|
235
|
+
* @returns
|
|
236
|
+
*/
|
|
237
|
+
const REMOVE_MESSAGES_BY_TYPE = (messageType) => expressionUtils_expressionGen.generateExpression('REMOVE_MESSAGES_BY_TYPE', undefined, messageType);
|
|
157
238
|
const REMOVE_SURVEY_BY_KEY = (surveyKey, selector) => {
|
|
158
239
|
if (selector === 'all') {
|
|
159
240
|
return expressionUtils_expressionGen.generateExpression('REMOVE_SURVEYS_BY_KEY', undefined, surveyKey);
|
|
@@ -162,14 +243,80 @@ const REMOVE_SURVEY_BY_KEY = (surveyKey, selector) => {
|
|
|
162
243
|
return expressionUtils_expressionGen.generateExpression('REMOVE_SURVEY_BY_KEY', undefined, surveyKey, selector);
|
|
163
244
|
}
|
|
164
245
|
};
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Initialises or resets a report for the current event
|
|
248
|
+
* @param reportKey key to be used for the report
|
|
249
|
+
*/
|
|
250
|
+
const INIT_REPORT = (reportKey) => {
|
|
251
|
+
return expressionUtils_expressionGen.generateExpression('INIT_REPORT', undefined, reportKey);
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Remove the report from the list of reports to be added at the end of the event
|
|
255
|
+
* @param reportKey key of the report that should be removed
|
|
256
|
+
* @returns
|
|
257
|
+
*/
|
|
258
|
+
const CANCEL_REPORT = (reportKey) => {
|
|
259
|
+
return expressionUtils_expressionGen.generateExpression('CANCEL_REPORT', undefined, reportKey);
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Remove the confidential responses with this key for the participant
|
|
263
|
+
* @param key key of the confidential responses that should be removed
|
|
264
|
+
* @returns
|
|
265
|
+
*/
|
|
266
|
+
const REMOVE_CONFIDENTIAL_RESPONSE_BY_KEY = (key) => {
|
|
267
|
+
return expressionUtils_expressionGen.generateExpression('REMOVE_CONFIDENTIAL_RESPONSE_BY_KEY', undefined, key);
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Remove all confidential responses for the participant
|
|
271
|
+
* @returns
|
|
272
|
+
*/
|
|
273
|
+
const REMOVE_ALL_CONFIDENTIAL_RESPONSES = () => {
|
|
274
|
+
return expressionUtils_expressionGen.generateExpression('REMOVE_ALL_CONFIDENTIAL_RESPONSES', undefined);
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Update one value attribute in a report. If report was not initialized, one will be added to the list.
|
|
278
|
+
* @param reportKey
|
|
279
|
+
* @param attributeKey update / create this attribute in the report
|
|
280
|
+
* @param value this should be the value for the given attribute
|
|
281
|
+
* @param dtype optional dtype to set info for the app how to render this data.
|
|
282
|
+
* @returns
|
|
283
|
+
*/
|
|
284
|
+
const UPDATE_REPORT_DATA = (reportKey, attributeKey, value, dtype) => {
|
|
285
|
+
return expressionUtils_expressionGen.generateExpression('UPDATE_REPORT_DATA', undefined, reportKey, attributeKey, value, dtype);
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Method to remove one attribute (key and value) from the report
|
|
289
|
+
* @param reportKey
|
|
290
|
+
* @param attributeKey
|
|
291
|
+
* @returns
|
|
292
|
+
*/
|
|
293
|
+
const REMOVE_REPORT_DATA = (reportKey, attributeKey) => {
|
|
294
|
+
return expressionUtils_expressionGen.generateExpression('REMOVE_REPORT_DATA', undefined, reportKey, attributeKey);
|
|
295
|
+
};
|
|
296
|
+
const setReportIcon = (reportKey, icon) => {
|
|
297
|
+
return UPDATE_REPORT_DATA(reportKey, 'icon', icon);
|
|
298
|
+
};
|
|
299
|
+
const setReportMessage = (reportKey, content, asTranslationKey) => {
|
|
300
|
+
return UPDATE_REPORT_DATA(reportKey, 'message', content, asTranslationKey ? undefined : 'rawMessage');
|
|
301
|
+
};
|
|
302
|
+
const setReportSummary = (reportKey, content, asTranslationKey) => {
|
|
303
|
+
return UPDATE_REPORT_DATA(reportKey, 'summary', content, asTranslationKey ? undefined : 'rawMessage');
|
|
304
|
+
};
|
|
305
|
+
// ##################
|
|
306
|
+
// Prefill rule methods:
|
|
307
|
+
const GET_LAST_SURVEY_ITEM = (surveyKey, itemKey, submittedLaterThan) => {
|
|
308
|
+
return expressionUtils_expressionGen.generateExpression('GET_LAST_SURVEY_ITEM', undefined, surveyKey, itemKey, submittedLaterThan ? types_duration.durationObjectToSeconds(submittedLaterThan) : undefined);
|
|
309
|
+
};
|
|
310
|
+
// ##################
|
|
311
|
+
// Context previous responses methods:
|
|
312
|
+
const LAST_RESPONSES_BY_KEY = (surveyKey, limit) => {
|
|
313
|
+
return expressionUtils_expressionGen.generateExpression('LAST_RESPONSES_BY_KEY', undefined, surveyKey, limit);
|
|
314
|
+
};
|
|
315
|
+
const ALL_RESPONSES_SINCE = (sinceTimestamp) => {
|
|
316
|
+
return expressionUtils_expressionGen.generateExpression('ALL_RESPONSES_SINCE', undefined, sinceTimestamp);
|
|
317
|
+
};
|
|
318
|
+
const RESPONSES_SINCE_BY_KEY = (sinceTimestamp, surveyKey) => {
|
|
319
|
+
return expressionUtils_expressionGen.generateExpression('RESPONSES_SINCE_BY_KEY', undefined, sinceTimestamp, surveyKey);
|
|
173
320
|
};
|
|
174
321
|
// ##################
|
|
175
322
|
// Extra methods:
|
|
@@ -178,6 +325,9 @@ const multipleChoiceOptionsSelected = (itemKey, ...optionKeys) => expressionUtil
|
|
|
178
325
|
const multipleChoiceAllOfTheseSelected = (itemKey, ...optionKeys) => and(...optionKeys.map(option => expressionUtils_expressionGen.generateExpression('responseHasKeysAny', undefined, itemKey, [constants_keyDefinitions.responseGroupKey, constants_keyDefinitions.multipleChoiceKey].join('.'), option)));
|
|
179
326
|
const multipleChoiceOnlyOtherKeysSelected = (itemKey, ...optionKeys) => expressionUtils_expressionGen.generateExpression('responseHasOnlyKeysOtherThan', undefined, itemKey, [constants_keyDefinitions.responseGroupKey, constants_keyDefinitions.multipleChoiceKey].join('.'), ...optionKeys);
|
|
180
327
|
const singleChoiceOnlyOtherOptionSelected = (itemKey, ...optionKeys) => expressionUtils_expressionGen.generateExpression('responseHasOnlyKeysOtherThan', undefined, itemKey, [constants_keyDefinitions.responseGroupKey, constants_keyDefinitions.singleChoiceKey].join('.'), ...optionKeys);
|
|
328
|
+
const consentAcceptedCondition = (itemKey) => {
|
|
329
|
+
return hasResponseKey(itemKey, [constants_keyDefinitions.responseGroupKey, constants_keyDefinitions.consentKey].join('.'));
|
|
330
|
+
};
|
|
181
331
|
const stopParticipation = () => UPDATE_STUDY_STATUS('inactive');
|
|
182
332
|
const finishParticipation = () => UPDATE_STUDY_STATUS('finished');
|
|
183
333
|
/**
|
|
@@ -216,6 +366,9 @@ const NativeStudyEngineExpressions = {
|
|
|
216
366
|
responseHasOnlyKeysOtherThan,
|
|
217
367
|
getResponseValueAsNum,
|
|
218
368
|
getResponseValueAsStr,
|
|
369
|
+
getSelectedKeys,
|
|
370
|
+
hasResponseKey,
|
|
371
|
+
hasResponseKeyWithValue,
|
|
219
372
|
countResponseItems,
|
|
220
373
|
// Old responses
|
|
221
374
|
checkConditionForOldResponses,
|
|
@@ -226,8 +379,26 @@ const NativeStudyEngineExpressions = {
|
|
|
226
379
|
getSurveyKeyAssignedFrom,
|
|
227
380
|
getSurveyKeyAssignedUntil,
|
|
228
381
|
hasStudyStatus,
|
|
229
|
-
|
|
382
|
+
hasParticipantFlagKeyAndValue,
|
|
383
|
+
hasParticipantFlagKey,
|
|
384
|
+
getParticipantFlagValue,
|
|
230
385
|
lastSubmissionDateOlderThan,
|
|
386
|
+
hasMessageTypeAssigned,
|
|
387
|
+
getMessageNextTime,
|
|
388
|
+
incomingParticipantState: {
|
|
389
|
+
// for merge event
|
|
390
|
+
getStudyEntryTime: getStudyEntryTimeForIncoming,
|
|
391
|
+
hasSurveyKeyAssigned: hasSurveyKeyAssignedForIncoming,
|
|
392
|
+
getSurveyKeyAssignedFrom: getSurveyKeyAssignedFromForIncoming,
|
|
393
|
+
getSurveyKeyAssignedUntil: getSurveyKeyAssignedUntilForIncoming,
|
|
394
|
+
hasStudyStatus: hasStudyStatusForIncoming,
|
|
395
|
+
hasParticipantFlagKeyAndValue: hasParticipantFlagKeyAndValueForIncoming,
|
|
396
|
+
hasParticipantFlagKey: hasParticipantFlagKeyForIncoming,
|
|
397
|
+
getParticipantFlagValue: getParticipantFlagValueForIncoming,
|
|
398
|
+
lastSubmissionDateOlderThan: lastSubmissionDateOlderThanForIncoming,
|
|
399
|
+
hasMessageTypeAssigned: hasMessageTypeAssignedForIncoming,
|
|
400
|
+
getMessageNextTime: getMessageNextTimeForIncoming,
|
|
401
|
+
}
|
|
231
402
|
},
|
|
232
403
|
// logical and comparision
|
|
233
404
|
eq,
|
|
@@ -247,6 +418,7 @@ const StudyEngineActions = {
|
|
|
247
418
|
ifThen: IFTHEN,
|
|
248
419
|
participantActions: {
|
|
249
420
|
updateStudyStatus: UPDATE_STUDY_STATUS,
|
|
421
|
+
startNewStudySession: START_NEW_STUDY_SESSION,
|
|
250
422
|
updateFlag: UPDATE_FLAG,
|
|
251
423
|
removeFlag: REMOVE_FLAG,
|
|
252
424
|
assignedSurveys: {
|
|
@@ -255,9 +427,23 @@ const StudyEngineActions = {
|
|
|
255
427
|
remove: REMOVE_SURVEY_BY_KEY,
|
|
256
428
|
},
|
|
257
429
|
reports: {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
430
|
+
init: INIT_REPORT,
|
|
431
|
+
cancel: CANCEL_REPORT,
|
|
432
|
+
updateData: UPDATE_REPORT_DATA,
|
|
433
|
+
removeData: REMOVE_REPORT_DATA,
|
|
434
|
+
// Extra methods:
|
|
435
|
+
setReportIcon,
|
|
436
|
+
setReportMessage,
|
|
437
|
+
setReportSummary,
|
|
438
|
+
},
|
|
439
|
+
messages: {
|
|
440
|
+
add: ADD_MESSAGE,
|
|
441
|
+
removeAll: REMOVE_ALL_MESSAGES,
|
|
442
|
+
remove: REMOVE_MESSAGES_BY_TYPE,
|
|
443
|
+
},
|
|
444
|
+
confidentialResponses: {
|
|
445
|
+
removeByKey: REMOVE_CONFIDENTIAL_RESPONSE_BY_KEY,
|
|
446
|
+
removeAll: REMOVE_ALL_CONFIDENTIAL_RESPONSES,
|
|
261
447
|
},
|
|
262
448
|
// Extra methods:
|
|
263
449
|
stopParticipation,
|
|
@@ -271,10 +457,20 @@ const StudyEngine = Object.assign(Object.assign(Object.assign({}, NativeStudyEng
|
|
|
271
457
|
any: multipleChoiceOptionsSelected,
|
|
272
458
|
none: multipleChoiceOnlyOtherKeysSelected,
|
|
273
459
|
all: multipleChoiceAllOfTheseSelected,
|
|
460
|
+
}, consent: {
|
|
461
|
+
accepted: consentAcceptedCondition,
|
|
274
462
|
}, survey: {
|
|
275
463
|
isActive: hasSurveyKeyActive,
|
|
276
464
|
validFromOlderThan: hasSurveyKeyValidFromOlderThan,
|
|
277
465
|
validUntilSoonerThan: hasSurveyKeyValidUntilSoonerThan,
|
|
466
|
+
}, prefillRules: {
|
|
467
|
+
GET_LAST_SURVEY_ITEM,
|
|
468
|
+
}, contextRules: {
|
|
469
|
+
previousResponses: {
|
|
470
|
+
LAST_RESPONSES_BY_KEY,
|
|
471
|
+
ALL_RESPONSES_SINCE,
|
|
472
|
+
RESPONSES_SINCE_BY_KEY,
|
|
473
|
+
}
|
|
278
474
|
} });
|
|
279
475
|
|
|
280
476
|
exports.NativeStudyEngineExpressions = NativeStudyEngineExpressions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studyEngineExpressions.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"studyEngineExpressions.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,62 +2,80 @@
|
|
|
2
2
|
|
|
3
3
|
var surveys_surveyEditor_componentEditor = require('./surveys/survey-editor/component-editor.js');
|
|
4
4
|
var surveys_utils_randomKeyGenerator = require('./surveys/utils/randomKeyGenerator.js');
|
|
5
|
+
var logger_logger = require('./logger/logger.js');
|
|
5
6
|
|
|
6
7
|
var data_types = {};
|
|
7
8
|
|
|
8
9
|
var expression = {};
|
|
9
10
|
|
|
10
|
-
Object.defineProperty(expression,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
Object.defineProperty(expression, '__esModule', { value: true });
|
|
12
|
+
|
|
13
|
+
const isExpression = (value) => {
|
|
14
|
+
return typeof (value) === 'object' && value.name !== undefined && value.name.length > 0;
|
|
15
|
+
};
|
|
16
|
+
const expressionArgParser = (arg) => {
|
|
17
|
+
switch (arg.dtype) {
|
|
18
|
+
case 'num':
|
|
19
|
+
return arg.num;
|
|
20
|
+
case 'str':
|
|
21
|
+
return arg.str;
|
|
22
|
+
case 'exp':
|
|
23
|
+
return arg.exp;
|
|
24
|
+
default:
|
|
25
|
+
return arg.str;
|
|
26
|
+
}
|
|
25
27
|
};
|
|
26
28
|
|
|
29
|
+
expression.expressionArgParser = expressionArgParser;
|
|
30
|
+
expression.isExpression = isExpression;
|
|
31
|
+
|
|
27
32
|
var surveyItem = {};
|
|
28
33
|
|
|
29
|
-
Object.defineProperty(surveyItem,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
Object.defineProperty(surveyItem, '__esModule', { value: true });
|
|
35
|
+
|
|
36
|
+
const isSurveyGroupItem$1 = (item) => {
|
|
37
|
+
const items = item.items;
|
|
38
|
+
return items !== undefined && items.length > 0;
|
|
33
39
|
};
|
|
34
40
|
|
|
41
|
+
surveyItem.isSurveyGroupItem = isSurveyGroupItem$1;
|
|
42
|
+
|
|
35
43
|
var surveyItemComponent = {};
|
|
36
44
|
|
|
37
|
-
Object.defineProperty(surveyItemComponent,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
Object.defineProperty(surveyItemComponent, '__esModule', { value: true });
|
|
46
|
+
|
|
47
|
+
const isItemGroupComponent$1 = (item) => {
|
|
48
|
+
const items = item.items;
|
|
49
|
+
return items !== undefined && items.length > 0;
|
|
41
50
|
};
|
|
42
51
|
|
|
52
|
+
surveyItemComponent.isItemGroupComponent = isItemGroupComponent$1;
|
|
53
|
+
|
|
43
54
|
var response = {};
|
|
44
55
|
|
|
45
|
-
Object.defineProperty(response,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
Object.defineProperty(response, '__esModule', { value: true });
|
|
57
|
+
|
|
58
|
+
const isSurveyGroupItemResponse = (item) => {
|
|
59
|
+
const items = item.items;
|
|
60
|
+
return items !== undefined && items.length > 0;
|
|
49
61
|
};
|
|
50
62
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
response.isSurveyGroupItemResponse = isSurveyGroupItemResponse;
|
|
64
|
+
|
|
65
|
+
Object.defineProperty(data_types, '__esModule', { value: true });
|
|
66
|
+
|
|
67
|
+
var data_types_expression = expression;
|
|
68
|
+
var data_types_surveyItem = surveyItem;
|
|
69
|
+
var data_types_surveyItemComponent = surveyItemComponent;
|
|
70
|
+
var data_types_response = response;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
data_types.expressionArgParser = data_types_expression.expressionArgParser;
|
|
75
|
+
data_types.isExpression = data_types_expression.isExpression;
|
|
76
|
+
var isSurveyGroupItem = data_types.isSurveyGroupItem = data_types_surveyItem.isSurveyGroupItem;
|
|
77
|
+
var isItemGroupComponent = data_types.isItemGroupComponent = data_types_surveyItemComponent.isItemGroupComponent;
|
|
78
|
+
data_types.isSurveyGroupItemResponse = data_types_response.isSurveyGroupItemResponse;
|
|
61
79
|
|
|
62
80
|
const initialRootComp = () => {
|
|
63
81
|
return {
|
|
@@ -104,6 +122,9 @@ class ItemEditor {
|
|
|
104
122
|
setKey(newKey) {
|
|
105
123
|
this.surveyItem.key = newKey;
|
|
106
124
|
}
|
|
125
|
+
setConfidentialMode(confidentialMode) {
|
|
126
|
+
this.surveyItem.confidentialMode = confidentialMode;
|
|
127
|
+
}
|
|
107
128
|
addToFollows(key) {
|
|
108
129
|
if (!this.surveyItem.follows) {
|
|
109
130
|
this.surveyItem.follows = [];
|
|
@@ -281,7 +302,7 @@ class ItemEditor {
|
|
|
281
302
|
obj = currentItem.components.items[ind];
|
|
282
303
|
continue;
|
|
283
304
|
}
|
|
284
|
-
if (!
|
|
305
|
+
if (!isItemGroupComponent(obj)) {
|
|
285
306
|
obj.items = [];
|
|
286
307
|
// leaf found
|
|
287
308
|
break;
|
|
@@ -298,7 +319,7 @@ class ItemEditor {
|
|
|
298
319
|
return;
|
|
299
320
|
}
|
|
300
321
|
if (obj.items.find(it => props.key === it.key)) {
|
|
301
|
-
|
|
322
|
+
logger_logger.Logger.criticalError('Duplicate key: ' + props.key);
|
|
302
323
|
return undefined;
|
|
303
324
|
}
|
|
304
325
|
const newComponent = (new surveys_surveyEditor_componentEditor.ComponentEditor(undefined, props)).getComponent();
|
|
@@ -340,7 +361,7 @@ class ItemEditor {
|
|
|
340
361
|
obj = currentItem.components.items[ind];
|
|
341
362
|
continue;
|
|
342
363
|
}
|
|
343
|
-
if (!
|
|
364
|
+
if (!isItemGroupComponent(obj)) {
|
|
344
365
|
obj.items = [];
|
|
345
366
|
// leaf found
|
|
346
367
|
break;
|
|
@@ -357,7 +378,7 @@ class ItemEditor {
|
|
|
357
378
|
return;
|
|
358
379
|
}
|
|
359
380
|
if (obj.items.find(it => newComp.key === it.key)) {
|
|
360
|
-
|
|
381
|
+
logger_logger.Logger.criticalError('Duplicate key: ' + newComp.key);
|
|
361
382
|
return undefined;
|
|
362
383
|
}
|
|
363
384
|
if (atPosition !== undefined) {
|
|
@@ -392,7 +413,7 @@ class ItemEditor {
|
|
|
392
413
|
const parentIds = ids.slice(1, ids.length - 1);
|
|
393
414
|
let obj = responseGroup;
|
|
394
415
|
for (const currentKey of parentIds) {
|
|
395
|
-
if (!
|
|
416
|
+
if (!isItemGroupComponent(obj)) {
|
|
396
417
|
// leaf found
|
|
397
418
|
break;
|
|
398
419
|
}
|
|
@@ -433,7 +454,7 @@ class ItemEditor {
|
|
|
433
454
|
const parentIds = ids.slice(1, ids.length - 1);
|
|
434
455
|
let obj = responseGroup;
|
|
435
456
|
for (const currentKey of parentIds) {
|
|
436
|
-
if (!
|
|
457
|
+
if (!isItemGroupComponent(obj)) {
|
|
437
458
|
// leaf found
|
|
438
459
|
break;
|
|
439
460
|
}
|
|
@@ -468,7 +489,7 @@ class ItemEditor {
|
|
|
468
489
|
obj = currentItem.components.items[ind];
|
|
469
490
|
continue;
|
|
470
491
|
}
|
|
471
|
-
if (!
|
|
492
|
+
if (!isItemGroupComponent(obj)) {
|
|
472
493
|
obj.items = [];
|
|
473
494
|
// leaf found
|
|
474
495
|
break;
|
|
@@ -517,5 +538,5 @@ class ItemEditor {
|
|
|
517
538
|
}
|
|
518
539
|
|
|
519
540
|
exports.ItemEditor = ItemEditor;
|
|
520
|
-
exports.
|
|
521
|
-
//# sourceMappingURL=item-editor-
|
|
541
|
+
exports.isSurveyGroupItem = isSurveyGroupItem;
|
|
542
|
+
//# sourceMappingURL=item-editor-59f51ecc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item-editor-59f51ecc.js","sources":["../node_modules/survey-engine/data_types/expression.js","../node_modules/survey-engine/data_types/survey-item.js","../node_modules/survey-engine/data_types/survey-item-component.js","../node_modules/survey-engine/data_types/response.js","../node_modules/survey-engine/data_types/index.js"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst isExpression = (value) => {\r\n return typeof (value) === 'object' && value.name !== undefined && value.name.length > 0;\r\n};\r\nconst expressionArgParser = (arg) => {\r\n switch (arg.dtype) {\r\n case 'num':\r\n return arg.num;\r\n case 'str':\r\n return arg.str;\r\n case 'exp':\r\n return arg.exp;\r\n default:\r\n return arg.str;\r\n }\r\n};\n\nexports.expressionArgParser = expressionArgParser;\nexports.isExpression = isExpression;\n//# sourceMappingURL=expression.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst isSurveyGroupItem = (item) => {\r\n const items = item.items;\r\n return items !== undefined && items.length > 0;\r\n};\n\nexports.isSurveyGroupItem = isSurveyGroupItem;\n//# sourceMappingURL=survey-item.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst isItemGroupComponent = (item) => {\r\n const items = item.items;\r\n return items !== undefined && items.length > 0;\r\n};\n\nexports.isItemGroupComponent = isItemGroupComponent;\n//# sourceMappingURL=survey-item-component.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst isSurveyGroupItemResponse = (item) => {\r\n const items = item.items;\r\n return items !== undefined && items.length > 0;\r\n};\n\nexports.isSurveyGroupItemResponse = isSurveyGroupItemResponse;\n//# sourceMappingURL=response.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar data_types_expression = require('./expression.js');\nvar data_types_surveyItem = require('./survey-item.js');\nvar data_types_surveyItemComponent = require('./survey-item-component.js');\nvar data_types_response = require('./response.js');\n\n\n\nexports.expressionArgParser = data_types_expression.expressionArgParser;\nexports.isExpression = data_types_expression.isExpression;\nexports.isSurveyGroupItem = data_types_surveyItem.isSurveyGroupItem;\nexports.isItemGroupComponent = data_types_surveyItemComponent.isItemGroupComponent;\nexports.isSurveyGroupItemResponse = data_types_response.isSurveyGroupItemResponse;\n//# sourceMappingURL=index.js.map\n"],"names":["isSurveyGroupItem","isItemGroupComponent","require$$0","require$$1","require$$2","require$$3"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Logger } from './logger';
|
package/logger/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
10
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
11
|
-
"rollup": "^2.
|
|
10
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
11
|
+
"rollup": "^2.67.0",
|
|
12
12
|
"rollup-plugin-copy": "^3.4.0",
|
|
13
13
|
"rollup-plugin-delete": "^2.0.0",
|
|
14
14
|
"rollup-plugin-multi-input": "^1.3.1",
|
|
15
15
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
16
|
-
"rollup-plugin-typescript2": "^0.
|
|
16
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
17
17
|
"typescript": "^4.4.4"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "rollup -c"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"survey-engine": "^
|
|
23
|
+
"survey-engine": "^1.1.3"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/surveys/index.d.ts
CHANGED