case-editor-tools 1.2.0 → 1.2.1
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/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.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|
|
@@ -318,7 +318,7 @@ const initResponsiveMatrixItem = (rgKey, props, displayCondition) => {
|
|
|
318
318
|
const groupEdit = new surveys_surveyEditor_componentEditor.ComponentEditor(undefined, {
|
|
319
319
|
key: rgKey,
|
|
320
320
|
isGroup: true,
|
|
321
|
-
role: '
|
|
321
|
+
role: 'responsiveMatrix',
|
|
322
322
|
});
|
|
323
323
|
if (hasDuplicates(props.rows.map(item => item.key))) {
|
|
324
324
|
throw Error(`has duplicate row keys in ${rgKey}`);
|
|
@@ -372,14 +372,19 @@ const initResponsiveMatrixItem = (rgKey, props, displayCondition) => {
|
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
// ADD ROWS
|
|
375
|
+
const rowGroupEdit = new surveys_surveyEditor_componentEditor.ComponentEditor(undefined, {
|
|
376
|
+
key: 'rows',
|
|
377
|
+
isGroup: true,
|
|
378
|
+
role: 'rows',
|
|
379
|
+
});
|
|
375
380
|
props.rows.forEach((row, index) => {
|
|
376
381
|
const rowStyles = [];
|
|
377
382
|
if (row.className !== undefined) {
|
|
378
383
|
rowStyles.push({ key: 'className', value: row.className });
|
|
379
384
|
}
|
|
380
|
-
|
|
385
|
+
rowGroupEdit.addItemComponent({
|
|
381
386
|
key: row.key,
|
|
382
|
-
role:
|
|
387
|
+
role: row.role,
|
|
383
388
|
displayCondition: row.displayCondition,
|
|
384
389
|
style: rowStyles.length > 0 ? rowStyles : undefined,
|
|
385
390
|
content: !Array.isArray(row.label) ? surveys_utils_simpleGenerators.generateLocStrings(row.label) : undefined,
|
|
@@ -393,6 +398,7 @@ const initResponsiveMatrixItem = (rgKey, props, displayCondition) => {
|
|
|
393
398
|
}) : [],
|
|
394
399
|
});
|
|
395
400
|
});
|
|
401
|
+
groupEdit.addItemComponent(rowGroupEdit.getComponent());
|
|
396
402
|
return groupEdit.getComponent();
|
|
397
403
|
};
|
|
398
404
|
const initLikertScaleItem = (key, options, stackOnSmallScreen, displayCondition) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"likertGroupComponents.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"likertGroupComponents.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|