case-editor-tools 1.6.10 → 1.6.12

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.
@@ -391,7 +391,7 @@ const hasLinkingCode = (forKey) => {
391
391
  * @returns
392
392
  */
393
393
  const getLinkingCode = (forKey) => {
394
- return expressionUtils_expressionGen.generateExpression("getLinkingCode", undefined, forKey);
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.
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.10",
4
+ "version": "1.6.12",
5
5
  "main": "index.js",
6
6
  "license": "Apache-2.0",
7
7
  "repository": "github:case-framework/case-editor-tools",
@@ -78,7 +78,7 @@ export declare const SurveyEngine: {
78
78
  };
79
79
  participantFlags: {
80
80
  hasKey: (key: string) => Expression;
81
- hasKeyAndValue: (key: string, value: string) => Expression;
81
+ hasKeyAndValue: (key: string, value: string | Expression) => Expression;
82
82
  getAsNum: (key: string) => Expression;
83
83
  };
84
84
  isLoggedIn: () => Expression;
@@ -302,7 +302,7 @@ const dateResponseDiffFromNow = (itemKey, responseKey, unit, ignoreSign) => {
302
302
  * @returns
303
303
  */
304
304
  const parseParticipantFlagAsNum = (key) => {
305
- return parseValueAsNum(getAttribute(getAttribute(getContext(), 'participantFlags'), key));
305
+ return parseValueAsNum(expressionUtils_expressionGen.generateExpression('getParticipantFlagValue', undefined, key));
306
306
  };
307
307
  /**
308
308
  * Check participant flags object if contains the specified key value pair
@@ -310,7 +310,7 @@ const parseParticipantFlagAsNum = (key) => {
310
310
  * @returns
311
311
  */
312
312
  const hasParticipantFlagKey = (key) => {
313
- return isDefined(getAttribute(getAttribute(getContext(), 'participantFlags'), key));
313
+ return expressionUtils_expressionGen.generateExpression('hasParticipantFlagKey', undefined, key);
314
314
  };
315
315
  /**
316
316
  * Check participant flags object if contains the specified key value pair
@@ -319,7 +319,7 @@ const hasParticipantFlagKey = (key) => {
319
319
  * @returns
320
320
  */
321
321
  const hasParticipantFlagKeyAndValue = (key, value) => {
322
- return eq(getAttribute(getAttribute(getContext(), 'participantFlags'), key), value);
322
+ return expressionUtils_expressionGen.generateExpression('hasParticipantFlagKeyAndValue', undefined, key, value);
323
323
  };
324
324
  /**
325
325
  * Check if the participant is logged in currently.