xlsform2lstsv 0.4.0 → 0.4.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/README.md +1 -0
- package/dist/config/types.js +1 -0
- package/dist/xlsformConverter.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,6 +78,7 @@ const tsv = await XLSFormParser.convertXLSFileToTSV('survey.xlsx', {
|
|
|
78
78
|
| `convertEndNote` | `boolean` | `true` | Promote a `note` named `end` to LimeSurvey's survey end text. |
|
|
79
79
|
| `convertOtherPattern` | `boolean` | `true` | Auto-detect the `_other` question pattern and set `other=Y`. |
|
|
80
80
|
| `convertMarkdown` | `boolean` | `true` | Parse labels/hints as Markdown and convert to HTML. |
|
|
81
|
+
| `hideNoAnswer` | `boolean` | `true` | Hide the "no answer" option on non-mandatory questions. |
|
|
81
82
|
|
|
82
83
|
## Implemented features
|
|
83
84
|
|
package/dist/config/types.js
CHANGED
package/dist/xlsformConverter.js
CHANGED
|
@@ -507,6 +507,12 @@ export class XLSFormToTSVConverter {
|
|
|
507
507
|
this.tsvGenerator.addRow(this.row({
|
|
508
508
|
class: 'S', name: 'format', text: surveyFormat,
|
|
509
509
|
}));
|
|
510
|
+
// Hide "no answer" option on non-mandatory questions
|
|
511
|
+
if (this.configManager.getConfig().hideNoAnswer !== false) {
|
|
512
|
+
this.tsvGenerator.addRow(this.row({
|
|
513
|
+
class: 'S', name: 'shownoanswer', text: 'N',
|
|
514
|
+
}));
|
|
515
|
+
}
|
|
510
516
|
// SL rows: survey title + welcome/end text, base language first then others
|
|
511
517
|
const emitSLRows = (lang) => {
|
|
512
518
|
this.tsvGenerator.addRow(this.row({
|