├── .github ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml ├── labels.yml └── workflows │ ├── codeql.yml │ ├── metrics.yml │ └── tests.yml ├── .gitignore ├── .jshintrc ├── LICENSE.txt ├── Makefile ├── PLUGIN_DEVEOPMENT.md ├── README.md ├── index.html ├── lib ├── SaveButton.js ├── ckeditor │ ├── CHANGES.md │ ├── LICENSE.md │ ├── README.md │ ├── SECURITY.md │ ├── adapters │ │ └── jquery.js │ ├── bender-runner.config.json │ ├── build-config.js │ ├── ckeditor.js │ ├── config.js │ ├── contents.css │ ├── dimagi-README.md │ ├── lang │ │ ├── _translationstatus.txt │ │ └── en.js │ ├── plugins │ │ ├── clipboard │ │ │ └── dialogs │ │ │ │ └── paste.js │ │ ├── confighelper │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── docs │ │ │ │ ├── install.html │ │ │ │ └── styles.css │ │ ├── dialog │ │ │ ├── dialogDefinition.js │ │ │ └── styles │ │ │ │ └── dialog.css │ │ ├── icons.png │ │ ├── icons_hidpi.png │ │ └── widget │ │ │ └── images │ │ │ └── handle.png │ ├── samples │ │ ├── css │ │ │ └── samples.css │ │ ├── img │ │ │ ├── github-top.png │ │ │ ├── header-bg.png │ │ │ ├── header-separator.png │ │ │ ├── logo.png │ │ │ ├── logo.svg │ │ │ └── navigation-tip.png │ │ ├── index.html │ │ ├── js │ │ │ ├── sample.js │ │ │ └── sf.js │ │ ├── old │ │ │ ├── ajax.html │ │ │ ├── api.html │ │ │ ├── appendto.html │ │ │ ├── assets │ │ │ │ ├── inlineall │ │ │ │ │ └── logo.png │ │ │ │ ├── outputxhtml │ │ │ │ │ └── outputxhtml.css │ │ │ │ ├── posteddata.php │ │ │ │ ├── sample.jpg │ │ │ │ └── uilanguages │ │ │ │ │ └── languages.js │ │ │ ├── autogrow │ │ │ │ └── autogrow.html │ │ │ ├── bbcode │ │ │ │ └── bbcode.html │ │ │ ├── codesnippet │ │ │ │ └── codesnippet.html │ │ │ ├── datafiltering.html │ │ │ ├── devtools │ │ │ │ └── devtools.html │ │ │ ├── dialog │ │ │ │ ├── assets │ │ │ │ │ └── my_dialog.js │ │ │ │ └── dialog.html │ │ │ ├── divarea │ │ │ │ └── divarea.html │ │ │ ├── divreplace.html │ │ │ ├── docprops │ │ │ │ └── docprops.html │ │ │ ├── easyimage │ │ │ │ └── easyimage.html │ │ │ ├── emoji │ │ │ │ └── emoji.html │ │ │ ├── enterkey │ │ │ │ └── enterkey.html │ │ │ ├── htmlwriter │ │ │ │ └── outputhtml.html │ │ │ ├── image2 │ │ │ │ ├── assets │ │ │ │ │ ├── image1.jpg │ │ │ │ │ └── image2.jpg │ │ │ │ └── image2.html │ │ │ ├── index.html │ │ │ ├── inlineall.html │ │ │ ├── inlinebycode.html │ │ │ ├── inlinetextarea.html │ │ │ ├── jquery.html │ │ │ ├── magicline │ │ │ │ └── magicline.html │ │ │ ├── mathjax │ │ │ │ └── mathjax.html │ │ │ ├── mentions │ │ │ │ └── mentions.html │ │ │ ├── placeholder │ │ │ │ └── placeholder.html │ │ │ ├── readonly.html │ │ │ ├── replacebyclass.html │ │ │ ├── replacebycode.html │ │ │ ├── sample.css │ │ │ ├── sample.js │ │ │ ├── sample_posteddata.php │ │ │ ├── sharedspace │ │ │ │ └── sharedspace.html │ │ │ ├── sourcedialog │ │ │ │ └── sourcedialog.html │ │ │ ├── stylesheetparser │ │ │ │ ├── assets │ │ │ │ │ └── sample.css │ │ │ │ └── stylesheetparser.html │ │ │ ├── tabindex.html │ │ │ ├── tableresize │ │ │ │ └── tableresize.html │ │ │ ├── toolbar │ │ │ │ └── toolbar.html │ │ │ ├── uicolor.html │ │ │ ├── uicolor │ │ │ │ └── uicolor.html │ │ │ ├── uilanguages.html │ │ │ ├── wysiwygarea │ │ │ │ └── fullpage.html │ │ │ └── xhtmlstyle.html │ │ └── toolbarconfigurator │ │ │ ├── css │ │ │ └── fontello.css │ │ │ ├── font │ │ │ ├── LICENSE.txt │ │ │ ├── config.json │ │ │ ├── fontello.eot │ │ │ ├── fontello.svg │ │ │ ├── fontello.ttf │ │ │ └── fontello.woff │ │ │ ├── index.html │ │ │ ├── js │ │ │ ├── abstracttoolbarmodifier.js │ │ │ ├── fulltoolbareditor.js │ │ │ ├── toolbarmodifier.js │ │ │ └── toolbartextmodifier.js │ │ │ └── lib │ │ │ └── codemirror │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── codemirror.css │ │ │ ├── codemirror.js │ │ │ ├── javascript.js │ │ │ ├── neo.css │ │ │ ├── show-hint.css │ │ │ └── show-hint.js │ ├── skins │ │ └── minimalist │ │ │ ├── dialog.css │ │ │ ├── dialog_ie.css │ │ │ ├── dialog_ie7.css │ │ │ ├── dialog_ie8.css │ │ │ ├── dialog_iequirks.css │ │ │ ├── editor.css │ │ │ ├── editor_gecko.css │ │ │ ├── editor_ie.css │ │ │ ├── editor_ie7.css │ │ │ ├── editor_ie8.css │ │ │ ├── editor_iequirks.css │ │ │ ├── icons.png │ │ │ ├── icons_hidpi.png │ │ │ ├── images │ │ │ ├── arrow.png │ │ │ ├── close.png │ │ │ ├── hidpi │ │ │ │ ├── close.png │ │ │ │ ├── lock-open.png │ │ │ │ ├── lock.png │ │ │ │ └── refresh.png │ │ │ ├── lock-open.png │ │ │ ├── lock.png │ │ │ └── refresh.png │ │ │ └── readme.md │ ├── styles.js │ └── vendor │ │ └── promise.js └── diff_match_patch.js ├── package.json ├── src ├── atwho.js ├── base.js ├── commander.js ├── commcareConnect.js ├── commtrack.js ├── copy-paste.js ├── core.js ├── dataSourceWidgets.js ├── databrowser.js ├── datasources.js ├── dateformats.js ├── debugutil.js ├── escapedHashtags.js ├── exporter.js ├── expressionEditor.js ├── form.js ├── fuse.js ├── hqAnalytics.js ├── ignoreButRetain.js ├── intentManager.js ├── itemset.js ├── javaRosa │ ├── itext.js │ ├── itextBlock.js │ ├── itextWidget.js │ ├── plugin.js │ └── util.js ├── jquery-extensions.js ├── jstree-plugins.js ├── less-style │ ├── atwho.less │ ├── dropdown.less │ ├── inputs.less │ ├── labels.less │ ├── lib │ │ ├── bootstrap │ │ │ ├── mixins.less │ │ │ └── variables.less │ │ ├── main.less │ │ └── variables.less │ ├── main.less │ ├── markdown.less │ ├── modals.less │ ├── multimedia.less │ ├── popover.less │ ├── question-props.less │ ├── structure.less │ ├── tree-content.less │ └── xpath-editor.less ├── lock.js ├── logic.js ├── main.js ├── markdown.js ├── modeliteration.js ├── mugs.js ├── parser.js ├── richText.js ├── saveToCase.js ├── template-loader.js ├── templates │ ├── add_question.html │ ├── alert_global.html │ ├── atwho_display.html │ ├── auto_box.html │ ├── button_remove.html │ ├── commander.html │ ├── confirm_overwrite.html │ ├── control_group.html │ ├── control_group_stdInput.html │ ├── copy_paste_help.html │ ├── data_source_editor.html │ ├── date_format_menu.html │ ├── date_format_popover.html │ ├── easy_reference_popover.html │ ├── edit_source.html │ ├── external_sources_tree.html │ ├── find_usages.html │ ├── find_usages_search.html │ ├── form_errors_template.html │ ├── language_selector.html │ ├── main.html │ ├── markdown_help.html │ ├── modal_button.html │ ├── modal_content.html │ ├── multimedia_block.html │ ├── multimedia_errors.html │ ├── multimedia_existing_audio.html │ ├── multimedia_existing_image.html │ ├── multimedia_existing_text.html │ ├── multimedia_existing_video.html │ ├── multimedia_modal.html │ ├── multimedia_nomedia.html │ ├── multimedia_upload_status.html │ ├── multimedia_upload_trigger.html │ ├── question_fieldset.html │ ├── question_toolbar.html │ ├── question_type_changer.html │ ├── ui_element.html │ ├── undo_alert.html │ ├── widget_attachment_case.html │ ├── widget_control_keyvalue.html │ ├── widget_control_message.html │ ├── widget_index_case.html │ ├── widget_save_to_case.html │ ├── widget_update_case.html │ ├── xpath.html │ ├── xpath_expression.html │ └── xpath_validation_errors.html ├── tree.js ├── tsv.js ├── undomanager.js ├── uploader.js ├── util.js ├── widgets.js ├── window.js ├── writer.js ├── xml.js └── xpath.js ├── test ├── tests ├── .jshintrc ├── advancedItemsets.js ├── atwho.js ├── base.js ├── bulkActions.js ├── commander.js ├── commcareConnect.js ├── commtrack.js ├── copy-paste.js ├── core.js ├── databrowser.js ├── datasources.js ├── diffDataParent.js ├── escapedHashtags.js ├── exporter.js ├── expressionEditor.js ├── form.js ├── formdesigner.ignoreButRetain.js ├── formdesigner.lock.js ├── forms │ └── xforms │ │ ├── form0.xml │ │ ├── form1.xml │ │ ├── form3.xml │ │ ├── form4.xml │ │ ├── form5.xml │ │ ├── form6.xml │ │ ├── form7.xml │ │ ├── form8.xml │ │ ├── form_with_3_languages.xml │ │ ├── form_with_crufty_itext1.xml │ │ ├── form_with_many_diff_qtypes.xml │ │ ├── form_with_no_body.xml │ │ ├── form_with_no_children_data.xml │ │ ├── form_with_no_data_attrs.xml │ │ ├── form_with_no_instance_block.xml │ │ ├── form_with_secret.xml │ │ ├── fromcchq │ │ ├── Close a pregnancy.xml │ │ ├── Follow-up a Household Referral.xml │ │ ├── Follow-up a pregnancy referral.xml │ │ ├── Follow-up a pregnancy.xml │ │ ├── Follow-up at household.xml │ │ ├── Gravidez.xml │ │ ├── NutritionAndHealth.xml │ │ ├── Pos Parto.xml │ │ ├── Register a household.xml │ │ ├── Register a pregnancy.xml │ │ ├── Registo.xml │ │ └── ff.xml │ │ └── nested_form_with_complex_qs.xml ├── intentManager.js ├── itemset.js ├── javaRosa.js ├── jquery-extensions.js ├── lib │ ├── CommCareHQFont-Regular.otf │ ├── commcarehqfont-regular.eot │ ├── commcarehqfont-regular.svg │ ├── commcarehqfont-regular.ttf │ ├── commcarehqfont-regular.woff │ ├── font-awesome.css │ ├── font-commcare.css │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── hqstyle-core.css ├── logic.js ├── main.js ├── markdown.js ├── modeliteration.js ├── mugs.js ├── options.js ├── parser.js ├── profiling.js ├── questionProperties.js ├── questionTypes.js ├── richText.js ├── saveToCase.js ├── setvalue.js ├── static │ ├── all_question_types.tsv │ ├── all_question_types.xml │ ├── atwho │ │ └── test1.xml │ ├── commcareConnect │ │ ├── assessment.xml │ │ ├── deliver.xml │ │ └── learn_module.xml │ ├── commtrack │ │ ├── balance-block-setvalues.xml │ │ ├── balance-block.xml │ │ ├── invalid-transfer.xml │ │ ├── transfer-block-setvalues.xml │ │ └── transfer-block.xml │ ├── copy-paste │ │ ├── four-questions.xml │ │ ├── many-itext-forms.xml │ │ ├── text-question.xml │ │ ├── two-choices.xml │ │ └── two-questions.xml │ ├── core │ │ ├── diff-result.html │ │ ├── diff1.xml │ │ ├── diff2.xml │ │ ├── group-rename.xml │ │ ├── hidden-among-questions.xml │ │ ├── hidden-value-in-repeat.xml │ │ ├── increment-item.xml │ │ ├── insert-questions.xml │ │ ├── invalid-questions.xml │ │ └── test1.xml │ ├── databrowser │ │ ├── child-ref-no-hashtag.xml │ │ ├── child-ref-output-value-other-lang.xml │ │ ├── child-ref-output-value.xml │ │ ├── child-ref.xml │ │ ├── ignore-rich-text.xml │ │ ├── mother-ref.xml │ │ ├── preloaded-hashtags.xml │ │ └── unknown-property-preloaded-hashtags.xml │ ├── datasources │ │ ├── case-property.xml │ │ ├── null-hashtags.xml │ │ └── unknown-case-property.xml │ ├── diffDataParent │ │ ├── data-parent-mug-after.xml │ │ ├── data-parent-mug-before.xml │ │ ├── data-parent-mug-in-between.xml │ │ ├── parse.xml │ │ └── sibling-as-child.xml │ ├── escapedHashtags │ │ └── invalid-xpath.xml │ ├── exporter │ │ ├── item-id.tsv │ │ ├── item-id.xml │ │ ├── vid-ref.tsv │ │ └── vid-ref.xml │ ├── form │ │ ├── alternate-root-node-name.xml │ │ ├── group-with-internal-refs.xml │ │ ├── hidden-value-in-group.xml │ │ ├── hidden-value-tree-order.xml │ │ ├── instance-reference.xml │ │ ├── manual-instance-reference.xml │ │ ├── mismatch-tree-order.xml │ │ ├── missing-value.xml │ │ ├── name-template.xml │ │ ├── nested-groups.xml │ │ ├── question-referencing-other.xml │ │ └── select-questions.xml │ ├── ignoreButRetain │ │ ├── case-with-update.xml │ │ ├── common-ignored.xml │ │ ├── common.xml │ │ ├── delete-bug-after.xml │ │ ├── delete-bug-before.xml │ │ ├── empty-parent.xml │ │ ├── ignore-in-head.xml │ │ ├── ignored-binds-with-extra-path.xml │ │ ├── ignored-control-node.xml │ │ ├── ignored-data-node.xml │ │ ├── ignored-tag-first.xml │ │ ├── multi-match.xml │ │ ├── multiple-ignores.xml │ │ ├── nested-ignored-nodes.xml │ │ ├── referenced-renamed.xml │ │ ├── referenced-unrenamed.xml │ │ ├── renamed.xml │ │ ├── unknown-element.xml │ │ └── unrenamed.xml │ ├── intentManager │ │ ├── custom-intent.xml │ │ ├── intent-with-no-mug.xml │ │ ├── intent-with-unknown-attrs.xml │ │ └── printing-intent.xml │ ├── itemset │ │ ├── data-itemset.xml │ │ ├── dropdown-fixture.xml │ │ ├── filter-with-case-property.xml │ │ ├── inner-filters.xml │ │ ├── itemset-sort.xml │ │ ├── itemset-with-question-ref.xml │ │ ├── test1-with-appearance.xml │ │ ├── test1-with-constraint.xml │ │ └── test1.xml │ ├── javaRosa │ │ ├── bare-output.xml │ │ ├── group-with-constraint.xml │ │ ├── invalid-output-ref.xml │ │ ├── itext-item-non-auto-id.xml │ │ ├── itext-item-rename-group-move.xml │ │ ├── itext-item-rename.xml │ │ ├── multi-lang-trans.xml │ │ ├── multi-line-trans.xml │ │ ├── no-label-text-one-lang.xml │ │ ├── non-default-lang-first.xml │ │ ├── output-refs.xml │ │ ├── outputref-group-rename.xml │ │ ├── outputref-with-inequality.xml │ │ ├── select1-help.xml │ │ ├── single-lang-second-select-with-help.xml │ │ ├── single-lang-select.xml │ │ ├── test-xml-1.xml │ │ ├── test-xml-2-with-bind-constraint.xml │ │ ├── test-xml-2-with-only-bind-constraint.xml │ │ ├── test-xml-2.xml │ │ ├── test-xml-3.xml │ │ ├── test-xml-4.xml │ │ ├── text-question.xml │ │ └── text-with-constraint.xml │ ├── lock │ │ └── test.xml │ ├── logic │ │ ├── hashtag-filter.xml │ │ └── test-xml-1.xml │ ├── markdown │ │ ├── explicit-no-markdown.xml │ │ ├── markdown-output-value.xml │ │ ├── markdown-test.xml │ │ ├── no-markdown-stars.xml │ │ ├── no-markdown.xml │ │ ├── simple-markdown-no-chars.xml │ │ └── simple-markdown.xml │ ├── modeliteration │ │ ├── case-list-iteration-with-questions-and-hidden-value.xml │ │ ├── case-list-iteration-with-questions.xml │ │ ├── case-list-iteration.xml │ │ ├── fixture-iteration-no-ids.xml │ │ ├── fixture-iteration.xml │ │ └── regular-repeat.xml │ ├── mugs │ │ └── blank-choice.xml │ ├── parser │ │ ├── accent-char-in-path.xml │ │ ├── body-group.xml │ │ ├── first-time-hashtag.xml │ │ ├── label-without-itext.xml │ │ ├── missing-bind.xml │ │ ├── other_item.xml │ │ ├── overridden.xml │ │ ├── override.xml │ │ ├── repeat-with-count-as-question-only-form.xml │ │ ├── required.xml │ │ ├── test-xml-1.xml │ │ └── test-xml-2.xml │ ├── profiling │ │ ├── huge_form.xml │ │ └── small-form.xml │ ├── questionProperties │ │ └── comment-test.xml │ ├── questionTypes │ │ ├── image-capture.xml │ │ └── select1-help-with-type.xml │ ├── richText │ │ ├── burpee.xml │ │ ├── output-ref.xml │ │ └── output-value.xml │ ├── saveToCase │ │ ├── attachment_property.xml │ │ ├── case_type_property.xml │ │ ├── close_property.xml │ │ ├── create_2_property.xml │ │ ├── create_property.xml │ │ ├── index_property.xml │ │ ├── logic_test.xml │ │ ├── two-same-name.xml │ │ └── update_property.xml │ ├── setvalue │ │ ├── set-value-special.xml │ │ └── set-value.xml │ ├── writer │ │ ├── ignore-richtext-and-markdown.xml │ │ ├── repeat-noAddRemove-false.xml │ │ ├── repeat-with-count-as-question.xml │ │ ├── repeat-with-count-noAddRemove-false.xml │ │ ├── repeat-with-count.xml │ │ └── repeat-without-count.xml │ └── xml │ │ ├── regexp-crashing-debug-itext-parsed.xml │ │ ├── regexp-crashing-debug-itext.xml │ │ └── slow-regexp-itext.xml ├── tsv.js ├── typoglycemia.js ├── undomanager.js ├── urlHash.js ├── utils.js ├── widgets.js ├── writer.js └── xml.js ├── webpack ├── webpack.common.js ├── webpack.dev.js └── webpack.prod.js └── yarn.lock /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Product Description 2 | 3 | 4 | ## Technical Summary 5 | 9 | 10 | ## Feature Flag 11 | 12 | 13 | ## Safety Assurance 14 | 15 | ### Safety story 16 | 22 | 23 | ### Automated test coverage 24 | 25 | 26 | 27 | ### QA Plan 28 | 29 | 33 | 34 | 35 | ### Rollback instructions 36 | 37 | 41 | 42 | - [ ] This PR can be reverted after deploy with no further considerations 43 | 44 | ### Labels & Review 45 | - [ ] Risk label is set correctly 46 | - [ ] The set of people pinged as reviewers is appropriate for the level of risk of the change 47 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "10:00" 8 | open-pull-requests-limit: 5 9 | labels: 10 | - product/invisible 11 | -------------------------------------------------------------------------------- /.github/workflows/metrics.yml: -------------------------------------------------------------------------------- 1 | name: vellum metrics 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | schedule: 7 | - cron: "0 0 * * *" # daily 8 | 9 | jobs: 10 | metrics: 11 | runs-on: ubuntu-22.04 12 | timeout-minutes: 60 13 | env: 14 | REPO: vellum 15 | DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} 16 | DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }} 17 | steps: 18 | - uses: actions/checkout@v3 19 | - uses: actions/setup-node@v4 20 | with: 21 | node-version: 20 22 | - uses: actions/setup-python@v4 23 | with: 24 | python-version: | 25 | 3.9 26 | - name: Install dependencies 27 | run: | 28 | mv package.json package.json.save 29 | npm install "yarn@^1" 30 | rm package-lock.json 31 | mv package.json.save package.json 32 | yarn install 33 | - name: Install dependency-metrics 34 | run: pip install dependency-metrics 35 | - name: run metrics for yarn 36 | run: metrics yarn --send 37 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: vellum tests 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | jobs: 7 | tests: 8 | runs-on: ubuntu-22.04 9 | timeout-minutes: 60 10 | steps: 11 | - uses: actions/checkout@v3 12 | - uses: actions/setup-node@v4 13 | with: 14 | node-version: 20 15 | - name: Install dependencies 16 | run: | 17 | mv package.json package.json.save 18 | npm install "yarn@^1" 19 | rm package-lock.json 20 | mv package.json.save package.json 21 | yarn install 22 | - name: Build webpack 23 | run: | 24 | rm -rf _build 25 | yarn testbuild 26 | - name: Run tests 27 | run: | 28 | npm run testserver & 29 | npm test 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist/* 3 | /lib/ckeditor/un-minified-ckeditor.js 4 | /_build 5 | vellum.tar.gz 6 | 7 | npm-debug.log 8 | *~ 9 | *.swp 10 | .idea/ 11 | .DS_Store 12 | .vscode/ 13 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "browser": true, 3 | 4 | "asi": false, 5 | "bitwise": true, 6 | "boss": false, 7 | "esversion": 6, 8 | "eqeqeq": true, 9 | "evil": false, 10 | "forin": false, 11 | "immed": true, 12 | /* latedef apparently didn't work properly past jshint 2.8.0 13 | see https://github.com/jshint/jshint/issues/2833 14 | after an upgrade uncommenting this will throw a slew of errors which are hard 15 | to untagle due to built in cyclic dependencies on veriables which cause the 16 | tests to fail. 17 | "latedef": "nofunc", */ 18 | "laxbreak": false, 19 | "loopfunc": true, 20 | "noarg": true, 21 | "nonew": true, 22 | "undef": true, 23 | "unused": "vars", 24 | "globals": { 25 | "define": false, 26 | "gettext": false, 27 | "ngettext": false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2014, Dimagi Inc., and individual contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * The name Dimagi, nor the names of its contributors may be used to 12 | endorse or promote products derived from this software without specific 13 | prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL DIMAGI INC. BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | _FILES=$(shell git diff-files --quiet --ignore-submodules && true || echo '+') 2 | _INDEX=$(shell git diff-index --cached --quiet HEAD && true || echo '+') 3 | VERSION=$(shell git rev-parse HEAD)$(_FILES)$(_INDEX) 4 | 5 | all: tar 6 | 7 | webpack: deps _webpack 8 | 9 | tar: webpack _tar 10 | 11 | test: tar _test 12 | 13 | deps: 14 | yarn install 15 | 16 | _webpack: 17 | rm -rf _build 18 | yarn build 19 | cp -r lib/ _build/lib 20 | echo "$(VERSION)" > _build/version.txt 21 | (yarn list || yarn list --offline) | grep -Ev "^(Vellum|yarn) " > _build/manifest.txt 22 | 23 | _tar: 24 | rm -f vellum.tar.gz 25 | tar -czf vellum.tar.gz -C _build . 26 | 27 | _test: 28 | yarn testbuild 29 | npm test 30 | -------------------------------------------------------------------------------- /lib/ckeditor/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting a security issues 2 | 3 | If you believe you have found a security issue in the CKEditor 4 software, please contact us immediately. 4 | 5 | When reporting a potential security problem, please bear this in mind: 6 | 7 | * Make sure to provide as many details as possible about the vulnerability. 8 | * Please do not disclose publicly any security issues until we fix them and publish security releases. 9 | 10 | Contact the security team at security@cksource.com. As soon as we receive the security report, we will work promptly to confirm the issue and then to provide a security fix. 11 | -------------------------------------------------------------------------------- /lib/ckeditor/bender-runner.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "bender": { 3 | "port": 9001 4 | }, 5 | "server": { 6 | "port": 9002 7 | }, 8 | "paths": { 9 | "ckeditor4": "../ckeditor4/", 10 | "runner": "./src/runner.html" 11 | }, 12 | "browsers": { 13 | "linux": [ "chrome", "firefox" ], 14 | "macos": [ "safari" ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/ckeditor/config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. 3 | * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4 | */ 5 | 6 | CKEDITOR.editorConfig = function( config ) { 7 | // Define changes to default configuration here. For example: 8 | // config.language = 'fr'; 9 | // config.uiColor = '#AADC6E'; 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /lib/ckeditor/plugins/confighelper/README.md: -------------------------------------------------------------------------------- 1 | confighelper 2 | ============ 3 | 4 | Configuration Helper + HTML5 placeholder for CKEditor. 5 | See docs/install.html for full details and install instructions 6 | -------------------------------------------------------------------------------- /lib/ckeditor/plugins/confighelper/docs/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, Helvetica, sans-serif; 3 | font-size: 90%; 4 | } 5 | h1 { 6 | text-align:center; 7 | font-size:180%; 8 | } 9 | h2 { 10 | border-bottom:2px solid #CCC; 11 | margin:1em 0 0.4em 0; 12 | } 13 | h3 { 14 | margin-bottom:0.4em; 15 | } 16 | p { 17 | margin:0 0 1em 1em; 18 | text-align:justify; 19 | } 20 | ol { 21 | margin:0 0 1.2em 1em; 22 | padding:0; 23 | list-style-type:none; 24 | } 25 | ol li { 26 | margin:0.2em 0; 27 | } 28 | pre, code { 29 | font-size:100%; 30 | font-family:"Courier New", Courier, mono; 31 | background-color: #CCCCCC; 32 | border:1px solid #999; 33 | padding:0.2em 1em; 34 | margin: 0.4em 0; 35 | display:block; 36 | white-space: pre; 37 | overflow: auto; 38 | } 39 | form { 40 | margin:0 0 0 1em; 41 | } 42 | span.key { 43 | color: #006600; 44 | } 45 | #install { 46 | display:none 47 | } 48 | #languages ul { 49 | display:inline; 50 | list-style-type:none; 51 | margin:0; 52 | padding:0; 53 | } 54 | #languages li { 55 | display:inline; 56 | margin:0; 57 | padding:0; 58 | vertical-align:bottom; 59 | } 60 | -------------------------------------------------------------------------------- /lib/ckeditor/plugins/dialog/dialogDefinition.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. 3 | For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4 | */ 5 | -------------------------------------------------------------------------------- /lib/ckeditor/plugins/dialog/styles/dialog.css: -------------------------------------------------------------------------------- 1 | .cke_dialog_open { 2 | overflow: hidden; 3 | } 4 | 5 | .cke_dialog_container { 6 | position: fixed; 7 | overflow-y: auto; 8 | overflow-x: auto; 9 | width: 100%; 10 | height: 100%; 11 | top: 0; 12 | left: 0; 13 | z-index: 10010; 14 | } 15 | 16 | .cke_dialog_body { 17 | position: relative; 18 | } 19 | -------------------------------------------------------------------------------- /lib/ckeditor/plugins/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/plugins/icons.png -------------------------------------------------------------------------------- /lib/ckeditor/plugins/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/plugins/icons_hidpi.png -------------------------------------------------------------------------------- /lib/ckeditor/plugins/widget/images/handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/plugins/widget/images/handle.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/img/github-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/img/github-top.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/img/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/img/header-bg.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/img/header-separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/img/header-separator.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/img/logo.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/img/navigation-tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/img/navigation-tip.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/old/assets/inlineall/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/old/assets/inlineall/logo.png -------------------------------------------------------------------------------- /lib/ckeditor/samples/old/assets/sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/old/assets/sample.jpg -------------------------------------------------------------------------------- /lib/ckeditor/samples/old/assets/uilanguages/languages.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. 3 | For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4 | */ 5 | var CKEDITOR_LANGS=function(){var c={af:"Afrikaans",ar:"Arabic",az:"Azerbaijani",bg:"Bulgarian",bn:"Bengali/Bangla",bs:"Bosnian",ca:"Catalan",cs:"Czech",cy:"Welsh",da:"Danish",de:"German","de-ch":"German (Switzerland)",el:"Greek",en:"English","en-au":"English (Australia)","en-ca":"English (Canadian)","en-gb":"English (United Kingdom)",eo:"Esperanto",es:"Spanish","es-mx":"Spanish (Mexico)",et:"Estonian",eu:"Basque",fa:"Persian",fi:"Finnish",fo:"Faroese",fr:"French","fr-ca":"French (Canada)",gl:"Galician", 6 | gu:"Gujarati",he:"Hebrew",hi:"Hindi",hr:"Croatian",hu:"Hungarian",id:"Indonesian",is:"Icelandic",it:"Italian",ja:"Japanese",ka:"Georgian",km:"Khmer",ko:"Korean",ku:"Kurdish",lt:"Lithuanian",lv:"Latvian",mk:"Macedonian",mn:"Mongolian",ms:"Malay",nb:"Norwegian Bokmal",nl:"Dutch",no:"Norwegian",oc:"Occitan",pl:"Polish",pt:"Portuguese (Portugal)","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",si:"Sinhala",sk:"Slovak",sq:"Albanian",sl:"Slovenian",sr:"Serbian (Cyrillic)","sr-latn":"Serbian (Latin)", 7 | sv:"Swedish",th:"Thai",tr:"Turkish",tt:"Tatar",ug:"Uighur",uk:"Ukrainian",vi:"Vietnamese",zh:"Chinese Traditional","zh-cn":"Chinese Simplified"},b=[],a;for(a in CKEDITOR.lang.languages)b.push({code:a,name:c[a]||a});b.sort(function(a,b){return a.name
 2 | 
 3 | -------------------------------------------------------------------------------------------
 4 |   CKEditor - Posted Data
 5 | 
 6 |   We are sorry, but your Web server does not support the PHP language used in this script.
 7 | 
 8 |   Please note that CKEditor can be used with any other server-side language than just PHP.
 9 |   To save the content created with CKEditor you need to read the POST data on the server
10 |   side and write it to a file or the database.
11 | 
12 |   Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
13 |   For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
14 | -------------------------------------------------------------------------------------------
15 | 
16 | 
*/ include "assets/posteddata.php"; ?> 17 | -------------------------------------------------------------------------------- /lib/ckeditor/samples/old/stylesheetparser/assets/sample.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | font-family: Arial, Verdana, sans-serif; 4 | font-size: 12px; 5 | color: #222; 6 | background-color: #fff; 7 | } 8 | 9 | /* preserved spaces for rtl list item bullets. (#6249)*/ 10 | ol,ul,dl 11 | { 12 | padding-right:40px; 13 | } 14 | 15 | h1,h2,h3,h4 16 | { 17 | font-family: Georgia, Times, serif; 18 | } 19 | 20 | h1.lightBlue 21 | { 22 | color: #00A6C7; 23 | font-size: 1.8em; 24 | font-weight:normal; 25 | } 26 | 27 | h3.green 28 | { 29 | color: #739E39; 30 | font-weight:normal; 31 | } 32 | 33 | span.markYellow { background-color: yellow; } 34 | span.markGreen { background-color: lime; } 35 | 36 | img.left 37 | { 38 | padding: 5px; 39 | margin-right: 5px; 40 | float:left; 41 | border:2px solid #DDD; 42 | } 43 | 44 | img.right 45 | { 46 | padding: 5px; 47 | margin-right: 5px; 48 | float:right; 49 | border:2px solid #DDD; 50 | } 51 | 52 | a.green 53 | { 54 | color:#739E39; 55 | } 56 | 57 | table.grey 58 | { 59 | background-color : #F5F5F5; 60 | } 61 | 62 | table.grey th 63 | { 64 | background-color : #DDD; 65 | } 66 | 67 | ul.square 68 | { 69 | list-style-type : square; 70 | } 71 | -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font license info 2 | 3 | 4 | ## Font Awesome 5 | 6 | Copyright (C) 2012 by Dave Gandy 7 | 8 | Author: Dave Gandy 9 | License: SIL () 10 | Homepage: http://fortawesome.github.com/Font-Awesome/ 11 | -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/font/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "css_prefix_text": "icon-", 4 | "css_use_suffix": false, 5 | "hinting": true, 6 | "units_per_em": 1000, 7 | "ascent": 850, 8 | "glyphs": [ 9 | { 10 | "uid": "f48ae54adfb27d8ada53d0fd9e34ee10", 11 | "css": "trash-empty", 12 | "code": 59392, 13 | "src": "fontawesome" 14 | }, 15 | { 16 | "uid": "1c4068ed75209e21af36017df8871802", 17 | "css": "down-big", 18 | "code": 59393, 19 | "src": "fontawesome" 20 | }, 21 | { 22 | "uid": "95376bf082bfec6ce06ea1cda7bd7ead", 23 | "css": "up-big", 24 | "code": 59394, 25 | "src": "fontawesome" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/font/fontello.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/toolbarconfigurator/font/fontello.eot -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/font/fontello.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/toolbarconfigurator/font/fontello.ttf -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/font/fontello.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/samples/toolbarconfigurator/font/fontello.woff -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Marijn Haverbeke and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/lib/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror 2 | [![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror) 3 | [![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror) 4 | [Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?again)](https://marijnhaverbeke.nl/fund/) 5 | 6 | CodeMirror is a JavaScript component that provides a code editor in 7 | the browser. When a mode is available for the language you are coding 8 | in, it will color your code, and optionally help with indentation. 9 | 10 | The project page is http://codemirror.net 11 | The manual is at http://codemirror.net/doc/manual.html 12 | The contributing guidelines are in [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md) 13 | -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css: -------------------------------------------------------------------------------- 1 | /* neo theme for codemirror */ 2 | 3 | /* Color scheme */ 4 | 5 | .cm-s-neo.CodeMirror { 6 | background-color:#ffffff; 7 | color:#2e383c; 8 | line-height:1.4375; 9 | } 10 | .cm-s-neo .cm-comment {color:#75787b} 11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3} 12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a} 13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328} 14 | .cm-s-neo .cm-string {color:#b35e14} 15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65} 16 | 17 | 18 | /* Editor styling */ 19 | 20 | .cm-s-neo pre { 21 | padding:0; 22 | } 23 | 24 | .cm-s-neo .CodeMirror-gutters { 25 | border:none; 26 | border-right:10px solid transparent; 27 | background-color:transparent; 28 | } 29 | 30 | .cm-s-neo .CodeMirror-linenumber { 31 | padding:0; 32 | color:#e0e2e5; 33 | } 34 | 35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } 36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } 37 | -------------------------------------------------------------------------------- /lib/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/icons.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/icons_hidpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/icons_hidpi.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/arrow.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/close.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/hidpi/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/hidpi/close.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/hidpi/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/hidpi/lock-open.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/hidpi/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/hidpi/lock.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/hidpi/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/hidpi/refresh.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/lock-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/lock-open.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/lock.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/lib/ckeditor/skins/minimalist/images/refresh.png -------------------------------------------------------------------------------- /lib/ckeditor/skins/minimalist/readme.md: -------------------------------------------------------------------------------- 1 | "Minimalist" Skin 2 | ==================== 3 | 4 | A port of the default CKEditor skin, Moono, without the gradients. 5 | 6 | Jeff Lyon 7 | [Albatross Digital](albatrossdigital.com) 8 | -------------------------------------------------------------------------------- /src/dateformats.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'jquery', 3 | 'vellum/templates/date_format_menu.html' 4 | ], function( 5 | $, 6 | date_format_menu 7 | ){ 8 | function showMenu(x, y, callback, hideOnLeave) { 9 | var formats = { 10 | "": gettext("No Formatting"), 11 | "%e/%n/%y": "d/m/yy e.g. 30/1/14", 12 | "%a, %b %e, %Y": "ddd, mmm d, yyyy e.g. Thu, Jan 30, 2014" 13 | }; 14 | var menu = $(date_format_menu({formats: formats})); 15 | $('body').append(menu); 16 | menu.find('li a').click(function () { 17 | var format = $(this).data("format"); 18 | try { 19 | callback(format); 20 | } finally { 21 | menu.remove(); 22 | } 23 | return false; 24 | }); 25 | menu.css({'top': y, 'left': x}).show(); 26 | if (hideOnLeave) { 27 | menu.mouseleave(function () { 28 | menu.fadeOut(400, function () { menu.remove(); }); 29 | }); 30 | } 31 | } 32 | 33 | return { 34 | showMenu: showMenu, 35 | }; 36 | }); 37 | -------------------------------------------------------------------------------- /src/debugutil.js: -------------------------------------------------------------------------------- 1 | /* global console */ 2 | define(["underscore"], function (_) { 3 | if (_.isUndefined(console)) { 4 | return { 5 | log: function () {}, 6 | error: function () {} 7 | }; 8 | } else { 9 | return { 10 | log: function () { console.log.apply(console, arguments); }, 11 | error: function () { console.error.apply(console, arguments); } 12 | }; 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /src/hqAnalytics.js: -------------------------------------------------------------------------------- 1 | define([], function() { 2 | 3 | var noop = function() {}; 4 | 5 | return { 6 | fbUsage: noop, 7 | usage: noop, 8 | workflow: noop, 9 | }; 10 | }); 11 | -------------------------------------------------------------------------------- /src/less-style/atwho.less: -------------------------------------------------------------------------------- 1 | // Styling related to the atwho widget 2 | @import "lib/main"; 3 | 4 | .atwho-view ul { 5 | overflow: hidden; 6 | } 7 | 8 | .atwho-jrtext { 9 | padding-left: 1em; 10 | color: gray; 11 | } 12 | 13 | .cur > .atwho-jrtext { 14 | padding-left: 1em; 15 | color: white; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/less-style/dropdown.less: -------------------------------------------------------------------------------- 1 | // Consistent width for icons in menus 2 | .dropdown-menu a > i { 3 | display: inline-block; 4 | width: 16px; 5 | } 6 | 7 | .checklist { 8 | i.fa-check { 9 | display: none; 10 | width: auto; 11 | } 12 | 13 | .selected i.fa-check { 14 | display: inline-block; 15 | margin-left: -14px; 16 | margin-right: 2px; 17 | } 18 | } 19 | 20 | // Nested dropdowns 21 | .dropdown-submenu { 22 | position: relative; 23 | 24 | > a { 25 | &:after { 26 | display: block; 27 | content: " "; 28 | float: right; 29 | width: 0; 30 | height: 0; 31 | border-color: transparent transparent transparent #ccc; 32 | border-style: solid; 33 | border-width: 5px 0 5px 5px; 34 | margin-top: 5px; 35 | margin-right: -10px; 36 | } 37 | } 38 | 39 | > .dropdown-menu { 40 | top: 0; 41 | left: 100%; 42 | margin-top: -6px; 43 | margin-left: -1px; 44 | border-radius: 0 6px 6px 6px; 45 | } 46 | 47 | &:hover { 48 | > .dropdown-menu { 49 | display: block; 50 | } 51 | 52 | > a:after { 53 | border-left-color: @white; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/less-style/lib/main.less: -------------------------------------------------------------------------------- 1 | @import "bootstrap/variables"; 2 | @import "bootstrap/mixins"; 3 | @import "variables"; 4 | -------------------------------------------------------------------------------- /src/less-style/lib/variables.less: -------------------------------------------------------------------------------- 1 | @containerHeight: 606px; 2 | @contentWidth: 69%; 3 | @gridGutterWidth: 20px; 4 | @treeBrowserHeadHeight: 25px; 5 | 6 | @contentPaddingVellum: 12px; 7 | 8 | // colors 9 | @blue: #1557A2; 10 | @blueDark: #4A607D; 11 | @orange: #FF8B03; 12 | 13 | @navbarBackground: #F4F4F4; 14 | @grayDarker: #2C2C2C; 15 | @blueLight: #2787d0; 16 | 17 | // Main Colors 18 | @cc-bg: #f2f2f1; 19 | @cc-text: #181715; 20 | 21 | @cc-neutral-hi: #d6d6d4; 22 | @cc-neutral-mid: #685c53; 23 | @cc-neutral-low: #373534; 24 | 25 | @cc-brand-hi: #bcdeff; 26 | @cc-brand-mid: #004ebc; 27 | @cc-brand-low: #002c5f; 28 | 29 | @cc-light-cool-accent-hi: #ccf3f4; 30 | @cc-light-cool-accent-mid: #00bdc5; 31 | @cc-light-cool-accent-low: #00799a; 32 | 33 | @cc-dark-warm-accent-hi: #ffe3c2; 34 | @cc-dark-warm-accent-mid: #ff8400; 35 | @cc-dark-warm-accent-low: #994f00; 36 | 37 | @cc-light-warm-accent-hi: #f8ecbd; 38 | @cc-light-warm-accent-mid: #f9c700; 39 | @cc-light-warm-accent-low: #685300; 40 | 41 | @cc-att-pos-hi: #d5eaca; 42 | @cc-att-pos-mid: #47b700; 43 | @cc-att-pos-low: #216f00; 44 | 45 | @cc-att-neg-hi: #efcfcb; 46 | @cc-att-neg-mid: #e53e30; 47 | @cc-att-neg-low: #812627; 48 | 49 | @cc-dark-cool-accent-hi: #d6c5ea; 50 | @cc-dark-cool-accent-mid: #9060c8; 51 | @cc-dark-cool-accent-low: #5d3f82; 52 | 53 | // Master Vellum-specific z-index list 54 | // Also see bootstrap/variables.less 55 | @zindexUIContainer: @zindexFixedNavbar + 1; // Cover HQ's nav bar and footer in full-screen mode 56 | @zindexBlockInteraction: 2000; // Above all interaction (modals, menus, dropdowns, etc.) 57 | -------------------------------------------------------------------------------- /src/less-style/main.less: -------------------------------------------------------------------------------- 1 | // CSS of dependencies included here for convenience 2 | // Expectation is that nothing in any of these files depends on any other of the files 3 | 4 | @import "atwho"; 5 | @import "dropdown"; 6 | @import "inputs"; 7 | @import "labels"; 8 | @import "markdown"; 9 | @import "modals"; 10 | @import "multimedia"; 11 | @import "popover"; 12 | @import "question-props"; 13 | @import "structure"; 14 | @import "tree-content"; 15 | -------------------------------------------------------------------------------- /src/less-style/modals.less: -------------------------------------------------------------------------------- 1 | // Custom styling for modals 2 | @import "lib/main"; 3 | 4 | .fd-valid-alert-icon { 5 | color: lighten(@red, 15); 6 | } 7 | 8 | // Film and spinner that cover screen during save (not a bootstrap modal like the others) 9 | .fd-form-saving { 10 | position: fixed; 11 | top: 0; 12 | bottom: 0; 13 | left: 0; 14 | right: 0; 15 | opacity: 0.8; 16 | background-color: @black; 17 | z-index: @zindexBlockInteraction; 18 | 19 | > div { 20 | @size: 32px; 21 | 22 | opacity: 1; 23 | position: fixed; 24 | top: calc(~"50% - " @size / 2); 25 | left: calc(~"50% - " @size / 2); 26 | .box-sizing(border-box); 27 | width: @size; 28 | height: @size; 29 | .border-radius(4px); 30 | background-color: @white; 31 | font-size: 22px; 32 | text-align: center; 33 | } 34 | } 35 | 36 | // Full-screen modal for displaying form XML 37 | .fd-full-screen-modal { 38 | .modal-dialog { 39 | position: fixed; 40 | left: 0; 41 | right: 0; 42 | top: 0; 43 | bottom: 0; 44 | margin: 0; 45 | width: auto; // override bootstrap's static width 46 | 47 | .modal-content { 48 | position: absolute; 49 | @padding: 20px; 50 | top: @padding; 51 | bottom: @padding; 52 | left: @padding; 53 | right: @padding; 54 | 55 | .modal-body { 56 | overflow-y: auto; // fixed position means scrolling happens within modal 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/less-style/multimedia.less: -------------------------------------------------------------------------------- 1 | // Styles for multimedia attached to questions 2 | @import "lib/main"; 3 | 4 | // Vellum wrapper 5 | .formdesigner .fd-ui-container { 6 | 7 | // Area displaying small version of image 8 | .fd-mm-preview-container { 9 | text-align: center; 10 | width: 115px; 11 | float: left; 12 | 13 | img, .fd-mm-no-ref { 14 | border: 1px solid @grayLighter; 15 | } 16 | 17 | img { 18 | padding: .5em; 19 | background-color: @white; 20 | margin-bottom: @gridGutterWidth/2; 21 | } 22 | 23 | .fd-mm-no-ref { 24 | color: @grayLight; 25 | background-color: @white; 26 | padding: @gridGutterWidth/2; 27 | 28 | i { 29 | display: block; 30 | font-size: @baseFontSize*4; 31 | } 32 | } 33 | } 34 | 35 | // Container for buttons (upload & show path) 36 | .fd-mm-upload-container { 37 | margin-left: 125px; 38 | 39 | > .control-row { 40 | margin: 0px 0px 10px 0; 41 | &:first-child { height: 25px; } 42 | } 43 | 44 | .fd-mm-path-input { 45 | margin-right: 92px; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/less-style/popover.less: -------------------------------------------------------------------------------- 1 | // Styling for popovers for data node bubbles 2 | .rich-text-popover { 3 | .border-radius(3px); 4 | word-wrap: break-word; 5 | 6 | // Static width, haven't found a better way to do this 7 | min-width: 236px; 8 | max-width: 276px; 9 | 10 | .popover-title { 11 | h3 { 12 | font-weight: 600; 13 | font-size: 14px; 14 | margin: 0; 15 | } 16 | 17 | .text-muted { 18 | margin-top: 5px; 19 | line-height: 1.3em; 20 | } 21 | } 22 | 23 | // Offset the popover to account for the popover arrow 24 | &.top, &.right, &.bottom, &.left { 25 | margin: 0; 26 | } 27 | &.bottom { margin-top: 5px } 28 | &.top { margin-bottom: -10px } 29 | &.right { margin-left: 5px } 30 | 31 | .arrow, 32 | .arrow:after { 33 | display: none; 34 | } 35 | } 36 | 37 | .popover-content { 38 | .alert { 39 | margin-bottom: 0; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/less-style/xpath-editor.less: -------------------------------------------------------------------------------- 1 | // Styles for XPath editor 2 | @import "lib/main"; 3 | 4 | // Entired panel, including header 5 | .fd-xpath-editor { 6 | 7 | // Scrollable content 8 | .fd-xpath-editor-content { 9 | padding: @gridGutterWidth; 10 | 11 | // Main content, above save & cancel (simple & advanced editor are each a fieldset) 12 | fieldset { 13 | position: relative; 14 | 15 | // "Edit Expression [(Advanced)]" 16 | legend { 17 | // Clear button that toggle simple/advanced mode 18 | .clearfix(); 19 | 20 | // Push legend's bottom border below the button that toggles simple/advanced mode 21 | button { 22 | margin-bottom: 5px; 23 | } 24 | } 25 | 26 | // In simple mode, the list of conditionals 27 | .fd-xpath-editor-expressions { 28 | .xpath-expression-group { 29 | &:last-child { 30 | margin-bottom: 0; 31 | } 32 | 33 | // Check or x to indicate if this expression looks good 34 | .validation-results { 35 | display: inline-block; 36 | padding: 5px 25px; 37 | margin-bottom: 0; 38 | } 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | if (!window.gettext) { 2 | window.gettext = function (arg) { return arg; }; 3 | window.ngettext = function (singular, plural, count) { 4 | return count === 1 ? singular : plural; 5 | }; 6 | } 7 | 8 | define([ 9 | 'vellum/core', 10 | 'vellum/ignoreButRetain', 11 | 'vellum/intentManager', 12 | 'vellum/itemset', 13 | 'vellum/javaRosa/plugin', 14 | 'vellum/datasources', 15 | 'vellum/lock', 16 | 'vellum/databrowser', 17 | 'vellum/commtrack', 18 | 'vellum/modeliteration', 19 | 'vellum/saveToCase', 20 | 'vellum/uploader', 21 | 'vellum/window', 22 | 'vellum/copy-paste', 23 | 'vellum/commander', 24 | 'vellum/commcareConnect', 25 | ], function () { 26 | // adds $.vellum as a side-effect 27 | }); 28 | -------------------------------------------------------------------------------- /src/markdown.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'markdown-it', 3 | 'underscore' 4 | ], function( 5 | markdownIt, 6 | _ 7 | ) { 8 | var md = markdownIt('zero') 9 | .enable(['link', 'emphasis', 'strikethrough', 'heading', 'list', 'table']), 10 | defaultRender = md.renderer.rules.link_open || function(tokens, idx, options, env, self) { 11 | return self.renderToken(tokens, idx, options); 12 | }; 13 | 14 | // https://github.com/markdown-it/markdown-it/blob/6db517357af5bb42398b474efd3755ad33245877/docs/architecture.md#renderer 15 | md.renderer.rules.link_open = function (tokens, idx, options, env, self) { 16 | // If you are sure other plugins can't add `target` - drop check below 17 | var aIndex = tokens[idx].attrIndex('target'); 18 | 19 | if (aIndex < 0) { 20 | tokens[idx].attrPush(['target', '_blank']); // add new attribute 21 | } else { 22 | tokens[idx].attrs[aIndex][1] = '_blank'; // replace value of existing attr 23 | } 24 | 25 | // pass token to default renderer. 26 | return defaultRender(tokens, idx, options, env, self); 27 | }; 28 | 29 | function markdown(text) { 30 | if (_.isString(text)) { 31 | text = text.replace(/\\\\n/g, '\n'); 32 | return md.render(text); 33 | } 34 | return ""; 35 | } 36 | 37 | return markdown; 38 | }); 39 | -------------------------------------------------------------------------------- /src/template-loader.js: -------------------------------------------------------------------------------- 1 | /* global module */ 2 | module.exports = function (source) { 3 | return `const _ = require("underscore"); module.exports = _.template(${JSON.stringify(source)})`; 4 | }; 5 | -------------------------------------------------------------------------------- /src/templates/add_question.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /src/templates/alert_global.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

<% if (messageType.icon) { %> <% } %><%=messageType.title%>

4 |
    5 | <% _.each(messages, function (message) { %> 6 |
  • <%-message%>
  • 7 | <% }); %> 8 |
9 |
10 | -------------------------------------------------------------------------------- /src/templates/atwho_display.html: -------------------------------------------------------------------------------- 1 |
  • 2 | <%= displayPath %> 3 | <% if (displayLabel) { %> 4 |
    5 | <%= displayLabel %> 6 | <% } %> 7 |
  • , 8 | -------------------------------------------------------------------------------- /src/templates/auto_box.html: -------------------------------------------------------------------------------- 1 |
    2 | 6 |
    7 | -------------------------------------------------------------------------------- /src/templates/button_remove.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/templates/commander.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 |
    5 | -------------------------------------------------------------------------------- /src/templates/confirm_overwrite.html: -------------------------------------------------------------------------------- 1 |
    2 |

    3 | <%=description%> 4 |

    5 |
    6 |
    <%=xmldiff%>
    7 |
    8 |
    9 | -------------------------------------------------------------------------------- /src/templates/control_group.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 |
    5 | -------------------------------------------------------------------------------- /src/templates/control_group_stdInput.html: -------------------------------------------------------------------------------- 1 |
    2 | 5 |
    6 | class="form-control"<% } %> /> 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /src/templates/copy_paste_help.html: -------------------------------------------------------------------------------- 1 |
    2 |

    <%-gettext("Copying and Pasting Questions")%>

    3 |
    4 | <%-gettext("These actions are available via the browser's Edit menu, and you can also use:")%> 5 |
    6 |
    7 |

    <%=metachar%>C

    8 | <%-gettext("for copy")%> 9 |
    10 | 14 |
    15 |

    <%=metachar%>V

    16 | <%-gettext("for paste")%> 17 |
    18 |
    19 |
    20 |
    21 |

    <%-gettext("Copy from or Paste into this text box:")%>

    22 |

    23 |
    24 |

    <%-gettext("Selecting Multiple Questions")%>

    25 |
    26 | <% 27 | var key = metachar.endsWith("+") ? metachar.slice(0, -1) : metachar; 28 | key = "" + key + ""; 29 | print(format(gettext("Hold {key} and click on each question."), {key: key})); 30 | %> 31 |
    32 |

    <%-gettext("Other Tips")%>

    33 |

    <%-gettext("Questions can be copied between forms, and even to other apps.")%>

    34 |
    35 | -------------------------------------------------------------------------------- /src/templates/date_format_menu.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/templates/date_format_popover.html: -------------------------------------------------------------------------------- 1 | (<%= text %>) -------------------------------------------------------------------------------- /src/templates/easy_reference_popover.html: -------------------------------------------------------------------------------- 1 |

    <%= text %>

    2 | <% if (ufid) { %> 3 |

    4 | 5 | <%-gettext("show in question list")%> 6 | 7 |

    8 | <% } %> 9 | -------------------------------------------------------------------------------- /src/templates/edit_source.html: -------------------------------------------------------------------------------- 1 |
    2 |

    3 | <%=description%> 4 |

    5 | 6 |
    7 | -------------------------------------------------------------------------------- /src/templates/external_sources_tree.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    <%-gettext("App Properties")%>

    5 |
    6 |
    7 | 20 |
    21 |
    22 |
    23 |
    24 |
    25 |
    26 | -------------------------------------------------------------------------------- /src/templates/find_usages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <% _.each(tableData, function(refs, question) { %> 8 | 9 | 10 | 11 | 12 | 13 | <% _.each(refs, function(propName, path) {%> 14 | 15 | 16 | 17 | 18 | 19 | <% }); %> 20 | <% }); %> 21 |
    <%-gettext("Question")%><%-gettext("Used By")%><%-gettext("In Property")%>
    <%- question %>
    <%- path %><%- propName %>
    22 | -------------------------------------------------------------------------------- /src/templates/find_usages_search.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /src/templates/form_errors_template.html: -------------------------------------------------------------------------------- 1 |
      2 | <% _.each(errors, function (error) { %> 3 |
    • 4 | <%= error.mug.getDisplayName(displayLanguage) %> 5 |
        6 | <% _.each(error.errors, function (error) { %> 7 |
      • <%= error.message %>
      • 8 | <% }); %> 9 |
      10 |
    • 11 | <% }); %> 12 |
    13 | -------------------------------------------------------------------------------- /src/templates/language_selector.html: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | <% _.each(languages, function(language) { %> 4 |
  • <%-language.name%><% 5 | if (language.name !== language.code && language.code !== '_ids') { 6 | %> (<%-language.code%>)<% 7 | } 8 | %>
  • <% 9 | }); %> 10 | -------------------------------------------------------------------------------- /src/templates/markdown_help.html: -------------------------------------------------------------------------------- 1 |
    2 | 9 | <%-gettext("Turn Off Text Formatting")%> 10 | <%-gettext("Turn On Text Formatting")%> 11 |
    12 | -------------------------------------------------------------------------------- /src/templates/modal_button.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/templates/modal_content.html: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /src/templates/multimedia_block.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 7 |
    8 |
    9 |
    10 |
    11 |
    12 | 13 |
    14 |
    15 |
    16 | -------------------------------------------------------------------------------- /src/templates/multimedia_errors.html: -------------------------------------------------------------------------------- 1 | <% if (errors.length > 0) { %> 2 |
    3 | <% for (var e = 0; e < errors.length; e++) { 4 | var error = errors[e]; %> 5 |

    <%- error %>

    6 | <% } %> 7 |
    8 | <% } %> 9 | -------------------------------------------------------------------------------- /src/templates/multimedia_existing_audio.html: -------------------------------------------------------------------------------- 1 |

    2 | "><%-gettext("Open Audio")%> 6 |

    7 |

    8 | <%-gettext("New Audio Uploaded Successfully")%> 9 |

    10 | -------------------------------------------------------------------------------- /src/templates/multimedia_existing_image.html: -------------------------------------------------------------------------------- 1 |

    2 | uploaded image 3 | "><%-gettext("View Full Size")%> 7 |

    8 |

    9 | <%-gettext("New Image Uploaded Successfully")%> 10 |

    11 | -------------------------------------------------------------------------------- /src/templates/multimedia_existing_text.html: -------------------------------------------------------------------------------- 1 |

    2 | "><%-gettext("Open HTML")%> 6 |

    7 |

    8 | <%-gettext("New HTML Document Uploaded Successfully")%> 9 |

    10 | -------------------------------------------------------------------------------- /src/templates/multimedia_existing_video.html: -------------------------------------------------------------------------------- 1 |

    2 | "><%-gettext("Open Video")%> 6 |

    7 |

    8 | <%-gettext("New Video Uploaded Successfully")%> 9 |

    10 | -------------------------------------------------------------------------------- /src/templates/multimedia_nomedia.html: -------------------------------------------------------------------------------- 1 |

    2 | 3 | <%-gettext("No Reference")%> 4 |

    5 | -------------------------------------------------------------------------------- /src/templates/multimedia_upload_status.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | <%= file_name %> [<%= file_size %> MB] 4 |
    5 |

    6 | <%=gettext("Ready to upload. Click Begin Upload below to start.")%> 7 |

    8 |

    9 | <%-gettext("There were errors.")%> 10 |

    11 |
    12 |
    13 | -------------------------------------------------------------------------------- /src/templates/multimedia_upload_trigger.html: -------------------------------------------------------------------------------- 1 | 4 | <%- multimediaExists ? gettext("Replace") : gettext("Upload") %> <%=mediaType%> 5 | 6 | -------------------------------------------------------------------------------- /src/templates/question_fieldset.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | <% if (help) { %> 4 |
    5 | 9 | 10 |
    11 | <% } %> 12 | <%=fieldsetTitle%> 13 |
    14 | 17 |
    18 |
    19 |
    20 |
    21 | -------------------------------------------------------------------------------- /src/templates/question_toolbar.html: -------------------------------------------------------------------------------- 1 |
    2 | <% if (isCopyable) { %>
    <% } %> 3 |
    4 | <% if (isDeleteable) { %> 5 | 8 | <% } %> 9 | <% if (sections.length) { %> 10 |
    11 | 12 | 13 | 14 | 15 | 25 |
    26 | <% } %> 27 |
    28 |
    29 |
    31 | style="display: none" 32 | <% } %> 33 | ><%= comment %>
    34 | -------------------------------------------------------------------------------- /src/templates/question_type_changer.html: -------------------------------------------------------------------------------- 1 |
    2 | 4 | 5 | <%= currentTypeName %> 6 | 7 | 22 |
    23 | -------------------------------------------------------------------------------- /src/templates/ui_element.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 5 | <% if (help) { %> 6 |
    7 | 10 |
    11 | <% } %> 12 |
    13 |
    14 | 15 |
    16 |
    17 |
    18 |
    19 | -------------------------------------------------------------------------------- /src/templates/undo_alert.html: -------------------------------------------------------------------------------- 1 |
    fade in"> 2 | 3 | <%-gettext("You have deleted a question.")%> <%-gettext("Undo")%> 4 | <% if (errors.length) { %> 5 |

    <% 6 | print(format( 7 | ngettext( 8 | "Warning: {errs} is still referenced by other questions.", 9 | "Warning: {errs} are still referenced by other questions.", 10 | errors.length 11 | ), 12 | {errs: errors.join(", ")} 13 | )) 14 | %>

    15 | <% } %> 16 |
    17 | -------------------------------------------------------------------------------- /src/templates/widget_attachment_case.html: -------------------------------------------------------------------------------- 1 | <% props[""] = {calculate: "", relevant: ""}; %> 2 | 3 | <% _.each(props, function (v, k) { %> 4 |
    5 |
    6 |
    7 | "/> 9 |
    10 |
    11 | 12 | 13 | 14 |
    15 |
    16 |
    17 |
    18 | " /> 20 |
    21 |
    22 |
    23 |
    24 | "/> 26 |
    27 |
    28 |
    29 |
    30 | "/> 32 |
    33 |
    34 |
    35 | <% }); %> 36 | -------------------------------------------------------------------------------- /src/templates/widget_control_keyvalue.html: -------------------------------------------------------------------------------- 1 |
    2 | <% pairs[""] = ""; %> 3 | <% _.each(pairs, function (v, k) { _.each(_.isArray(v) ? v : [v], function (v) { %> 4 |
    5 |
    6 | " /> 7 |
    8 |
    9 |
    " />
    10 |
    11 | 12 | 13 | 14 |
    15 |
    16 | <% }); }); %> 17 | <%=gettext("Add Key→Value Pair")%> 18 |
    19 | -------------------------------------------------------------------------------- /src/templates/widget_control_message.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | <% if (html) { %><%= html %><% } else { %><%- msg.message %><% } %> 4 |
    5 | -------------------------------------------------------------------------------- /src/templates/widget_index_case.html: -------------------------------------------------------------------------------- 1 | <% props[""] = {calculate: "", relevant: "", case_type: "", relationship: ""}; %> 2 | 3 | <% _.each(props, function (v, k) { %> 4 |
    5 |
    6 |
    7 | "/> 9 |
    10 |
    11 | 12 | 13 | 14 |
    15 |
    16 |
    17 |
    18 | " /> 20 |
    21 |
    22 |
    23 |
    24 | "/> 26 |
    27 |
    28 |
    29 |
    30 | "/> 32 |
    33 |
    34 |
    35 | <% }); %> 36 | -------------------------------------------------------------------------------- /src/templates/widget_save_to_case.html: -------------------------------------------------------------------------------- 1 |
    2 | <%= internal_template({props: props}) %> 3 | <%-gettext("Add Property")%> 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /src/templates/widget_update_case.html: -------------------------------------------------------------------------------- 1 | <% props[""] = {calculate: "", relevant: ""}; %> 2 | 3 | <% _.each(props, function (v, k) { %> 4 |
    5 |
    6 |
    7 | "/> 9 |
    10 |
    11 | 12 | 13 | 14 |
    15 |
    16 |
    17 |
    18 | " /> 20 |
    21 |
    22 |
    23 |
    24 | "/> 26 |
    27 |
    28 |
    29 | <% }); %> 30 | -------------------------------------------------------------------------------- /src/templates/xpath_expression.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | <<%=tag%> <%=tagArgs%> class="fd-input form-control left-question xpath-edit-node jstree-drop" 5 | type="text" placeholder="<%= leftPlaceholder %>" >> 6 |
    7 |
    8 | 13 |
    14 |
    15 | <<%=tag%> <%=tagArgs%> class="fd-input form-control right-question xpath-edit-node jstree-drop" 16 | type="text" placeholder="<%= rightPlaceholder %>" >> 17 |
    18 |
    19 | 22 |
    23 |

    24 | 25 |

    26 |

    27 | 28 |

    29 |
    30 |
    31 |
    32 |
    33 | -------------------------------------------------------------------------------- /src/templates/xpath_validation_errors.html: -------------------------------------------------------------------------------- 1 |
    2 |

    <%-gettext("Validation Failed")%>

    3 |

    <%-gettext("Please fix the error before leaving this page:")%>

    4 |
    5 |       <%=errors%>
    6 |     
    7 |
    8 | -------------------------------------------------------------------------------- /test: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # run vellum tests and jshint the source 3 | 4 | export PATH=`npm bin`:$PATH 5 | 6 | if [[ "$1" == "--help" ]]; then 7 | echo "USAGE: $0 [TEST_GREP] [--no-jshint]" 8 | exit 9 | fi 10 | 11 | qs="" 12 | if [[ "$1" != "" && "$1" != -* ]]; then 13 | qs="$1" 14 | shift 15 | fi 16 | 17 | run_jshint="true" 18 | if [[ "$1" == "--no-jshint" ]]; then 19 | run_jshint="false" 20 | shift 21 | fi 22 | 23 | temp="/tmp/test-$$.tmp" 24 | 25 | # Make sure the right build files have been generated 26 | yarn testbuild 27 | 28 | # run the tests 29 | node_modules/mocha-headless-chrome/bin/start -f http://localhost:${VELLUM_PORT:-8088}/?grep="$qs" -t 500000 | tee $temp 30 | 31 | RESULT="${PIPESTATUS[0]}" 32 | if grep -q "Parse error" $temp; then 33 | rm $temp 34 | else 35 | rm $temp 36 | if [ "$RESULT" -ne 0 ]; then 37 | # stop on mocha-headless-chrome non-zero exit status (except parse error) 38 | # NOTE there may be edge cases where grep exits with non-zero 39 | # causing this script to exit prematurely 40 | exit 1 41 | fi 42 | fi 43 | 44 | if [[ "$run_jshint" == "true" ]]; then 45 | jshint src \ 46 | && jshint --config tests/.jshintrc tests \ 47 | && echo "jshint passed" 48 | fi 49 | -------------------------------------------------------------------------------- /tests/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "browser": true, 3 | 4 | "asi": false, 5 | "bitwise": true, 6 | "boss": false, 7 | "esversion": 6, 8 | "eqeqeq": true, 9 | "evil": false, 10 | "forin": false, 11 | "immed": true, 12 | /* latedef apparently didn't work properly past jshint 2.8.0 13 | see https://github.com/jshint/jshint/issues/2833 14 | after an upgrade uncommenting this will throw a slew of errors which are hard 15 | to untagle due to built in cyclic dependencies on veriables which cause the 16 | tests to fail. 17 | "latedef": "nofunc", */ 18 | "laxbreak": false, 19 | "loopfunc": true, 20 | "noarg": true, 21 | "nonew": true, 22 | "undef": true, 23 | "unused": "vars", 24 | "globals": { 25 | "define": false, 26 | "gettext": false, 27 | "ngettext": false, 28 | "requirejs": false, 29 | /* MOCHA */ 30 | "describe": false, 31 | "it": false, 32 | "before": false, 33 | "beforeEach": false, 34 | "after": false, 35 | "afterEach": false 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/base.js: -------------------------------------------------------------------------------- 1 | /*jshint multistr: true */ 2 | define([ 3 | 'chai', 4 | 'jquery', 5 | 'underscore', 6 | 'tests/utils' 7 | ], function ( 8 | chai, 9 | $, 10 | _, 11 | util 12 | ) { 13 | var assert = chai.assert; 14 | 15 | describe("The plugin manager", function () { 16 | it("should ignore unknown plugins", function (done) { 17 | util.init({ 18 | plugins: ["plugin-will-not-be-found"], 19 | core: { onReady: function () { 20 | assert(!this.isPluginEnabled("plugin-will-not-be-found"), 21 | "loaded unknown plugin"); 22 | done(); 23 | } 24 | }}); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /tests/forms/xforms/form1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | New Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | question1 label 21 | 22 | 23 | group label 24 | 25 | 26 | question2 label 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 43 | -------------------------------------------------------------------------------- /tests/forms/xforms/form7.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/forms/xforms/form7.xml -------------------------------------------------------------------------------- /tests/forms/xforms/form8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | New Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question1 label 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /tests/forms/xforms/form_with_no_body.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | New Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | question1 24 | 25 | 26 | question2 27 | 28 | 29 | question3 30 | 31 | 32 | question4 33 | 34 | 35 | question5 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /tests/forms/xforms/form_with_no_instance_block.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | New Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question1 16 | 17 | 18 | question2 19 | 20 | 21 | question3 22 | 23 | 24 | question4 25 | 26 | 27 | question5 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 50 | -------------------------------------------------------------------------------- /tests/lib/CommCareHQFont-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/CommCareHQFont-Regular.otf -------------------------------------------------------------------------------- /tests/lib/commcarehqfont-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/commcarehqfont-regular.eot -------------------------------------------------------------------------------- /tests/lib/commcarehqfont-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/commcarehqfont-regular.ttf -------------------------------------------------------------------------------- /tests/lib/commcarehqfont-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/commcarehqfont-regular.woff -------------------------------------------------------------------------------- /tests/lib/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/fontawesome-webfont.eot -------------------------------------------------------------------------------- /tests/lib/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /tests/lib/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dimagi/Vellum/ddd001ef54158d6b3fb955bd897315e2a8ee692b/tests/lib/fontawesome-webfont.woff -------------------------------------------------------------------------------- /tests/profiling.js: -------------------------------------------------------------------------------- 1 | /*jshint multistr: true */ 2 | define([ 3 | 'chai', 4 | 'jquery', 5 | 'underscore', 6 | 'tests/utils', 7 | 'static/profiling/small-form.xml', 8 | 'static/profiling/huge_form.xml' 9 | ], function ( 10 | chai, 11 | $, 12 | _, 13 | util, 14 | SMALL_FORM_XML, 15 | HUGE_FORM_XML 16 | ) { 17 | describe("Profiling tests", function () { 18 | beforeEach(function (done) { 19 | // start with empty form to reduce effect of previous tests 20 | util.init({ 21 | core: { 22 | onReady: function () { 23 | done(); 24 | } 25 | } 26 | }); 27 | }); 28 | 29 | for (var i = 0; i < 6; i++) { 30 | it("should load small form " + i, function (done) { 31 | util.init({ 32 | core: { 33 | form: SMALL_FORM_XML, 34 | onReady: function () { 35 | done(); 36 | } 37 | } 38 | }); 39 | }); 40 | } 41 | 42 | it("should load huge form ", function (done) { 43 | // measured time was ~1.5 minutes, this is artificially high 44 | this.timeout(5 * 60 * 1000); 45 | 46 | util.init({ 47 | core: { 48 | form: HUGE_FORM_XML, 49 | onReady: function () { 50 | done(); 51 | } 52 | } 53 | }); 54 | }); 55 | }); 56 | }); 57 | -------------------------------------------------------------------------------- /tests/static/commcareConnect/assessment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Untitled Form 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | score 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | -------------------------------------------------------------------------------- /tests/static/commcareConnect/learn_module.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | module 1 12 | Module 1 is fun Learning is fun 13 | 2 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | name 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | -------------------------------------------------------------------------------- /tests/static/commtrack/invalid-transfer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/static/copy-paste/text-question.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | English Text 16 | 17 | 18 | Nope 19 | 20 | 21 | 22 | 23 | Hindi Text 24 | 25 | 26 | Nope 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 38 | 39 | -------------------------------------------------------------------------------- /tests/static/core/diff-result.html: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?>
    <node>
    <value>
    aaa</value>
    </node>
    <node>
    <value>bbb
    ccc</value>
    </node>
    2 | -------------------------------------------------------------------------------- /tests/static/core/diff1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | aaa 4 | 5 | 6 | bbb 7 | 8 | -------------------------------------------------------------------------------- /tests/static/core/diff2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ccc 4 | 5 | -------------------------------------------------------------------------------- /tests/static/core/hidden-value-in-repeat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/static/core/invalid-questions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 |

    11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | q0 20 | 21 | 22 | q1 23 | 24 | 25 | 26 | 27 | q0 28 | 29 | 30 | q1 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 44 | 45 | -------------------------------------------------------------------------------- /tests/static/core/test1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vellum testing 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | State 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/static/databrowser/child-ref-no-hashtag.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/static/databrowser/child-ref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {"#case/dob":null} 20 | {"prefixes":{"#case/parent/":"instance('casedb')/cases/case[@case_id = instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/index/parent]/","#case/":"instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/"}} 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/static/databrowser/ignore-rich-text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {"#case/dob":null} 19 | {"prefixes":{"#case/parent/":"instance('casedb')/cases/case[@case_id = instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/index/parent]/","#case/":"instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/"}} 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/static/databrowser/mother-ref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {"#case/parent/edd":null} 21 | 22 | {"prefixes":{"#case/parent/":"instance('casedb')/cases/case[@case_id = instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/index/parent]/","#case/":"instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/"}} 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/static/databrowser/preloaded-hashtags.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {"#case/dob":null} 21 | 22 | {"prefixes":{"#case/parent/":"instance('casedb')/cases/case[@case_id = instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/index/parent]/","#case/":"instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/"}} 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/static/datasources/case-property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {"#case/dob":null} 19 | {"prefixes":{"#case/parent/":"instance('casedb')/cases/case[@case_id = instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/index/parent]/","#case/":"instance('casedb')/cases/case[@case_id = instance('commcaresession')/session/data/case_id]/"}} 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/static/diffDataParent/sibling-as-child.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | group 18 | 19 | 20 | text 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/static/escapedHashtags/invalid-xpath.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/static/exporter/item-id.tsv: -------------------------------------------------------------------------------- 1 | Question Type Text (en) Text (hin) Audio (en) Audio (hin) Image (en) Image (hin) Video (en) Video (hin) Video Inline (en) Video Inline (hin) Display Condition Validation Condition Validation Message Calculate Condition Required Hint Text Help Text Comment 2 | /group Group group group no 3 | /group/question1 Multiple Choice question1 question1 no 4 | /group/question1-1x Choice item1 item1 5 | /group/question1-2x Choice item2 item2 -------------------------------------------------------------------------------- /tests/static/exporter/vid-ref.tsv: -------------------------------------------------------------------------------- 1 | Question Type Text (en) Text (hin) Audio (en) Audio (hin) Image (en) Image (hin) Video (en) Video (hin) Video Inline (en) Video Inline (hin) Display Condition Validation Condition Validation Message Calculate Condition Required Hint Text Help Text Comment 2 | /question1 Text question1 question1 jr://file/commcare/video/data/question1.3gp jr://file/commcare/video/data/question1.3gp jr://file/commcare/video-inline/data/question1.3gp jr://file/commcare/video-inline/data/question1.3gp no -------------------------------------------------------------------------------- /tests/static/exporter/vid-ref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question1 16 | jr://file/commcare/video/data/question1.3gp 17 | jr://file/commcare/video-inline/data/question1.3gp 18 | 19 | 20 | 21 | 22 | question1 23 | jr://file/commcare/video/data/question1.3gp 24 | jr://file/commcare/video-inline/data/question1.3gp 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | -------------------------------------------------------------------------------- /tests/static/form/alternate-root-node-name.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | blue 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /tests/static/form/instance-reference.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Contact's Chiefdom 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/form/missing-value.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | choice 16 | 17 | 18 | empty 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/static/form/name-template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%=title%> 5 | 6 | 7 | /> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/case-with-update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | question 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/empty-parent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/ignore-in-head.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/ignored-binds-with-extra-path.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | question2 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/ignored-control-node.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/ignored-data-node.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/ignored-tag-first.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Untitled Form 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | question 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/multi-match.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/multiple-ignores.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/nested-ignored-nodes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/referenced-renamed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/referenced-unrenamed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/static/ignoreButRetain/unknown-element.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/static/intentManager/custom-intent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | not_breath_count 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /tests/static/intentManager/intent-with-no-mug.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | breath_count 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /tests/static/intentManager/intent-with-unknown-attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | breath_count 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /tests/static/itemset/data-itemset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | itemset 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/itemset/dropdown-fixture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | question2 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/itemset/inner-filters.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | question2 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/itemset/itemset-sort.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/static/itemset/test1-with-appearance.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | question1 17 | 18 | 19 | constraint 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/static/itemset/test1-with-constraint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | question1 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/itemset/test1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | question1 17 | 18 | 19 | constraint 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/static/javaRosa/bare-output.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | x x 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /tests/static/javaRosa/group-with-constraint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | This is a label. 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/static/javaRosa/invalid-output-ref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/javaRosa/itext-item-non-auto-id.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | north 18 | 19 | 20 | 21 | 22 | north 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | -------------------------------------------------------------------------------- /tests/static/javaRosa/itext-item-rename-group-move.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/static/javaRosa/multi-lang-trans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | "Text 16 | 17 | 18 | 19 | 20 | "Text 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/javaRosa/multi-line-trans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | First "line 16 | Second" line 17 | Third line 18 | 19 | 20 | 21 | 22 | Hindu trans 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | -------------------------------------------------------------------------------- /tests/static/javaRosa/no-label-text-one-lang.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | jr://file/commcare/image/data/label.png 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/javaRosa/non-default-lang-first.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | test 16 | 17 | 18 | 19 | 20 | test 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/javaRosa/outputref-with-inequality.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /tests/static/javaRosa/single-lang-second-select-with-help.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /tests/static/javaRosa/single-lang-select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 40 | 44 | -------------------------------------------------------------------------------- /tests/static/javaRosa/test-xml-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | Untitled Form 10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | question1 25 | 26 | 27 | 28 | 29 | xyz 30 | 31 | 32 | 33 | 34 | Spanish! 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | -------------------------------------------------------------------------------- /tests/static/javaRosa/text-question.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | question1 16 | 17 | 18 | 19 | 20 | question1 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/javaRosa/text-with-constraint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | text 16 | 17 | 18 | English 19 | 20 | 21 | 22 | 23 | text 24 | 25 | 26 | Hindi 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | -------------------------------------------------------------------------------- /tests/static/logic/hashtag-filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/static/markdown/explicit-no-markdown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | **some markdown** 16 | 17 | 18 | 19 | 20 | **some markdown** 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/markdown/no-markdown-stars.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | **no markdown** 16 | 17 | 18 | 19 | 20 | **no markdown** 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/markdown/no-markdown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | no markdown 16 | 17 | 18 | 19 | 20 | no markdown 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/markdown/simple-markdown-no-chars.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | some markdown 16 | some markdown 17 | 18 | 19 | 20 | 21 | some markdown 22 | some markdown 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | -------------------------------------------------------------------------------- /tests/static/markdown/simple-markdown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | **some markdown** 16 | **some markdown** 17 | 18 | 19 | 20 | 21 | **some markdown** 22 | **some markdown** 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | -------------------------------------------------------------------------------- /tests/static/modeliteration/regular-repeat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/static/mugs/blank-choice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 28 | -------------------------------------------------------------------------------- /tests/static/parser/body-group.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | body 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/parser/first-time-hashtag.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | question1 21 | 22 | 23 | question2 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 37 | 38 | -------------------------------------------------------------------------------- /tests/static/parser/label-without-itext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reference Format Tests 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | y 21 | n 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/static/parser/missing-bind.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | text 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /tests/static/parser/other_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | Places 10 | 11 | 12 | Central 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/static/parser/repeat-with-count-as-question-only-form.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/parser/required.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/parser/test-xml-1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vellum testing 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | State 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/static/parser/test-xml-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/static/questionProperties/comment-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/static/questionTypes/image-capture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | image 16 | 17 | 18 | 19 | 20 | image 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/richText/output-ref.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/richText/output-value.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/saveToCase/case_type_property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | name 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | -------------------------------------------------------------------------------- /tests/static/saveToCase/close_property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | name 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | -------------------------------------------------------------------------------- /tests/static/setvalue/set-value-special.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | text 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/setvalue/set-value.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | text 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /tests/static/writer/ignore-richtext-and-markdown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/static/writer/repeat-noAddRemove-false.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/static/writer/repeat-with-count-as-question.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/static/writer/repeat-with-count-noAddRemove-false.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/static/writer/repeat-with-count.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/static/writer/repeat-without-count.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Untitled Form 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /webpack/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const { merge } = require('webpack-merge'); 3 | const common = require('./webpack.common'); 4 | 5 | module.exports = merge(common, { 6 | mode: 'development', 7 | devtool: 'eval-cheap-module-source-map', 8 | externals: { 9 | // Necessary for tests 10 | jquery: 'window.jQuery', 11 | 12 | // Vellum expects bootstrap to be externally provided. 13 | // No value needed because Vellum never directly references bootstrap. 14 | "bootstrap": "window.nothing", 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /webpack/webpack.prod.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const { merge } = require('webpack-merge'); 3 | const common = require('./webpack.common'); 4 | 5 | module.exports = merge(common, { 6 | mode: 'production', 7 | externals: { 8 | // Necessary for $.vellum to work 9 | jquery: 'window.jQuery', 10 | 11 | // Necessary for jquery-extensions to have proper access to $.fn.popover.Constructor 12 | "jquery.bootstrap": 'window.jQuery', 13 | 14 | // Necessary to allow HQ to override hqAnalytics 15 | "vellum/hqAnalytics": "require('vellum/hqAnalytics')", 16 | 17 | // Necessary so HQ can use its own bootstrap. No need for a real value 18 | // because Vellum never directly references bootstrap. 19 | "bootstrap": "window.nothing", 20 | 21 | "gettext": "window.gettext", 22 | }, 23 | }); 24 | --------------------------------------------------------------------------------