survey-core 1.12.21 → 1.12.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/default.css +8715 -0
- package/default.css.map +1 -0
- package/default.fontless.css +8495 -0
- package/default.fontless.css.map +1 -0
- package/default.fontless.min.css +6 -0
- package/default.min.css +6 -0
- package/defaultV2.css +51 -5
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +51 -5
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +5 -0
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/basque.min.js.LICENSE.txt +5 -0
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +5 -0
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +5 -0
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/catalan.min.js.LICENSE.txt +5 -0
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +5 -0
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +5 -0
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +5 -0
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +5 -0
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +5 -0
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/estonian.min.js.LICENSE.txt +5 -0
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +5 -0
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +5 -0
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/georgian.min.js.LICENSE.txt +5 -0
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +5 -0
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/greek.min.js.LICENSE.txt +5 -0
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +5 -0
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hindi.min.js.LICENSE.txt +5 -0
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +5 -0
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/icelandic.min.js.LICENSE.txt +5 -0
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +5 -0
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +5 -0
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +5 -0
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +5 -0
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/kazakh.min.js.LICENSE.txt +5 -0
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +5 -0
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/latvian.min.js.LICENSE.txt +5 -0
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/lithuanian.min.js.LICENSE.txt +5 -0
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/macedonian.min.js.LICENSE.txt +5 -0
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +5 -0
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/nl-BE.min.js.LICENSE.txt +5 -0
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +5 -0
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +5 -0
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js +1 -1
- package/i18n/philippines.min.js.LICENSE.txt +5 -0
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +5 -0
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese-br.min.js.LICENSE.txt +5 -0
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +5 -0
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +5 -0
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +5 -0
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/serbian.min.js.LICENSE.txt +5 -0
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +5 -0
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +5 -0
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +5 -0
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swahili.min.js.LICENSE.txt +5 -0
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +5 -0
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +5 -0
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/telugu.min.js.LICENSE.txt +5 -0
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +5 -0
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +5 -0
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +5 -0
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/ukrainian.min.js.LICENSE.txt +5 -0
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/urdu.min.js.LICENSE.txt +5 -0
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/vietnamese.min.js.LICENSE.txt +5 -0
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/i18n/welsh.min.js.LICENSE.txt +5 -0
- package/icons/iconsV1.js +1 -1
- package/icons/iconsV1.min.js +1 -1
- package/icons/iconsV1.min.js.LICENSE.txt +5 -0
- package/icons/iconsV2.js +1 -1
- package/icons/iconsV2.min.js +1 -1
- package/icons/iconsV2.min.js.LICENSE.txt +5 -0
- package/modern.css +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +252 -151
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.core.min.js.LICENSE.txt +10 -0
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.i18n.min.js.LICENSE.txt +5 -0
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-dark.min.js.LICENSE.txt +5 -0
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light-panelless.js +156 -0
- package/themes/borderless-light-panelless.js.map +1 -0
- package/themes/borderless-light-panelless.min.js +2 -0
- package/themes/borderless-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/borderless-light.min.js.LICENSE.txt +5 -0
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-dark.min.js.LICENSE.txt +5 -0
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/contrast-light.min.js.LICENSE.txt +5 -0
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +5 -0
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/default-light.min.js.LICENSE.txt +5 -0
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-dark.min.js.LICENSE.txt +5 -0
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light-panelles.min.js.LICENSE.txt +5 -0
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/doubleborder-light.min.js.LICENSE.txt +5 -0
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-dark.min.js.LICENSE.txt +5 -0
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/flat-light.min.js.LICENSE.txt +5 -0
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/index.min.js.LICENSE.txt +5 -0
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-dark.min.js.LICENSE.txt +5 -0
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/layered-light.min.js.LICENSE.txt +5 -0
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-dark.min.js.LICENSE.txt +5 -0
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/plain-light.min.js.LICENSE.txt +5 -0
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-dark.min.js.LICENSE.txt +5 -0
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/sharp-light.min.js.LICENSE.txt +5 -0
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-dark.min.js.LICENSE.txt +5 -0
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/solid-light.min.js.LICENSE.txt +5 -0
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js.LICENSE.txt +5 -0
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-dark.min.js.LICENSE.txt +5 -0
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js.LICENSE.txt +5 -0
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/themes/three-dimensional-light.min.js.LICENSE.txt +5 -0
- package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/localizablestring.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +2 -1
- package/ts3.4/typings/packages/survey-core/src/question_custom.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/question_paneldynamic.d.ts +14 -6
- package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +17 -6
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +11 -6
- package/ts3.4/typings/packages/survey-core/src/textPreProcessor.d.ts +5 -2
- package/typings/entries/chunks/core-wo-model.d.ts +10 -0
- package/typings/entries/chunks/model.d.ts +95 -95
- package/typings/entries/index.d.ts +2 -0
- package/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
- package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +2 -0
- package/typings/packages/survey-core/src/localizablestring.d.ts +1 -1
- package/typings/packages/survey-core/src/panel.d.ts +2 -1
- package/typings/packages/survey-core/src/question_custom.d.ts +3 -0
- package/typings/packages/survey-core/src/question_paneldynamic.d.ts +14 -6
- package/typings/packages/survey-core/src/survey-events-api.d.ts +17 -6
- package/typings/packages/survey-core/src/survey.d.ts +11 -6
- package/typings/packages/survey-core/src/textPreProcessor.d.ts +5 -2
- package/typings/src/actions/action.d.ts +300 -0
- package/typings/src/actions/adaptive-container.d.ts +29 -0
- package/typings/src/actions/container.d.ts +59 -0
- package/typings/src/base-interfaces.d.ts +366 -0
- package/typings/src/base.d.ts +333 -0
- package/typings/src/calculatedValue.d.ts +49 -0
- package/typings/src/choicesRestful.d.ts +177 -0
- package/typings/src/conditionProcessValue.d.ts +25 -0
- package/typings/src/conditions.d.ts +98 -0
- package/typings/src/conditionsParser.d.ts +14 -0
- package/typings/src/console-warnings.d.ts +6 -0
- package/typings/src/defaultCss/defaultCss.d.ts +873 -0
- package/typings/src/defaultTitle.d.ts +3 -0
- package/typings/src/dragdrop/choices.d.ts +21 -0
- package/typings/src/dragdrop/core.d.ts +55 -0
- package/typings/src/dragdrop/dom-adapter.d.ts +49 -0
- package/typings/src/dragdrop/engine.d.ts +6 -0
- package/typings/src/dragdrop/matrix-rows.d.ts +19 -0
- package/typings/src/dragdrop/ranking-choices.d.ts +26 -0
- package/typings/src/dragdrop/ranking-select-to-rank.d.ts +17 -0
- package/typings/src/dropdownListModel.d.ts +97 -0
- package/typings/src/dropdownMultiSelectListModel.d.ts +37 -0
- package/typings/src/dxSurveyService.d.ts +18 -0
- package/typings/src/element-helper.d.ts +8 -0
- package/typings/src/error.d.ts +81 -0
- package/typings/src/expressionItems.d.ts +57 -0
- package/typings/src/expressions/expressionParser.d.ts +54 -0
- package/typings/src/expressions/expressions.d.ts +135 -0
- package/typings/src/flowpanel.d.ts +34 -0
- package/typings/src/functionsfactory.d.ts +14 -0
- package/typings/src/global_variables_utils.d.ts +30 -0
- package/typings/src/header.d.ts +87 -0
- package/typings/src/helpers.d.ts +44 -0
- package/typings/src/itemvalue.d.ts +93 -0
- package/typings/src/jsonobject.d.ts +378 -0
- package/typings/src/list.d.ts +144 -0
- package/typings/src/localizablestring.d.ts +125 -0
- package/typings/src/localization/english.d.ts +109 -0
- package/typings/src/martixBase.d.ts +133 -0
- package/typings/src/mask/input_element_adapter.d.ts +16 -0
- package/typings/src/mask/mask_base.d.ts +29 -0
- package/typings/src/mask/mask_currency.d.ts +41 -0
- package/typings/src/mask/mask_datetime.d.ts +91 -0
- package/typings/src/mask/mask_numeric.d.ts +90 -0
- package/typings/src/mask/mask_pattern.d.ts +78 -0
- package/typings/src/mask/mask_utils.d.ts +20 -0
- package/typings/src/multiSelectListModel.d.ts +17 -0
- package/typings/src/notifier.d.ts +30 -0
- package/typings/src/page.d.ts +133 -0
- package/typings/src/panel-layout-column.d.ts +9 -0
- package/typings/src/panel.d.ts +633 -0
- package/typings/src/popup-dropdown-view-model.d.ts +35 -0
- package/typings/src/popup-modal-view-model.d.ts +16 -0
- package/typings/src/popup-survey.d.ts +132 -0
- package/typings/src/popup-utils.d.ts +4 -0
- package/typings/src/popup-view-model.d.ts +81 -0
- package/typings/src/popup.d.ts +66 -0
- package/typings/src/progress-buttons.d.ts +44 -0
- package/typings/src/question.d.ts +949 -0
- package/typings/src/questionCustomWidgets.d.ts +46 -0
- package/typings/src/question_baseselect.d.ts +547 -0
- package/typings/src/question_boolean.d.ts +116 -0
- package/typings/src/question_buttongroup.d.ts +51 -0
- package/typings/src/question_checkbox.d.ts +158 -0
- package/typings/src/question_comment.d.ts +59 -0
- package/typings/src/question_custom.d.ts +454 -0
- package/typings/src/question_dropdown.d.ts +156 -0
- package/typings/src/question_empty.d.ts +8 -0
- package/typings/src/question_expression.d.ts +110 -0
- package/typings/src/question_file.d.ts +303 -0
- package/typings/src/question_html.d.ts +26 -0
- package/typings/src/question_image.d.ts +86 -0
- package/typings/src/question_imagepicker.d.ts +168 -0
- package/typings/src/question_matrix.d.ts +198 -0
- package/typings/src/question_matrixdropdown.d.ts +56 -0
- package/typings/src/question_matrixdropdownbase.d.ts +572 -0
- package/typings/src/question_matrixdropdowncolumn.d.ts +344 -0
- package/typings/src/question_matrixdropdownrendered.d.ts +171 -0
- package/typings/src/question_matrixdynamic.d.ts +299 -0
- package/typings/src/question_multipletext.d.ts +361 -0
- package/typings/src/question_paneldynamic.d.ts +719 -0
- package/typings/src/question_radiogroup.d.ts +40 -0
- package/typings/src/question_ranking.d.ts +135 -0
- package/typings/src/question_rating.d.ts +300 -0
- package/typings/src/question_signaturepad.d.ts +149 -0
- package/typings/src/question_tagbox.d.ts +98 -0
- package/typings/src/question_text.d.ts +206 -0
- package/typings/src/question_textbase.d.ts +62 -0
- package/typings/src/questionfactory.d.ts +27 -0
- package/typings/src/questionnonvalue.d.ts +22 -0
- package/typings/src/rendererFactory.d.ts +11 -0
- package/typings/src/settings.d.ts +641 -0
- package/typings/src/survey-element.d.ts +471 -0
- package/typings/src/survey-error.d.ts +18 -0
- package/typings/src/survey-events-api.d.ts +1152 -0
- package/typings/src/survey.d.ts +3126 -0
- package/typings/src/surveyProgress.d.ts +4 -0
- package/typings/src/surveyStrings.d.ts +151 -0
- package/typings/src/surveyTaskManager.d.ts +16 -0
- package/typings/src/surveyTimerModel.d.ts +47 -0
- package/typings/src/surveyToc.d.ts +23 -0
- package/typings/src/surveytimer.d.ts +22 -0
- package/typings/src/svgbundle.d.ts +23 -0
- package/typings/src/template-renderer.d.ts +10 -0
- package/typings/src/textPreProcessor.d.ts +43 -0
- package/typings/src/themes.d.ts +222 -0
- package/typings/src/trigger.d.ts +155 -0
- package/typings/src/utils/animation.d.ts +91 -0
- package/typings/src/utils/camera.d.ts +27 -0
- package/typings/src/utils/cssClassBuilder.d.ts +6 -0
- package/typings/src/utils/devices.d.ts +12 -0
- package/typings/src/utils/dragOrClickHelper.d.ts +16 -0
- package/typings/src/utils/popup.d.ts +45 -0
- package/typings/src/utils/responsivity-manager.d.ts +31 -0
- package/typings/src/utils/taskmanager.d.ts +28 -0
- package/typings/src/utils/text-area.d.ts +58 -0
- package/typings/src/utils/utils.d.ts +86 -0
- package/typings/src/validator.d.ts +204 -0
|
@@ -0,0 +1,3126 @@
|
|
|
1
|
+
import { JsonError } from "./jsonobject";
|
|
2
|
+
import { Base, EventBase } from "./base";
|
|
3
|
+
import { ISurvey, ISurveyData, ISurveyImpl, ITextProcessor, IQuestion, IPanel, IElement, IPage, ISurveyErrorOwner, ISurveyElement, IProgressInfo, IFindElement, ISurveyLayoutElement, IPlainDataOptions, LayoutElementContainer, IValueItemCustomPropValues, ILoadFromJSONOptions, IDropdownMenuOptions, ITextProcessorProp, ITextProcessorResult } from "./base-interfaces";
|
|
4
|
+
import { SurveyElementCore } from "./survey-element";
|
|
5
|
+
import { ISurveyTriggerOwner, SurveyTrigger, Trigger } from "./trigger";
|
|
6
|
+
import { CalculatedValue } from "./calculatedValue";
|
|
7
|
+
import { PageModel } from "./page";
|
|
8
|
+
import { dxSurveyService } from "./dxSurveyService";
|
|
9
|
+
import { LocalizableString } from "./localizablestring";
|
|
10
|
+
import { SurveyTimerModel, ISurveyTimerText } from "./surveyTimerModel";
|
|
11
|
+
import { IQuestionPlainData, Question } from "./question";
|
|
12
|
+
import { QuestionSelectBase } from "./question_baseselect";
|
|
13
|
+
import { ItemValue } from "./itemvalue";
|
|
14
|
+
import { PanelModel, QuestionRowModel } from "./panel";
|
|
15
|
+
import { HtmlConditionItem, UrlConditionItem } from "./expressionItems";
|
|
16
|
+
import { SurveyError } from "./survey-error";
|
|
17
|
+
import { IAction, Action } from "./actions/action";
|
|
18
|
+
import { ActionContainer } from "./actions/container";
|
|
19
|
+
import { QuestionPanelDynamicModel } from "./question_paneldynamic";
|
|
20
|
+
import { Notifier } from "./notifier";
|
|
21
|
+
import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatePageEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, ChoicesLoadedEvent, ProcessDynamicTextEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelValueChangingEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent } from "./survey-events-api";
|
|
22
|
+
import { QuestionMatrixDropdownModelBase } from "./question_matrixdropdownbase";
|
|
23
|
+
import { QuestionMatrixDynamicModel } from "./question_matrixdynamic";
|
|
24
|
+
import { QuestionFileModel } from "./question_file";
|
|
25
|
+
import { QuestionMultipleTextModel } from "./question_multipletext";
|
|
26
|
+
import { ITheme, ImageFit, ImageAttachment } from "./themes";
|
|
27
|
+
import { PopupModel } from "./popup";
|
|
28
|
+
import { Cover } from "./header";
|
|
29
|
+
import { QuestionSignaturePadModel } from "./question_signaturepad";
|
|
30
|
+
/**
|
|
31
|
+
* The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
|
|
32
|
+
*
|
|
33
|
+
* [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
|
|
34
|
+
*/
|
|
35
|
+
export declare class SurveyModel extends SurveyElementCore implements ISurvey, ISurveyData, ISurveyImpl, ISurveyTriggerOwner, ISurveyErrorOwner, ISurveyTimerText {
|
|
36
|
+
static readonly TemplateRendererComponentName: string;
|
|
37
|
+
[index: string]: any;
|
|
38
|
+
static platform: string;
|
|
39
|
+
get platformName(): string;
|
|
40
|
+
notifier: Notifier;
|
|
41
|
+
rootElement: HTMLElement;
|
|
42
|
+
/**
|
|
43
|
+
* A suffix added to the name of the property that stores comments.
|
|
44
|
+
*
|
|
45
|
+
* Default value: "-Comment"
|
|
46
|
+
*
|
|
47
|
+
* Many question types allow respondents to leave comments. To enable this functionality, set a question's [`showCommentArea`](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#showCommentArea) property to `true`. Comment values are saved in a separate property. The property name is composed of the question `name` and `commentSuffix`.
|
|
48
|
+
*
|
|
49
|
+
* Respondents can also leave comments when they select "Other" in choice-based questions, such as Dropdown or Checkboxes. The property name for the comment value is composed according to the same rules. However, you can use the question `name` as a key to store the comment value instead. Disable the [`storeOthersAsComment`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#storeOthersAsComment) property in this case.
|
|
50
|
+
*
|
|
51
|
+
* [View Demo](https://surveyjs.io/form-library/examples/create-checkboxes-question-in-javascript/ (linkStyle))
|
|
52
|
+
*/
|
|
53
|
+
get commentSuffix(): string;
|
|
54
|
+
set commentSuffix(val: string);
|
|
55
|
+
get commentPrefix(): string;
|
|
56
|
+
set commentPrefix(val: string);
|
|
57
|
+
private valuesHash;
|
|
58
|
+
private variablesHash;
|
|
59
|
+
private editingObjValue;
|
|
60
|
+
private timerModelValue;
|
|
61
|
+
private navigationBarValue;
|
|
62
|
+
/**
|
|
63
|
+
* An event that is raised after a [trigger](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#triggers) is executed.
|
|
64
|
+
*
|
|
65
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
66
|
+
*
|
|
67
|
+
* [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
|
|
68
|
+
* @see triggers
|
|
69
|
+
* @see runTriggers
|
|
70
|
+
*/
|
|
71
|
+
onTriggerExecuted: EventBase<SurveyModel, TriggerExecutedEvent>;
|
|
72
|
+
/**
|
|
73
|
+
* An event that is raised before the survey is completed. Use this event to prevent survey completion.
|
|
74
|
+
* @see onComplete
|
|
75
|
+
* @see doComplete
|
|
76
|
+
* @see autoAdvanceAllowComplete
|
|
77
|
+
*/
|
|
78
|
+
onCompleting: EventBase<SurveyModel, CompletingEvent>;
|
|
79
|
+
/**
|
|
80
|
+
* An event that is raised after the survey is completed. Use this event to send survey results to the server.
|
|
81
|
+
*
|
|
82
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
83
|
+
*
|
|
84
|
+
* For an example of how to use the methods described above, refer to the following help topic: [Store Survey Results in Your Own Database](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-your-own-database).
|
|
85
|
+
*
|
|
86
|
+
* > Do not disable the [`showCompletePage`](https://surveyjs.io/form-library/documentation/surveymodel#showCompletePage) property if you call one of the `options.showSave...` methods. This is required because the UI that indicates data saving progress is integrated into the complete page. If you hide the complete page, the UI also becomes invisible.
|
|
87
|
+
* @see onPartialSend
|
|
88
|
+
* @see doComplete
|
|
89
|
+
* @see autoAdvanceAllowComplete
|
|
90
|
+
*/
|
|
91
|
+
onComplete: EventBase<SurveyModel, CompleteEvent>;
|
|
92
|
+
/**
|
|
93
|
+
* An event that is raised before the survey displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
|
|
94
|
+
* @see showPreviewBeforeComplete
|
|
95
|
+
* @see previewMode
|
|
96
|
+
* @see showPreview
|
|
97
|
+
* @see cancelPreview
|
|
98
|
+
*/
|
|
99
|
+
onShowingPreview: EventBase<SurveyModel, ShowingPreviewEvent>;
|
|
100
|
+
/**
|
|
101
|
+
* An event that is raised before the survey navigates to a specified URL. Use this event to change the URL or cancel the navigation.
|
|
102
|
+
* @see navigateToUrl
|
|
103
|
+
* @see navigateToUrlOnCondition
|
|
104
|
+
*/
|
|
105
|
+
onNavigateToUrl: EventBase<SurveyModel, NavigateToUrlEvent>;
|
|
106
|
+
/**
|
|
107
|
+
* An event that is raised when the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) changes to `"running"`.
|
|
108
|
+
* @see firstPageIsStartPage
|
|
109
|
+
*/
|
|
110
|
+
onStarted: EventBase<SurveyModel, {}>;
|
|
111
|
+
/**
|
|
112
|
+
* An event that is raised to save incomplete survey results. Enable the [`partialSendEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#partialSendEnabled) property for this event to occur.
|
|
113
|
+
*
|
|
114
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
115
|
+
*
|
|
116
|
+
* Alternatively, you can handle the [`onCurrentPageChanged`](#onCurrentPageChanged) and [`onValueChanged`](#onValueChanged) events, as shown in the following demo: [Continue an Incomplete Survey](https://surveyjs.io/form-library/examples/survey-editprevious/).
|
|
117
|
+
*/
|
|
118
|
+
onPartialSend: EventBase<SurveyModel, {}>;
|
|
119
|
+
/**
|
|
120
|
+
* An event that is raised before the current page is switched.
|
|
121
|
+
*
|
|
122
|
+
* @see currentPageNo
|
|
123
|
+
* @see nextPage
|
|
124
|
+
* @see prevPage
|
|
125
|
+
**/
|
|
126
|
+
onCurrentPageChanging: EventBase<SurveyModel, CurrentPageChangingEvent>;
|
|
127
|
+
/**
|
|
128
|
+
* An event that is raised after the current page is switched.
|
|
129
|
+
*
|
|
130
|
+
* @see currentPageNo
|
|
131
|
+
* @see nextPage
|
|
132
|
+
* @see prevPage
|
|
133
|
+
*/
|
|
134
|
+
onCurrentPageChanged: EventBase<SurveyModel, CurrentPageChangedEvent>;
|
|
135
|
+
/**
|
|
136
|
+
* An event that is raised before a question value is changed.
|
|
137
|
+
* @see setValue
|
|
138
|
+
*/
|
|
139
|
+
onValueChanging: EventBase<SurveyModel, ValueChangingEvent>;
|
|
140
|
+
/**
|
|
141
|
+
* An event that is raised after a question value is changed.
|
|
142
|
+
*
|
|
143
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
144
|
+
*
|
|
145
|
+
* To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event.
|
|
146
|
+
* @see setValue
|
|
147
|
+
*/
|
|
148
|
+
onValueChanged: EventBase<SurveyModel, ValueChangedEvent>;
|
|
149
|
+
/**
|
|
150
|
+
* An event that is raised after a [variable](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#variables) or [calculated value](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#calculated-values) is changed.
|
|
151
|
+
*
|
|
152
|
+
* @see setVariable
|
|
153
|
+
* @see calculatedValues
|
|
154
|
+
*/
|
|
155
|
+
onVariableChanged: EventBase<SurveyModel, VariableChangedEvent>;
|
|
156
|
+
/**
|
|
157
|
+
* An event that is raised after question visibility is changed.
|
|
158
|
+
*
|
|
159
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
160
|
+
*
|
|
161
|
+
* Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
|
|
162
|
+
*/
|
|
163
|
+
onQuestionVisibleChanged: EventBase<SurveyModel, QuestionVisibleChangedEvent>;
|
|
164
|
+
onVisibleChanged: EventBase<SurveyModel, any>;
|
|
165
|
+
/**
|
|
166
|
+
* An event that is raised after page visibility is changed.
|
|
167
|
+
*
|
|
168
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
169
|
+
*
|
|
170
|
+
* Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
|
|
171
|
+
*/
|
|
172
|
+
onPageVisibleChanged: EventBase<SurveyModel, PageVisibleChangedEvent>;
|
|
173
|
+
/**
|
|
174
|
+
* An event that is raised after panel visibility is changed.
|
|
175
|
+
*
|
|
176
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
177
|
+
*
|
|
178
|
+
* Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
|
|
179
|
+
*/
|
|
180
|
+
onPanelVisibleChanged: EventBase<SurveyModel, PanelVisibleChangedEvent>;
|
|
181
|
+
/**
|
|
182
|
+
* An event that is raised when the survey creates any new object derived from [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question).
|
|
183
|
+
*
|
|
184
|
+
* In a survey, complex elements ([Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/), [Multiple Text](https://surveyjs.io/form-library/examples/questiontype-multipletext/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)) are composed of questions. Use this event to customize any question regardless of which survey element it belongs to.
|
|
185
|
+
*
|
|
186
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
187
|
+
*
|
|
188
|
+
* To use this event for questions loaded from JSON, create an empty survey model, add an event handler, and only then populate the model from the JSON object:
|
|
189
|
+
*
|
|
190
|
+
* ```js
|
|
191
|
+
* import { Model } from "survey-core";
|
|
192
|
+
*
|
|
193
|
+
* const surveyJson = {
|
|
194
|
+
* // ...
|
|
195
|
+
* };
|
|
196
|
+
* // Create an empty model
|
|
197
|
+
* const survey = new Model();
|
|
198
|
+
* // Add an event handler
|
|
199
|
+
* survey.onQuestionCreated.add((sender, options) => {
|
|
200
|
+
* //...
|
|
201
|
+
* });
|
|
202
|
+
* // Load the survey JSON schema
|
|
203
|
+
* survey.fromJSON(surveyJson);
|
|
204
|
+
* ```
|
|
205
|
+
* @see onQuestionAdded
|
|
206
|
+
*/
|
|
207
|
+
onQuestionCreated: EventBase<SurveyModel, QuestionCreatedEvent>;
|
|
208
|
+
/**
|
|
209
|
+
* An event that is raised when a new question is added to a panel or page.
|
|
210
|
+
*
|
|
211
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
212
|
+
*
|
|
213
|
+
* To use this event for questions loaded from JSON, create an empty survey model, add an event handler, and only then populate the model from the JSON object:
|
|
214
|
+
*
|
|
215
|
+
* ```js
|
|
216
|
+
* import { Model } from "survey-core";
|
|
217
|
+
*
|
|
218
|
+
* const surveyJson = {
|
|
219
|
+
* // ...
|
|
220
|
+
* };
|
|
221
|
+
* // Create an empty model
|
|
222
|
+
* const survey = new Model();
|
|
223
|
+
* // Add an event handler
|
|
224
|
+
* survey.onQuestionAdded.add((sender, options) => {
|
|
225
|
+
* //...
|
|
226
|
+
* });
|
|
227
|
+
* // Load the survey JSON schema
|
|
228
|
+
* survey.fromJSON(surveyJson);
|
|
229
|
+
* ```
|
|
230
|
+
* @see onQuestionCreated
|
|
231
|
+
*/
|
|
232
|
+
onQuestionAdded: EventBase<SurveyModel, QuestionAddedEvent>;
|
|
233
|
+
/**
|
|
234
|
+
* An event that is raised after a question is deleted from the survey.
|
|
235
|
+
*/
|
|
236
|
+
onQuestionRemoved: EventBase<SurveyModel, QuestionRemovedEvent>;
|
|
237
|
+
/**
|
|
238
|
+
* An event that is raised when a new panel is added to a page.
|
|
239
|
+
*/
|
|
240
|
+
onPanelAdded: EventBase<SurveyModel, PanelAddedEvent>;
|
|
241
|
+
/**
|
|
242
|
+
* An event that is raised after a panel is deleted from the survey.
|
|
243
|
+
*/
|
|
244
|
+
onPanelRemoved: EventBase<SurveyModel, PanelRemovedEvent>;
|
|
245
|
+
/**
|
|
246
|
+
* An event that is raised when a new page is added to the survey.
|
|
247
|
+
* @see PanelModel
|
|
248
|
+
*/
|
|
249
|
+
onPageAdded: EventBase<SurveyModel, PageAddedEvent>;
|
|
250
|
+
/**
|
|
251
|
+
* An event that is raised when a question value is being validated. Use this event to add/remove/modify errors or specify a custom error message.
|
|
252
|
+
*
|
|
253
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
254
|
+
*
|
|
255
|
+
* [View Demo](https://surveyjs.io/form-library/examples/add-custom-input-validation/ (linkStyle))
|
|
256
|
+
* @see onServerValidateQuestions
|
|
257
|
+
* @see onValidatePanel
|
|
258
|
+
* @see onMatrixCellValidate
|
|
259
|
+
* @see onSettingQuestionErrors
|
|
260
|
+
*/
|
|
261
|
+
onValidateQuestion: EventBase<SurveyModel, ValidateQuestionEvent>;
|
|
262
|
+
/**
|
|
263
|
+
* @deprecated Use the [`onValidateQuestion`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onValidateQuestion) property instead.
|
|
264
|
+
*/
|
|
265
|
+
onSettingQuestionErrors: EventBase<SurveyModel, SettingQuestionErrorsEvent>;
|
|
266
|
+
/**
|
|
267
|
+
* Use this event to validate data on your server.
|
|
268
|
+
*
|
|
269
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
270
|
+
*
|
|
271
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-server-side-form-validation/ (linkStyle))
|
|
272
|
+
* @see onValidateQuestion
|
|
273
|
+
* @see onValidatePanel
|
|
274
|
+
* @see isValidatingOnServer
|
|
275
|
+
*/
|
|
276
|
+
onServerValidateQuestions: EventBase<SurveyModel, ServerValidateQuestionsEvent>;
|
|
277
|
+
/**
|
|
278
|
+
* An event that is raised when a panel is being validated. Use this event to add/remove/modify errors or specify a custom error message.
|
|
279
|
+
*
|
|
280
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
281
|
+
*
|
|
282
|
+
* [View Demo](https://surveyjs.io/form-library/examples/add-custom-input-validation/ (linkStyle))
|
|
283
|
+
* @see onValidateQuestion
|
|
284
|
+
* @see onServerValidateQuestions
|
|
285
|
+
*/
|
|
286
|
+
onValidatePanel: EventBase<SurveyModel, ValidatePanelEvent>;
|
|
287
|
+
/**
|
|
288
|
+
* @deprecated Use the [`onValidateQuestion`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onValidateQuestion), [`onValidatePanel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onValidatePanel), and [`onValidatePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onValidatePage) events instead.
|
|
289
|
+
*/
|
|
290
|
+
onErrorCustomText: EventBase<SurveyModel, ErrorCustomTextEvent>;
|
|
291
|
+
/**
|
|
292
|
+
* An event that is raised when a survey page is being validated. Use this event to add/remove/modify errors.
|
|
293
|
+
*/
|
|
294
|
+
onValidatePage: EventBase<SurveyModel, ValidatePageEvent>;
|
|
295
|
+
/**
|
|
296
|
+
* @deprecated Use the [`onValidatePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onValidatePage) event instead.
|
|
297
|
+
*/
|
|
298
|
+
onValidatedErrorsOnCurrentPage: EventBase<SurveyModel, ValidatedErrorsOnCurrentPageEvent>;
|
|
299
|
+
/**
|
|
300
|
+
* An event that is raised when the survey processes HTML content. Handle this event to modify HTML content before displaying.
|
|
301
|
+
* @see completedHtml
|
|
302
|
+
* @see loadingHtml
|
|
303
|
+
* @see QuestionHtmlModel.html
|
|
304
|
+
*/
|
|
305
|
+
onProcessHtml: EventBase<SurveyModel, ProcessHtmlEvent>;
|
|
306
|
+
/**
|
|
307
|
+
* Use this event to change a question's display text.
|
|
308
|
+
*/
|
|
309
|
+
onGetQuestionDisplayValue: EventBase<SurveyModel, GetQuestionDisplayValueEvent>;
|
|
310
|
+
/**
|
|
311
|
+
* An event that is raised before the survey displays a question title. Handle this event to modify question titles.
|
|
312
|
+
*
|
|
313
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
314
|
+
*
|
|
315
|
+
* If you want to modify question numbers, handle the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event.
|
|
316
|
+
* @see requiredMark
|
|
317
|
+
*/
|
|
318
|
+
onGetQuestionTitle: EventBase<SurveyModel, GetQuestionTitleEvent>;
|
|
319
|
+
/**
|
|
320
|
+
* An event that is raised when the survey applies HTML tags to a survey, page, panel, and question title. Handle this event to change the HTML tag of individual titles.
|
|
321
|
+
*
|
|
322
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
323
|
+
*
|
|
324
|
+
* If you want to specify HTML tags for all titles, use the [`titleTags`](https://surveyjs.io/form-library/documentation/api-reference/settings#titleTags) object in [global settings](https://surveyjs.io/form-library/documentation/api-reference/settings).
|
|
325
|
+
*
|
|
326
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-titletagnames/ (linkStyle))
|
|
327
|
+
* @see onGetQuestionTitle
|
|
328
|
+
* @see onGetQuestionNumber
|
|
329
|
+
*/
|
|
330
|
+
onGetTitleTagName: EventBase<SurveyModel, GetTitleTagNameEvent>;
|
|
331
|
+
/**
|
|
332
|
+
* An event that is raised before the survey calculates a question number. Handle this event to modify question numbers.
|
|
333
|
+
*
|
|
334
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
335
|
+
*
|
|
336
|
+
* If you want to hide question numbers, disable the [`showQuestionNumbers`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showQuestionNumbers) property.
|
|
337
|
+
* @see onGetQuestionTitle
|
|
338
|
+
* @see questionStartIndex
|
|
339
|
+
*/
|
|
340
|
+
onGetQuestionNumber: EventBase<SurveyModel, GetQuestionNumberEvent>;
|
|
341
|
+
/**
|
|
342
|
+
* @deprecated Use the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event instead.
|
|
343
|
+
*/
|
|
344
|
+
onGetQuestionNo: EventBase<SurveyModel, GetQuestionNumberEvent>;
|
|
345
|
+
/**
|
|
346
|
+
* An event that is raised before the survey calculates a panel number. Handle this event to modify panel numbers.
|
|
347
|
+
*
|
|
348
|
+
* This event is raised only for the panels with a [specified title](https://surveyjs.io/form-library/documentation/api-reference/panel-model#title) and [visible number](https://surveyjs.io/form-library/documentation/api-reference/panel-model#showNumber).
|
|
349
|
+
*/
|
|
350
|
+
onGetPanelNumber: EventBase<SurveyModel, GetPanelNumberEvent>;
|
|
351
|
+
/**
|
|
352
|
+
* An event that is raised before the survey calculates a page number. Handle this event to modify page numbers.
|
|
353
|
+
*
|
|
354
|
+
* This event is raised only if the [`showPageNumbers`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showPageNumbers) property is enabled.
|
|
355
|
+
*
|
|
356
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
357
|
+
* @see onGetQuestionTitle
|
|
358
|
+
* @see questionStartIndex
|
|
359
|
+
*/
|
|
360
|
+
onGetPageNumber: EventBase<SurveyModel, GetPageNumberEvent>;
|
|
361
|
+
/**
|
|
362
|
+
* An event that is raised before the survey displays progress text. Handle this event to change the progress text in code.
|
|
363
|
+
* @see showProgressBar
|
|
364
|
+
* @see progressBarLocation
|
|
365
|
+
* @see progressBarType
|
|
366
|
+
*/
|
|
367
|
+
onGetProgressText: EventBase<SurveyModel, GetProgressTextEvent>;
|
|
368
|
+
/**
|
|
369
|
+
* @deprecated Use the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event instead.
|
|
370
|
+
*/
|
|
371
|
+
onProgressText: EventBase<SurveyModel, ProgressTextEvent>;
|
|
372
|
+
/**
|
|
373
|
+
* An event that is raised to convert Markdown content to HTML.
|
|
374
|
+
*
|
|
375
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
376
|
+
*
|
|
377
|
+
* [View Demo](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/ (linkStyle))
|
|
378
|
+
*/
|
|
379
|
+
onTextMarkdown: EventBase<SurveyModel, TextMarkdownEvent>;
|
|
380
|
+
onTextRenderAs: EventBase<SurveyModel, any>;
|
|
381
|
+
/**
|
|
382
|
+
* An event that is raised after a request to save survey results on [SurveyJS Service](https://api.surveyjs.io/) has been completed. Use this event to find out if the results have been saved successfully.
|
|
383
|
+
*/
|
|
384
|
+
onSendResult: EventBase<SurveyModel, SendResultEvent>;
|
|
385
|
+
/**
|
|
386
|
+
* An event that is raised when the [`getResult(resultId, questionName)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#getResult) method is called. Use this event to obtain answers to an individual question from [SurveyJS Service](https://api.surveyjs.io/).
|
|
387
|
+
* @see getResult
|
|
388
|
+
*/
|
|
389
|
+
onGetResult: EventBase<SurveyModel, GetResultEvent>;
|
|
390
|
+
/**
|
|
391
|
+
* An event that is raised when a respondent opens a dialog window to select files.
|
|
392
|
+
* @see chooseFiles
|
|
393
|
+
*/
|
|
394
|
+
onOpenFileChooser: EventBase<SurveyModel, OpenFileChooserEvent>;
|
|
395
|
+
/**
|
|
396
|
+
* An event that is raised when a File Upload or Signature Pad question starts to upload a file. Applies only if [`storeDataAsText`](https://surveyjs.io/form-library/documentation/api-reference/file-model#storeDataAsText) is `false`. Use this event to upload files to your server.
|
|
397
|
+
*
|
|
398
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
399
|
+
*
|
|
400
|
+
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
|
401
|
+
* @see uploadFiles
|
|
402
|
+
* @see onDownloadFile
|
|
403
|
+
* @see onClearFiles
|
|
404
|
+
*/
|
|
405
|
+
onUploadFiles: EventBase<SurveyModel, UploadFilesEvent>;
|
|
406
|
+
/**
|
|
407
|
+
* An event that is raised when a File Upload question starts to download a file. Use this event to implement file preview when your server stores only file names.
|
|
408
|
+
*
|
|
409
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
410
|
+
*
|
|
411
|
+
* [View Demo](https://surveyjs.io/form-library/examples/store-file-names-in-survey-results/ (linkStyle))
|
|
412
|
+
* @see downloadFile
|
|
413
|
+
* @see onClearFiles
|
|
414
|
+
* @see onUploadFiles
|
|
415
|
+
*/
|
|
416
|
+
onDownloadFile: EventBase<SurveyModel, DownloadFileEvent>;
|
|
417
|
+
/**
|
|
418
|
+
* An event that is raised when users clear files in a [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) question or clear signature in a [Signature Pad](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model) question. Use this event to delete files from your server.
|
|
419
|
+
*
|
|
420
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
421
|
+
*
|
|
422
|
+
* [View Demo](https://surveyjs.io/form-library/examples/file-delayed-upload/ (linkStyle))
|
|
423
|
+
* @see clearFiles
|
|
424
|
+
* @see onDownloadFile
|
|
425
|
+
* @see onUploadFiles
|
|
426
|
+
*/
|
|
427
|
+
onClearFiles: EventBase<SurveyModel, ClearFilesEvent>;
|
|
428
|
+
/**
|
|
429
|
+
* An event that is raised after choices are loaded from a server but before they are assigned to a choice-based question, such as [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) or [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model). Handle this event if you need to modify the loaded choices.
|
|
430
|
+
*/
|
|
431
|
+
onChoicesLoaded: EventBase<SurveyModel, ChoicesLoadedEvent>;
|
|
432
|
+
/**
|
|
433
|
+
* @deprecated Use the [`onChoicesLoaded`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onChoicesLoaded) event instead.
|
|
434
|
+
*/
|
|
435
|
+
onLoadChoicesFromServer: EventBase<SurveyModel, LoadChoicesFromServerEvent>;
|
|
436
|
+
/**
|
|
437
|
+
* An event that is raised after a survey JSON schema is loaded from the [SurveyJS Service](https://api.surveyjs.io). Use this event to modify the loaded schema.
|
|
438
|
+
* @see surveyId
|
|
439
|
+
* @see clientId
|
|
440
|
+
* @see loadSurveyFromService
|
|
441
|
+
*/
|
|
442
|
+
onLoadedSurveyFromService: EventBase<SurveyModel, {}>;
|
|
443
|
+
/**
|
|
444
|
+
* An event that is raised when the survey processes [dynamic texts](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#dynamic-texts) and any text in curly brackets. Use this event, for instance, to substitute parameters in a RESTful URL with real values when you [load choices by URL](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl).
|
|
445
|
+
*/
|
|
446
|
+
onProcessDynamicText: EventBase<SurveyModel, ProcessDynamicTextEvent>;
|
|
447
|
+
/**
|
|
448
|
+
* @deprecated Use the [`onProcessDynamicText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onProcessDynamicText) event instead.
|
|
449
|
+
*/
|
|
450
|
+
onProcessTextValue: EventBase<SurveyModel, ProcessTextValueEvent>;
|
|
451
|
+
/**
|
|
452
|
+
* An event that is raised before rendering a question. Use it to override default question CSS classes.
|
|
453
|
+
*
|
|
454
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
455
|
+
*
|
|
456
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
457
|
+
* @see css
|
|
458
|
+
*/
|
|
459
|
+
onUpdateQuestionCssClasses: EventBase<SurveyModel, UpdateQuestionCssClassesEvent>;
|
|
460
|
+
/**
|
|
461
|
+
* An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
|
|
462
|
+
*
|
|
463
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
464
|
+
*
|
|
465
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
466
|
+
* @see css
|
|
467
|
+
*/
|
|
468
|
+
onUpdatePanelCssClasses: EventBase<SurveyModel, UpdatePanelCssClassesEvent>;
|
|
469
|
+
/**
|
|
470
|
+
* An event that is raised before rendering a page. Use it to override default page CSS classes.
|
|
471
|
+
*
|
|
472
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
473
|
+
*
|
|
474
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
475
|
+
* @see css
|
|
476
|
+
*/
|
|
477
|
+
onUpdatePageCssClasses: EventBase<SurveyModel, UpdatePageCssClassesEvent>;
|
|
478
|
+
/**
|
|
479
|
+
* An event that is raised before rendering a choice item in Radio Button Group and Checkboxes questions. Use it to override default CSS classes applied to choice items.
|
|
480
|
+
*
|
|
481
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
482
|
+
*
|
|
483
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
484
|
+
* @see css
|
|
485
|
+
*/
|
|
486
|
+
onUpdateChoiceItemCss: EventBase<SurveyModel, UpdateChoiceItemCssEvent>;
|
|
487
|
+
/**
|
|
488
|
+
* An event that is raised after the survey is rendered to the DOM. Use this event to modify survey markup.
|
|
489
|
+
*
|
|
490
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
491
|
+
*
|
|
492
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-animation/ (linkStyle))
|
|
493
|
+
*/
|
|
494
|
+
onAfterRenderSurvey: EventBase<SurveyModel, AfterRenderSurveyEvent>;
|
|
495
|
+
onAfterRenderHeader: EventBase<SurveyModel, any>;
|
|
496
|
+
/**
|
|
497
|
+
* An event that is raised after a page is rendered to the DOM. Use it to modify page markup.
|
|
498
|
+
*
|
|
499
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
500
|
+
*
|
|
501
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
|
|
502
|
+
*/
|
|
503
|
+
onAfterRenderPage: EventBase<SurveyModel, AfterRenderPageEvent>;
|
|
504
|
+
/**
|
|
505
|
+
* An event that is raised after a question is rendered to the DOM. Use it to modify question markup.
|
|
506
|
+
*
|
|
507
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
508
|
+
*
|
|
509
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
|
|
510
|
+
*/
|
|
511
|
+
onAfterRenderQuestion: EventBase<SurveyModel, AfterRenderQuestionEvent>;
|
|
512
|
+
/**
|
|
513
|
+
* An event that is raised after a question with a single input field is rendered to the DOM. Use it to modify question markup.
|
|
514
|
+
*
|
|
515
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
516
|
+
*
|
|
517
|
+
* > This event is not raised for questions without input fields ([HTML](https://surveyjs.io/form-library/documentation/questionhtmlmodel), [Image](https://surveyjs.io/form-library/documentation/questionimagemodel)) or questions with multiple input fields ([Matrix](https://surveyjs.io/form-library/documentation/questionmatrixmodel), [Multiple Text](https://surveyjs.io/form-library/documentation/questionmultipletextmodel)).
|
|
518
|
+
*/
|
|
519
|
+
onAfterRenderQuestionInput: EventBase<SurveyModel, AfterRenderQuestionInputEvent>;
|
|
520
|
+
/**
|
|
521
|
+
* An event that is raised after a panel is rendered to the DOM. Use it to modify panel markup.
|
|
522
|
+
*
|
|
523
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
524
|
+
*
|
|
525
|
+
* > This event is raised for static [Panels](https://surveyjs.io/form-library/examples/set-properties-on-multiple-questions-using-panel/) as well as panels within a [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/).
|
|
526
|
+
*/
|
|
527
|
+
onAfterRenderPanel: EventBase<SurveyModel, AfterRenderPanelEvent>;
|
|
528
|
+
/**
|
|
529
|
+
* An event that is raised when an element (input field, checkbox, radio button) within a question gets focus.
|
|
530
|
+
* @see onFocusInPanel
|
|
531
|
+
* @see autoFocusFirstQuestion
|
|
532
|
+
* @see focusQuestion
|
|
533
|
+
*/
|
|
534
|
+
onFocusInQuestion: EventBase<SurveyModel, FocusInQuestionEvent>;
|
|
535
|
+
/**
|
|
536
|
+
* An event that is raised when an element within a panel gets focus.
|
|
537
|
+
* @see onFocusInQuestion
|
|
538
|
+
* @see autoFocusFirstQuestion
|
|
539
|
+
* @see focusQuestion
|
|
540
|
+
*/
|
|
541
|
+
onFocusInPanel: EventBase<SurveyModel, FocusInPanelEvent>;
|
|
542
|
+
/**
|
|
543
|
+
* An event that is raised before a [choice item](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices) is displayed. Use this event to change the visibility of individual choice items in [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model), [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model), [Radio Button Group](https://surveyjs.io/form-library/documentation/api-reference/radio-button-question-model), and other similar question types.
|
|
544
|
+
*/
|
|
545
|
+
onShowingChoiceItem: EventBase<SurveyModel, ShowingChoiceItemEvent>;
|
|
546
|
+
/**
|
|
547
|
+
* Use this event to load choice items in [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel) and [Tag Box](https://surveyjs.io/form-library/documentation/questiontagboxmodel) questions on demand.
|
|
548
|
+
*
|
|
549
|
+
* This event is raised only for those questions that have the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadEnabled) property set to `true`.
|
|
550
|
+
*
|
|
551
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
552
|
+
*
|
|
553
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
|
554
|
+
*/
|
|
555
|
+
onChoicesLazyLoad: EventBase<SurveyModel, ChoicesLazyLoadEvent>;
|
|
556
|
+
/**
|
|
557
|
+
* An event that is raised each time a search string in a [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) or [Tag Box](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) question changes. Use this event to implement custom filtering of choice options.
|
|
558
|
+
* @see [QuestionDropdownModel.searchEnabled](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#searchEnabled)
|
|
559
|
+
* @see [QuestionDropdownModel.searchMode](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#searchMode)
|
|
560
|
+
*/
|
|
561
|
+
onChoicesSearch: EventBase<SurveyModel, ChoicesSearchEvent>;
|
|
562
|
+
/**
|
|
563
|
+
* Use this event to load a display text for the [default choice item](https://surveyjs.io/form-library/documentation/questiondropdownmodel#defaultValue) in [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel) and [Tag Box](https://surveyjs.io/form-library/documentation/questiontagboxmodel) questions.
|
|
564
|
+
*
|
|
565
|
+
* If you load choices from a server (use [`choicesByUrl`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesByUrl) or [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad)), display texts become available only when data is loaded, which does not happen until a user opens the drop-down menu. However, a display text for a default choice item is required before that. In this case, you can load data individually for the default item within the `onGetChoiceDisplayValue` event handler.
|
|
566
|
+
*
|
|
567
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
568
|
+
*
|
|
569
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
|
570
|
+
*/
|
|
571
|
+
onGetChoiceDisplayValue: EventBase<SurveyModel, GetChoiceDisplayValueEvent>;
|
|
572
|
+
/**
|
|
573
|
+
* An event that is raised after a new row is added to a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
|
|
574
|
+
*/
|
|
575
|
+
onMatrixRowAdded: EventBase<SurveyModel, MatrixRowAddedEvent>;
|
|
576
|
+
/**
|
|
577
|
+
* An event that is raised before a new row is added to a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
|
|
578
|
+
*/
|
|
579
|
+
onMatrixRowAdding: EventBase<SurveyModel, MatrixBeforeRowAddedEvent>;
|
|
580
|
+
/**
|
|
581
|
+
* @deprecated Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
|
|
582
|
+
*/
|
|
583
|
+
onMatrixBeforeRowAdded: EventBase<SurveyModel, MatrixBeforeRowAddedEvent>;
|
|
584
|
+
/**
|
|
585
|
+
* An event that is raised before a row is deleted from a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/). You can cancel row deletion and clear row data instead.
|
|
586
|
+
* @see onMatrixRenderRemoveButton
|
|
587
|
+
*/
|
|
588
|
+
onMatrixRowRemoving: EventBase<SurveyModel, MatrixRowRemovingEvent>;
|
|
589
|
+
/**
|
|
590
|
+
* An event that is raised after a row is deleted from a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
|
|
591
|
+
* @see onMatrixRenderRemoveButton
|
|
592
|
+
*/
|
|
593
|
+
onMatrixRowRemoved: EventBase<SurveyModel, MatrixRowRemovedEvent>;
|
|
594
|
+
/**
|
|
595
|
+
* An event that is raised before rendering the Remove button in a row of a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/). Use this event to hide the Remove button for individual matrix rows.
|
|
596
|
+
* @see onMatrixRowRemoving
|
|
597
|
+
* @see onMatrixRowRemoved
|
|
598
|
+
*/
|
|
599
|
+
onMatrixRenderRemoveButton: EventBase<SurveyModel, MatrixAllowRemoveRowEvent>;
|
|
600
|
+
/**
|
|
601
|
+
* @deprecated Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
|
|
602
|
+
*/
|
|
603
|
+
onMatrixAllowRemoveRow: EventBase<SurveyModel, MatrixAllowRemoveRowEvent>;
|
|
604
|
+
/**
|
|
605
|
+
* An event that is raised after the visibility of an [expandable detail section](https://surveyjs.io/form-library/examples/add-expandable-details-section-under-matrix-rows/) is changed. This event can be raised for [Multi-Select](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
|
|
606
|
+
*/
|
|
607
|
+
onMatrixDetailPanelVisibleChanged: EventBase<SurveyModel, MatrixDetailPanelVisibleChangedEvent>;
|
|
608
|
+
/**
|
|
609
|
+
* An event that is raised before a cell in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) is created. Use this event to change the type of individual matrix cells.
|
|
610
|
+
* @see onAfterRenderMatrixCell
|
|
611
|
+
*/
|
|
612
|
+
onMatrixCellCreating: EventBase<SurveyModel, MatrixCellCreatingEvent>;
|
|
613
|
+
/**
|
|
614
|
+
* An event that is raised after a cell in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) is created.
|
|
615
|
+
* @see onAfterRenderMatrixCell
|
|
616
|
+
*/
|
|
617
|
+
onMatrixCellCreated: EventBase<SurveyModel, MatrixCellCreatedEvent>;
|
|
618
|
+
/**
|
|
619
|
+
* An event that is raised for every matrix cell after it is rendered to the DOM.
|
|
620
|
+
* @see onMatrixCellCreated
|
|
621
|
+
*/
|
|
622
|
+
onAfterRenderMatrixCell: EventBase<SurveyModel, MatrixAfterCellRenderEvent>;
|
|
623
|
+
/**
|
|
624
|
+
* @deprecated Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
|
|
625
|
+
*/
|
|
626
|
+
onMatrixAfterCellRender: EventBase<SurveyModel, MatrixAfterCellRenderEvent>;
|
|
627
|
+
/**
|
|
628
|
+
* An event that is raised after a cell value is changed in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
|
|
629
|
+
* @see onMatrixRowAdding
|
|
630
|
+
*/
|
|
631
|
+
onMatrixCellValueChanged: EventBase<SurveyModel, MatrixCellValueChangedEvent>;
|
|
632
|
+
/**
|
|
633
|
+
* An event that is raised before a cell value is changed in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/). Use this event to change the cell value.
|
|
634
|
+
* @see onMatrixRowAdding
|
|
635
|
+
*/
|
|
636
|
+
onMatrixCellValueChanging: EventBase<SurveyModel, MatrixCellValueChangingEvent>;
|
|
637
|
+
/**
|
|
638
|
+
* An event that is raised for [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) and [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) questions when they validate a cell value. Use this event to display a custom error message based on a condition.
|
|
639
|
+
* @see onMatrixRowAdding
|
|
640
|
+
*/
|
|
641
|
+
onMatrixCellValidate: EventBase<SurveyModel, MatrixCellValidateEvent>;
|
|
642
|
+
/**
|
|
643
|
+
* An event that is raised after a new column is added to a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
|
|
644
|
+
*/
|
|
645
|
+
onMatrixColumnAdded: EventBase<SurveyModel, MatrixColumnAddedEvent>;
|
|
646
|
+
/**
|
|
647
|
+
* An event that is raised on adding a new item in Multiple Text question.
|
|
648
|
+
*/
|
|
649
|
+
onMultipleTextItemAdded: EventBase<SurveyModel, MultipleTextItemAddedEvent>;
|
|
650
|
+
/**
|
|
651
|
+
* An event that is raised after a new panel is added to a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
652
|
+
*/
|
|
653
|
+
onDynamicPanelAdded: EventBase<SurveyModel, DynamicPanelModifiedEvent>;
|
|
654
|
+
/**
|
|
655
|
+
* An event that is raised after a panel is deleted from a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
656
|
+
*/
|
|
657
|
+
onDynamicPanelRemoved: EventBase<SurveyModel, DynamicPanelModifiedEvent>;
|
|
658
|
+
/**
|
|
659
|
+
* An event that is raised before a panel is deleted from a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question. Use this event to cancel the deletion.
|
|
660
|
+
*/
|
|
661
|
+
onDynamicPanelRemoving: EventBase<SurveyModel, DynamicPanelRemovingEvent>;
|
|
662
|
+
/**
|
|
663
|
+
* An event that is raised every second while the timer is running.
|
|
664
|
+
*
|
|
665
|
+
* Use the [`timeSpent`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeSpent) property to find out how many seconds have elapsed.
|
|
666
|
+
* @see timeLimit
|
|
667
|
+
* @see timeLimitPerPage
|
|
668
|
+
* @see showTimer
|
|
669
|
+
* @see timerLocation
|
|
670
|
+
* @see startTimer
|
|
671
|
+
*/
|
|
672
|
+
onTimerTick: EventBase<SurveyModel, {}>;
|
|
673
|
+
/**
|
|
674
|
+
* @deprecated Use the [`onTimerTick`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTimerTick) event instead.
|
|
675
|
+
*/
|
|
676
|
+
onTimer: EventBase<SurveyModel, {}>;
|
|
677
|
+
onTimerPanelInfoText: EventBase<SurveyModel, any>;
|
|
678
|
+
/**
|
|
679
|
+
* An event that is raised after a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
680
|
+
*/
|
|
681
|
+
onDynamicPanelValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
|
|
682
|
+
/**
|
|
683
|
+
* @deprecated Use the [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event instead.
|
|
684
|
+
*/
|
|
685
|
+
onDynamicPanelItemValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
|
|
686
|
+
/**
|
|
687
|
+
* An event that is raised before a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
688
|
+
*/
|
|
689
|
+
onDynamicPanelValueChanging: EventBase<SurveyModel, DynamicPanelValueChangingEvent>;
|
|
690
|
+
/**
|
|
691
|
+
* An event that is raised before a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) renders [tab titles](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle). Use this event to change individual tab titles.
|
|
692
|
+
*
|
|
693
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
694
|
+
*
|
|
695
|
+
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
696
|
+
*/
|
|
697
|
+
onGetDynamicPanelTabTitle: EventBase<SurveyModel, DynamicPanelGetTabTitleEvent>;
|
|
698
|
+
/**
|
|
699
|
+
* An event that is raised after the current panel is changed in a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
700
|
+
*/
|
|
701
|
+
onDynamicPanelCurrentIndexChanged: EventBase<SurveyModel, DynamicPanelCurrentIndexChangedEvent>;
|
|
702
|
+
/**
|
|
703
|
+
* An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
704
|
+
*/
|
|
705
|
+
onCheckAnswerCorrect: EventBase<SurveyModel, CheckAnswerCorrectEvent>;
|
|
706
|
+
/**
|
|
707
|
+
* @deprecated Use the [`onCheckAnswerCorrect`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCheckAnswerCorrect) event instead.
|
|
708
|
+
*/
|
|
709
|
+
onIsAnswerCorrect: EventBase<SurveyModel, IsAnswerCorrectEvent>;
|
|
710
|
+
/**
|
|
711
|
+
* An event that is raised when users drag and drop survey elements while designing the survey in [Survey Creator](https://surveyjs.io/survey-creator/documentation/overview). Use this event to control drag and drop operations.
|
|
712
|
+
* @see isDesignMode
|
|
713
|
+
*/
|
|
714
|
+
onDragDropAllow: EventBase<SurveyModel, DragDropAllowEvent>;
|
|
715
|
+
/**
|
|
716
|
+
* An event this is raised before a survey element (usually page) is scrolled to the top. Use this event to cancel the scroll operation.
|
|
717
|
+
*/
|
|
718
|
+
onScrollToTop: EventBase<SurveyModel, ScrollToTopEvent>;
|
|
719
|
+
/**
|
|
720
|
+
* @deprecated Use the [`onScrollToTop`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onScrollToTop) event instead.
|
|
721
|
+
*/
|
|
722
|
+
onScrollingElementToTop: EventBase<SurveyModel, ScrollingElementToTopEvent>;
|
|
723
|
+
onLocaleChangedEvent: EventBase<SurveyModel, {}>;
|
|
724
|
+
/**
|
|
725
|
+
* An event that allows you to add, delete, or modify actions in a question title.
|
|
726
|
+
*
|
|
727
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
728
|
+
*
|
|
729
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-titleactions/ (linkStyle))
|
|
730
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
731
|
+
*/
|
|
732
|
+
onGetQuestionTitleActions: EventBase<SurveyModel, GetQuestionTitleActionsEvent>;
|
|
733
|
+
/**
|
|
734
|
+
* An event that allows you to add, delete, or modify actions in a panel title.
|
|
735
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
736
|
+
*/
|
|
737
|
+
onGetPanelTitleActions: EventBase<SurveyModel, GetPanelTitleActionsEvent>;
|
|
738
|
+
/**
|
|
739
|
+
* An event that allows you to add, delete, or modify actions in a page title.
|
|
740
|
+
*
|
|
741
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
742
|
+
*
|
|
743
|
+
* [View Demo](https://surveyjs.io/form-library/examples/modify-titles-of-survey-elements/ (linkStyle))
|
|
744
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
745
|
+
*/
|
|
746
|
+
onGetPageTitleActions: EventBase<SurveyModel, GetPageTitleActionsEvent>;
|
|
747
|
+
/**
|
|
748
|
+
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel). This panel may belong to a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) or be a standalone survey element.
|
|
749
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
750
|
+
*/
|
|
751
|
+
onGetPanelFooterActions: EventBase<SurveyModel, GetPanelFooterActionsEvent>;
|
|
752
|
+
/**
|
|
753
|
+
* An event that allows you to add, delete, or modify actions in rows of a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
|
|
754
|
+
*
|
|
755
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
756
|
+
*
|
|
757
|
+
* [View Demo](https://surveyjs.io/form-library/examples/employee-information-form/ (linkStyle))
|
|
758
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
759
|
+
*/
|
|
760
|
+
onGetMatrixRowActions: EventBase<SurveyModel, GetMatrixRowActionsEvent>;
|
|
761
|
+
onElementContentVisibilityChanged: EventBase<SurveyModel, any>;
|
|
762
|
+
/**
|
|
763
|
+
* An event that is raised before an [Expression](https://surveyjs.io/form-library/documentation/api-reference/expression-model) question displays a value. Use this event to override the display value.
|
|
764
|
+
*/
|
|
765
|
+
onGetExpressionDisplayValue: EventBase<SurveyModel, GetExpressionDisplayValueEvent>;
|
|
766
|
+
/**
|
|
767
|
+
* An event that is raised after the visibility of a popup is changed.
|
|
768
|
+
*
|
|
769
|
+
* This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions and [Rating Scale](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode), and [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions that contain columns of the `"dropdown"` or `"tagbox"` [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType).
|
|
770
|
+
*/
|
|
771
|
+
onPopupVisibleChanged: EventBase<SurveyModel, PopupVisibleChangedEvent>;
|
|
772
|
+
/**
|
|
773
|
+
* An event that is raised when users open a drop-down menu.
|
|
774
|
+
*
|
|
775
|
+
* This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions, [Rating Scale](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode), and [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions that contain columns of the `"dropdown"` or `"tagbox"` [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType). Handle this event to change the drop-down menu type for specific questions or device types.
|
|
776
|
+
*/
|
|
777
|
+
onOpenDropdownMenu: EventBase<SurveyModel, OpenDropdownMenuEvent>;
|
|
778
|
+
onElementWrapperComponentName: EventBase<SurveyModel, any>;
|
|
779
|
+
onElementWrapperComponentData: EventBase<SurveyModel, any>;
|
|
780
|
+
constructor(jsonObj?: any, renderedElement?: any);
|
|
781
|
+
get sjsVersion(): string;
|
|
782
|
+
set sjsVersion(val: string);
|
|
783
|
+
processClosedPopup(question: IQuestion, popupModel: PopupModel<any>): void;
|
|
784
|
+
protected createTryAgainAction(): IAction;
|
|
785
|
+
private createHtmlLocString;
|
|
786
|
+
/**
|
|
787
|
+
* A list of errors in a survey JSON schema.
|
|
788
|
+
* @see ensureUniqueNames
|
|
789
|
+
*/
|
|
790
|
+
jsonErrors: Array<JsonError>;
|
|
791
|
+
getType(): string;
|
|
792
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
793
|
+
/**
|
|
794
|
+
* Returns an array of all pages in the survey.
|
|
795
|
+
*
|
|
796
|
+
* To get an array of only visible pages, use the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
|
|
797
|
+
* @see PageModel
|
|
798
|
+
*/
|
|
799
|
+
get pages(): Array<PageModel>;
|
|
800
|
+
renderCallback: () => void;
|
|
801
|
+
render(element?: any): void;
|
|
802
|
+
updateSurvey(newProps: any, oldProps?: any): void;
|
|
803
|
+
getCss(): any;
|
|
804
|
+
private cssValue;
|
|
805
|
+
private updateCompletedPageCss;
|
|
806
|
+
private updateCss;
|
|
807
|
+
/**
|
|
808
|
+
* Gets or sets an object in which keys are UI elements and values are CSS classes applied to them.
|
|
809
|
+
*
|
|
810
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
811
|
+
*/
|
|
812
|
+
get css(): any;
|
|
813
|
+
set css(value: any);
|
|
814
|
+
setCss(value: any, needMerge?: boolean): void;
|
|
815
|
+
get cssTitle(): string;
|
|
816
|
+
get cssNavigationComplete(): string;
|
|
817
|
+
get cssNavigationPreview(): string;
|
|
818
|
+
get cssNavigationEdit(): string;
|
|
819
|
+
get cssNavigationPrev(): string;
|
|
820
|
+
get cssNavigationStart(): string;
|
|
821
|
+
get cssNavigationNext(): string;
|
|
822
|
+
private get cssSurveyNavigationButton();
|
|
823
|
+
get bodyCss(): string;
|
|
824
|
+
get bodyContainerCss(): string;
|
|
825
|
+
completedCss: string;
|
|
826
|
+
completedBeforeCss: string;
|
|
827
|
+
loadingBodyCss: string;
|
|
828
|
+
containerCss: string;
|
|
829
|
+
fitToContainer: boolean;
|
|
830
|
+
/**
|
|
831
|
+
* @deprecated Use the [`headerView`](https://surveyjs.io/form-library/documentation/api-reference/itheme#headerView) property within a theme instead.
|
|
832
|
+
*/
|
|
833
|
+
headerView: "advanced" | "basic";
|
|
834
|
+
protected insertAdvancedHeader(advHeader: Cover): void;
|
|
835
|
+
/**
|
|
836
|
+
* Specifies whether the [Complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page) should display the [survey header](https://surveyjs.io/form-library/examples/brand-your-survey-header/).
|
|
837
|
+
*
|
|
838
|
+
* Possible values:
|
|
839
|
+
*
|
|
840
|
+
* - `true` - Displays the survey header on the Complete page.
|
|
841
|
+
* - `false` - Hides the header when users reach the Complete page.
|
|
842
|
+
* - `"auto"` (default) - Displays a header with the basic view, but hides a header with the advanced view (see the [`headerView`](https://surveyjs.io/form-library/documentation/api-reference/itheme#headerView) property description).
|
|
843
|
+
*
|
|
844
|
+
* > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
|
|
845
|
+
*/
|
|
846
|
+
showHeaderOnCompletePage: true | false | "auto";
|
|
847
|
+
private getNavigationCss;
|
|
848
|
+
private lazyRenderEnabledValue;
|
|
849
|
+
showBrandInfo: boolean;
|
|
850
|
+
enterKeyAction: "moveToNextEditor" | "loseFocus" | "default";
|
|
851
|
+
/**
|
|
852
|
+
* Specifies whether to enable lazy rendering.
|
|
853
|
+
*
|
|
854
|
+
* In default mode, a survey renders the entire current page. With lazy rendering, the survey renders the page gradually as a user scrolls it. This helps reduce survey startup time and optimizes large surveys for low-end devices.
|
|
855
|
+
*
|
|
856
|
+
* Default value: `false`
|
|
857
|
+
*
|
|
858
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-lazy/ (linkStyle))
|
|
859
|
+
* @see [settings.lazyRender](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender)
|
|
860
|
+
*/
|
|
861
|
+
get lazyRenderEnabled(): boolean;
|
|
862
|
+
set lazyRenderEnabled(val: boolean);
|
|
863
|
+
/**
|
|
864
|
+
* @deprecated Use the [`lazyRenderEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#lazyRenderEnabled) property instead.
|
|
865
|
+
*/
|
|
866
|
+
get lazyRendering(): boolean;
|
|
867
|
+
set lazyRendering(val: boolean);
|
|
868
|
+
get isLazyRendering(): boolean;
|
|
869
|
+
lazyRenderFirstBatchSizeValue: number;
|
|
870
|
+
get lazyRenderFirstBatchSize(): number;
|
|
871
|
+
set lazyRenderFirstBatchSize(val: number);
|
|
872
|
+
protected _isLazyRenderingSuspended: boolean;
|
|
873
|
+
get isLazyRenderingSuspended(): boolean;
|
|
874
|
+
protected suspendLazyRendering(): void;
|
|
875
|
+
protected releaseLazyRendering(): void;
|
|
876
|
+
private updateLazyRenderingRowsOnRemovingElements;
|
|
877
|
+
/**
|
|
878
|
+
* A list of triggers in the survey.
|
|
879
|
+
*
|
|
880
|
+
* [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
|
|
881
|
+
* @see runTriggers
|
|
882
|
+
* @see onTriggerExecuted
|
|
883
|
+
*/
|
|
884
|
+
get triggers(): Array<SurveyTrigger>;
|
|
885
|
+
set triggers(val: Array<SurveyTrigger>);
|
|
886
|
+
/**
|
|
887
|
+
* An array of [calculated values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
|
|
888
|
+
*/
|
|
889
|
+
get calculatedValues(): Array<CalculatedValue>;
|
|
890
|
+
set calculatedValues(val: Array<CalculatedValue>);
|
|
891
|
+
/**
|
|
892
|
+
* The identifier of a survey JSON schema to load from [SurveyJS Service](https://api.surveyjs.io).
|
|
893
|
+
*
|
|
894
|
+
* Refer to the following help topic for more information: [Store Survey Results in the SurveyJS Service](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-the-surveyjs-service).
|
|
895
|
+
* @see loadSurveyFromService
|
|
896
|
+
* @see onLoadedSurveyFromService
|
|
897
|
+
*/
|
|
898
|
+
get surveyId(): string;
|
|
899
|
+
set surveyId(val: string);
|
|
900
|
+
/**
|
|
901
|
+
* An identifier used to save survey results to [SurveyJS Service](https://api.surveyjs.io).
|
|
902
|
+
*
|
|
903
|
+
* Refer to the following help topic for more information: [Store Survey Results in the SurveyJS Service](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-the-surveyjs-service).
|
|
904
|
+
* @see onComplete
|
|
905
|
+
* @see surveyShowDataSaving
|
|
906
|
+
*/
|
|
907
|
+
get surveyPostId(): string;
|
|
908
|
+
set surveyPostId(val: string);
|
|
909
|
+
/**
|
|
910
|
+
* A user identifier (e-mail or other unique ID).
|
|
911
|
+
*
|
|
912
|
+
* If your application works with [SurveyJS Service](https://api.surveyjs.io), the ID ensures that users do not pass the same survey twice. On the second run, they will see the [Completed Before page](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedBeforeHtml).
|
|
913
|
+
* @see cookieName
|
|
914
|
+
*/
|
|
915
|
+
get clientId(): string;
|
|
916
|
+
set clientId(val: string);
|
|
917
|
+
/**
|
|
918
|
+
* A cookie name used to save information about survey completion.
|
|
919
|
+
*
|
|
920
|
+
* When this property has a value, the survey creates a cookie with the specified name on completion. This cookie helps ensure that users do not pass the same survey twice. On the second run, they will see the [Completed Before page](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedBeforeHtml).
|
|
921
|
+
* @see clientId
|
|
922
|
+
*/
|
|
923
|
+
get cookieName(): string;
|
|
924
|
+
set cookieName(val: string);
|
|
925
|
+
/**
|
|
926
|
+
* Specifies whether to save survey results when respondents switch between pages. Handle the [`onPartialSend`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onPartialSend) event to implement the save operation.
|
|
927
|
+
*
|
|
928
|
+
* Alternatively, you can handle the [`onCurrentPageChanged`](#onCurrentPageChanged) and [`onValueChanged`](#onValueChanged) events, as shown in the following demo: [Continue an Incomplete Survey](https://surveyjs.io/form-library/examples/survey-editprevious/).
|
|
929
|
+
*/
|
|
930
|
+
get partialSendEnabled(): boolean;
|
|
931
|
+
set partialSendEnabled(val: boolean);
|
|
932
|
+
/**
|
|
933
|
+
* @deprecated Use the [`partialSend`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#partialSend) property instead.
|
|
934
|
+
*/
|
|
935
|
+
get sendResultOnPageNext(): boolean;
|
|
936
|
+
set sendResultOnPageNext(val: boolean);
|
|
937
|
+
/**
|
|
938
|
+
* Specifies whether to show progress when the survey sends data to [SurveyJS Service](https://api.surveyjs.io).
|
|
939
|
+
*
|
|
940
|
+
* [View Demo](https://surveyjs.io/form-library/examples/save-survey-results-and-load-surveys-from-surveyjs-service/ (linkStyle))
|
|
941
|
+
* @see surveyPostId
|
|
942
|
+
*/
|
|
943
|
+
get surveyShowDataSaving(): boolean;
|
|
944
|
+
set surveyShowDataSaving(val: boolean);
|
|
945
|
+
/**
|
|
946
|
+
* Specifies whether to focus the first question on the page on survey startup or when users switch between pages.
|
|
947
|
+
*
|
|
948
|
+
* Default value: `false` in v1.9.114 and later, `true` in earlier versions
|
|
949
|
+
* @see autoFocusFirstError
|
|
950
|
+
* @see focusFirstQuestion
|
|
951
|
+
* @see focusQuestion
|
|
952
|
+
*/
|
|
953
|
+
get autoFocusFirstQuestion(): boolean;
|
|
954
|
+
set autoFocusFirstQuestion(val: boolean);
|
|
955
|
+
/**
|
|
956
|
+
* @deprecated Use the [`autoFocusFirstQuestion`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoFocusFirstQuestion) property instead.
|
|
957
|
+
*/
|
|
958
|
+
get focusFirstQuestionAutomatic(): boolean;
|
|
959
|
+
set focusFirstQuestionAutomatic(val: boolean);
|
|
960
|
+
/**
|
|
961
|
+
* Specifies whether to focus the first question with a validation error on the current page.
|
|
962
|
+
*
|
|
963
|
+
* Default value: `true`
|
|
964
|
+
* @see validate
|
|
965
|
+
* @see autoFocusFirstQuestion
|
|
966
|
+
*/
|
|
967
|
+
get autoFocusFirstError(): boolean;
|
|
968
|
+
set autoFocusFirstError(val: boolean);
|
|
969
|
+
/**
|
|
970
|
+
* @deprecated Use the [`autoFocusFirstError`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoFocusFirstError) property instead.
|
|
971
|
+
*/
|
|
972
|
+
get focusOnFirstError(): boolean;
|
|
973
|
+
set focusOnFirstError(val: boolean);
|
|
974
|
+
/**
|
|
975
|
+
* Gets or sets the visibility of the Start, Next, Previous, and Complete navigation buttons.
|
|
976
|
+
*
|
|
977
|
+
* Possible values:
|
|
978
|
+
*
|
|
979
|
+
* - `true` (default) - Displays the navigation buttons.
|
|
980
|
+
* - `false` - Hides the navigation buttons. This setting may be useful if you [implement custom external navigation](https://surveyjs.io/form-library/examples/external-form-navigation-system/).
|
|
981
|
+
* @see navigationButtonsLocation
|
|
982
|
+
* @see autoAdvanceEnabled
|
|
983
|
+
* @see showPrevButton
|
|
984
|
+
* @see showCompleteButton
|
|
985
|
+
*/
|
|
986
|
+
get showNavigationButtons(): boolean | any;
|
|
987
|
+
set showNavigationButtons(val: boolean | any);
|
|
988
|
+
/**
|
|
989
|
+
* Gets or sets the position of the Start, Next, Previous, and Complete navigation buttons. Applies only if the [`showNavigationButtons`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showNavigationButtons) property is `true`.
|
|
990
|
+
*
|
|
991
|
+
* Possible values:
|
|
992
|
+
*
|
|
993
|
+
* - `"bottom"` (default) - Displays the navigation buttons below survey content.
|
|
994
|
+
* - `"top"` - Displays the navigation buttons above survey content.
|
|
995
|
+
* - `"topBottom"` - Displays the navigation buttons above and below survey content.
|
|
996
|
+
* @see autoAdvanceEnabled
|
|
997
|
+
* @see showPrevButton
|
|
998
|
+
* @see showCompleteButton
|
|
999
|
+
*/
|
|
1000
|
+
get navigationButtonsLocation(): string | any;
|
|
1001
|
+
set navigationButtonsLocation(val: string | any);
|
|
1002
|
+
/**
|
|
1003
|
+
* Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
|
|
1004
|
+
* @see showNavigationButtons
|
|
1005
|
+
* @see showCompleteButton
|
|
1006
|
+
*/
|
|
1007
|
+
get showPrevButton(): boolean;
|
|
1008
|
+
set showPrevButton(val: boolean);
|
|
1009
|
+
/**
|
|
1010
|
+
* Specifies whether to display the Complete button. Set this property to `false` if respondents should not complete the survey.
|
|
1011
|
+
* @see showNavigationButtons
|
|
1012
|
+
* @see showPrevButton
|
|
1013
|
+
*/
|
|
1014
|
+
get showCompleteButton(): boolean;
|
|
1015
|
+
set showCompleteButton(val: boolean);
|
|
1016
|
+
/**
|
|
1017
|
+
* Gets or sets the visibility of the table of contents.
|
|
1018
|
+
*
|
|
1019
|
+
* Default value: `false`
|
|
1020
|
+
*
|
|
1021
|
+
* [View Demo](https://surveyjs.io/form-library/examples/toc-feature/ (linkStyle))
|
|
1022
|
+
* @see tocLocation
|
|
1023
|
+
*/
|
|
1024
|
+
get showTOC(): boolean;
|
|
1025
|
+
set showTOC(val: boolean);
|
|
1026
|
+
/**
|
|
1027
|
+
* Gets or sets the position of the table of contents. Applies only when the table of contents is visible.
|
|
1028
|
+
*
|
|
1029
|
+
* Possible values:
|
|
1030
|
+
*
|
|
1031
|
+
* - `"left"` (default)
|
|
1032
|
+
* - `"right"`
|
|
1033
|
+
*
|
|
1034
|
+
* [View Demo](https://surveyjs.io/form-library/examples/toc-feature/ (linkStyle))
|
|
1035
|
+
* @see showTOC
|
|
1036
|
+
*/
|
|
1037
|
+
get tocLocation(): "left" | "right";
|
|
1038
|
+
set tocLocation(val: "left" | "right");
|
|
1039
|
+
/**
|
|
1040
|
+
* Specifies whether to display the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
|
|
1041
|
+
*
|
|
1042
|
+
* [View Demo](https://surveyjs.io/form-library/examples/brand-your-survey-header/ (linkStyle))
|
|
1043
|
+
* @see title
|
|
1044
|
+
*/
|
|
1045
|
+
get showTitle(): boolean;
|
|
1046
|
+
set showTitle(val: boolean);
|
|
1047
|
+
/**
|
|
1048
|
+
* Specifies whether to display [page titles](https://surveyjs.io/form-library/documentation/api-reference/page-model#title).
|
|
1049
|
+
*/
|
|
1050
|
+
get showPageTitles(): boolean;
|
|
1051
|
+
set showPageTitles(val: boolean);
|
|
1052
|
+
/**
|
|
1053
|
+
* Specifies whether to show the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
|
1054
|
+
* @see onComplete
|
|
1055
|
+
* @see navigateToUrl
|
|
1056
|
+
*/
|
|
1057
|
+
get showCompletePage(): boolean;
|
|
1058
|
+
set showCompletePage(val: boolean);
|
|
1059
|
+
/**
|
|
1060
|
+
* @deprecated Use the [`showCompletePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showCompletePage) property instead.
|
|
1061
|
+
*/
|
|
1062
|
+
get showCompletedPage(): boolean;
|
|
1063
|
+
set showCompletedPage(val: boolean);
|
|
1064
|
+
/**
|
|
1065
|
+
* A URL to which respondents should be navigated after survey completion.
|
|
1066
|
+
* @see onNavigateToUrl
|
|
1067
|
+
* @see navigateToUrlOnCondition
|
|
1068
|
+
*/
|
|
1069
|
+
get navigateToUrl(): string;
|
|
1070
|
+
set navigateToUrl(val: string);
|
|
1071
|
+
/**
|
|
1072
|
+
* An array of objects that allows you to navigate respondents to different URLs after survey completion.
|
|
1073
|
+
*
|
|
1074
|
+
* Each object should include the [`expression`](https://surveyjs.io/form-library/documentation/api-reference/urlconditionitem#url) and [`url`](https://surveyjs.io/form-library/documentation/api-reference/urlconditionitem#expression) properties. When `expression` evaluates to `true`, the survey navigates to the corresponding `url`. Refer to the following help topic for more information about expressions: [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
|
|
1075
|
+
* @see onNavigateToUrl
|
|
1076
|
+
* @see navigateToUrl
|
|
1077
|
+
*/
|
|
1078
|
+
get navigateToUrlOnCondition(): Array<UrlConditionItem>;
|
|
1079
|
+
set navigateToUrlOnCondition(val: Array<UrlConditionItem>);
|
|
1080
|
+
getNavigateToUrl(): string;
|
|
1081
|
+
private navigateTo;
|
|
1082
|
+
/**
|
|
1083
|
+
* Specifies one or multiple characters that designate required questions.
|
|
1084
|
+
*
|
|
1085
|
+
* Default value: `*`
|
|
1086
|
+
*
|
|
1087
|
+
* [View Demo](https://surveyjs.io/form-library/examples/modify-question-title/ (linkStyle))
|
|
1088
|
+
*/
|
|
1089
|
+
get requiredMark(): string;
|
|
1090
|
+
set requiredMark(val: string);
|
|
1091
|
+
/**
|
|
1092
|
+
* @deprecated Use the [`requiredMark`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#requiredMark) property instead.
|
|
1093
|
+
*/
|
|
1094
|
+
get requiredText(): string;
|
|
1095
|
+
set requiredText(val: string);
|
|
1096
|
+
/**
|
|
1097
|
+
* Specifies whether to hide validation errors thrown by the Required validation in the UI.
|
|
1098
|
+
*
|
|
1099
|
+
* [Built-In Client-Side Validators](https://surveyjs.io/form-library/documentation/data-validation#built-in-client-side-validators (linkStyle))
|
|
1100
|
+
* @see validationEnabled
|
|
1101
|
+
* @see validationAllowSwitchPages
|
|
1102
|
+
*/
|
|
1103
|
+
hideRequiredErrors: boolean;
|
|
1104
|
+
private beforeSettingQuestionErrors;
|
|
1105
|
+
private makeRequiredErrorsInvisible;
|
|
1106
|
+
/**
|
|
1107
|
+
* Specifies the initial number or letter from which to start question numbering.
|
|
1108
|
+
*
|
|
1109
|
+
* [Question Numbers](https://surveyjs.io/form-library/documentation/design-survey/configure-question-titles#question-numbers (linkStyle))
|
|
1110
|
+
*/
|
|
1111
|
+
get questionStartIndex(): string;
|
|
1112
|
+
set questionStartIndex(val: string);
|
|
1113
|
+
/**
|
|
1114
|
+
* Specifies whether to store the "Other" option response in a separate property.
|
|
1115
|
+
*
|
|
1116
|
+
* Default value: `true`
|
|
1117
|
+
*
|
|
1118
|
+
* Respondents can leave comments when they select "Other" in choice-based questions, such as Dropdown or Checkboxes. Comment values are saved in a separate property. The property name is composed of the question `name` and [`commentSuffix`](#commentSuffix). However, you can use the question `name` as a key to store the comment value instead. Disable the `storeOthersAsComment` property in this case.
|
|
1119
|
+
* @see maxCommentLength
|
|
1120
|
+
*/
|
|
1121
|
+
get storeOthersAsComment(): boolean;
|
|
1122
|
+
set storeOthersAsComment(val: boolean);
|
|
1123
|
+
/**
|
|
1124
|
+
* Specifies the maximum text length in textual questions ([Single-Line Input](https://surveyjs.io/form-library/examples/text-entry-question/), [Long Text](https://surveyjs.io/form-library/examples/add-open-ended-question-to-a-form/), [Multiple Textboxes](https://surveyjs.io/form-library/examples/multiple-text-box-question/)), measured in characters.
|
|
1125
|
+
*
|
|
1126
|
+
* Default value: 0 (unlimited)
|
|
1127
|
+
*
|
|
1128
|
+
* You can override this setting for individual questions if you specify their [`maxLength`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maxLength) property.
|
|
1129
|
+
* @see maxCommentLength
|
|
1130
|
+
*/
|
|
1131
|
+
get maxTextLength(): number;
|
|
1132
|
+
set maxTextLength(val: number);
|
|
1133
|
+
/**
|
|
1134
|
+
* Specifies the maximum text length for question comments. Applies to questions with the [`showCommentArea`](https://surveyjs.io/form-library/documentation/api-reference/question#showCommentArea) or [`showOtherItem`](https://surveyjs.io/form-library/documentation/api-reference/question#showOtherItem) property set to `true`.
|
|
1135
|
+
*
|
|
1136
|
+
* Default value: 0 (unlimited)
|
|
1137
|
+
* @see maxTextLength
|
|
1138
|
+
*/
|
|
1139
|
+
get maxCommentLength(): number;
|
|
1140
|
+
set maxCommentLength(val: number);
|
|
1141
|
+
/**
|
|
1142
|
+
* @deprecated Use the [`maxCommentLength`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#maxCommentLength) property instead.
|
|
1143
|
+
*/
|
|
1144
|
+
get maxOthersLength(): number;
|
|
1145
|
+
set maxOthersLength(val: number);
|
|
1146
|
+
/**
|
|
1147
|
+
* Specifies whether the survey switches to the next page automatically after a user answers all questions on the current page.
|
|
1148
|
+
*
|
|
1149
|
+
* Default value: `false`
|
|
1150
|
+
*
|
|
1151
|
+
* If you enable this property, the survey is also completed automatically. Set the [`autoAdvanceAllowComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoAdvanceAllowComplete) property to `false` if you want to disable this behavior.
|
|
1152
|
+
*
|
|
1153
|
+
* > If any of the following questions is answered last, the survey does not switch to the next page: Checkboxes, Yes/No (Boolean) (rendered as Checkbox), Long Text, Signature, Image Picker (with Multi Select), File Upload, Single-Select Matrix (not all rows are answered), Dynamic Matrix, Dynamic Panel.
|
|
1154
|
+
*
|
|
1155
|
+
* [View Demo](https://surveyjs.io/form-library/examples/automatically-move-to-next-page-if-answer-selected/ (linkStyle))
|
|
1156
|
+
* @see [`settings.autoAdvanceDelay`](https://surveyjs.io/form-library/documentation/api-reference/settings#autoAdvanceDelay)
|
|
1157
|
+
*/
|
|
1158
|
+
get autoAdvanceEnabled(): boolean;
|
|
1159
|
+
set autoAdvanceEnabled(val: boolean);
|
|
1160
|
+
/**
|
|
1161
|
+
* @deprecated Use the [`autoAdvanceEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoAdvanceEnabled) property instead.
|
|
1162
|
+
*/
|
|
1163
|
+
get goNextPageAutomatic(): boolean;
|
|
1164
|
+
set goNextPageAutomatic(val: boolean);
|
|
1165
|
+
/**
|
|
1166
|
+
* Specifies whether to complete the survey automatically after a user answers all questions on the last page. Applies only if the [`autoAdvanceEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoAdvanceEnabled) property is `true`.
|
|
1167
|
+
*
|
|
1168
|
+
* Default value: `true`
|
|
1169
|
+
* @see [`settings.autoAdvanceDelay`](https://surveyjs.io/form-library/documentation/api-reference/settings#autoAdvanceDelay)
|
|
1170
|
+
*/
|
|
1171
|
+
get autoAdvanceAllowComplete(): boolean;
|
|
1172
|
+
set autoAdvanceAllowComplete(val: boolean);
|
|
1173
|
+
/**
|
|
1174
|
+
* @deprecated Use the [`autoAdvanceAllowComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoAdvanceAllowComplete) property instead.
|
|
1175
|
+
*/
|
|
1176
|
+
get allowCompleteSurveyAutomatic(): boolean;
|
|
1177
|
+
set allowCompleteSurveyAutomatic(val: boolean);
|
|
1178
|
+
/**
|
|
1179
|
+
* Specifies when the survey validates answers.
|
|
1180
|
+
*
|
|
1181
|
+
* Possible values:
|
|
1182
|
+
*
|
|
1183
|
+
* - `"onNextPage"` (default) - Triggers validation before the survey is switched to the next page or completed.
|
|
1184
|
+
* - `"onValueChanged"` - Triggers validation each time a question value is changed.
|
|
1185
|
+
* - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
|
|
1186
|
+
*
|
|
1187
|
+
* > In SurveyJS Form Library v1.12.5 and earlier, the `"onValueChanged"` mode doesn't work with date input fields because of the way browsers process date values. In most browsers, the value is considered changed as soon as a user starts entering the date in a text input field. This means that a user may only enter the day without having the chance to enter the month and year before validation is triggered. For this reason, date input fields are validated before the survey is switched to the next page or completed. Starting with v1.12.6, `"onValueChanged"` works for date input fields as well as for input fields of other types.
|
|
1188
|
+
*
|
|
1189
|
+
* Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
|
|
1190
|
+
* @see validationEnabled
|
|
1191
|
+
* @see validationAllowSwitchPages
|
|
1192
|
+
* @see validationAllowComplete
|
|
1193
|
+
* @see validate
|
|
1194
|
+
*/
|
|
1195
|
+
get checkErrorsMode(): string;
|
|
1196
|
+
set checkErrorsMode(val: string);
|
|
1197
|
+
/**
|
|
1198
|
+
* Specifies whether to trigger validation when a user focuses on an empty input field and then leaves it without making any changes. Applies only if [`checkErrorsMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#checkErrorsMode) is set to `"onValueChanged"`.
|
|
1199
|
+
*
|
|
1200
|
+
* Default value: `false`
|
|
1201
|
+
*
|
|
1202
|
+
* This property changes validation behavior for the following question types:
|
|
1203
|
+
*
|
|
1204
|
+
* - [Single-Line Input](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model)
|
|
1205
|
+
* - [Long Text](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model)
|
|
1206
|
+
* - [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model)
|
|
1207
|
+
* @see validationEnabled
|
|
1208
|
+
* @see validationAllowSwitchPages
|
|
1209
|
+
* @see validationAllowComplete
|
|
1210
|
+
* @see validate
|
|
1211
|
+
*/
|
|
1212
|
+
get validateVisitedEmptyFields(): boolean;
|
|
1213
|
+
set validateVisitedEmptyFields(val: boolean);
|
|
1214
|
+
getValidateVisitedEmptyFields(): boolean;
|
|
1215
|
+
/**
|
|
1216
|
+
* Specifies whether to increase the height of [Long Text](https://surveyjs.io/form-library/examples/add-open-ended-question-to-a-form/) questions and other text areas to accommodate multi-line text content.
|
|
1217
|
+
*
|
|
1218
|
+
* Default value: `false`
|
|
1219
|
+
*
|
|
1220
|
+
* You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
|
1221
|
+
* @see allowResizeComment
|
|
1222
|
+
* @see commentAreaRows
|
|
1223
|
+
*/
|
|
1224
|
+
get autoGrowComment(): boolean;
|
|
1225
|
+
set autoGrowComment(val: boolean);
|
|
1226
|
+
/**
|
|
1227
|
+
* Specifies whether to display a resize handle for [Long Text](https://surveyjs.io/form-library/examples/add-open-ended-question-to-a-form/) questions and other text areas intended for multi-line text content.
|
|
1228
|
+
*
|
|
1229
|
+
* Default value: `true`
|
|
1230
|
+
*
|
|
1231
|
+
* You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
|
|
1232
|
+
* @see autoGrowComment
|
|
1233
|
+
* @see commentAreaRows
|
|
1234
|
+
*/
|
|
1235
|
+
get allowResizeComment(): boolean;
|
|
1236
|
+
set allowResizeComment(val: boolean);
|
|
1237
|
+
/**
|
|
1238
|
+
* Specifies the visible height of comment areas, measured in lines. Applies to the questions with the [`showCommentArea`](https://surveyjs.io/form-library/documentation/api-reference/question#showCommentArea) or [`showOtherItem`](https://surveyjs.io/form-library/documentation/api-reference/question#showOtherItem) property enabled.
|
|
1239
|
+
*
|
|
1240
|
+
* Default value: 2
|
|
1241
|
+
*
|
|
1242
|
+
* The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
|
|
1243
|
+
* @see autoGrowComment
|
|
1244
|
+
* @see allowResizeComment
|
|
1245
|
+
*/
|
|
1246
|
+
get commentAreaRows(): number;
|
|
1247
|
+
set commentAreaRows(val: number);
|
|
1248
|
+
/**
|
|
1249
|
+
* Specifies when to update the question value in questions with a text input field.
|
|
1250
|
+
*
|
|
1251
|
+
* Possible values:
|
|
1252
|
+
*
|
|
1253
|
+
* - `"onBlur"` (default) - Updates the value after the input field loses focus.
|
|
1254
|
+
* - `"onTyping"` - Updates the value on every key press.
|
|
1255
|
+
*
|
|
1256
|
+
* > Do not use the `"onTyping"` mode if your survey contains many expressions. Expressions are reevaluated each time a question value is changed. In `"onTyping"` mode, the question value changes frequently. This may cause performance degradation.
|
|
1257
|
+
*
|
|
1258
|
+
* You can override this setting for individual questions: [`textUpdateMode`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#textUpdateMode).
|
|
1259
|
+
*/
|
|
1260
|
+
get textUpdateMode(): string;
|
|
1261
|
+
set textUpdateMode(val: string);
|
|
1262
|
+
/**
|
|
1263
|
+
* Specifies when to remove values of invisible questions from [survey results](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data).
|
|
1264
|
+
*
|
|
1265
|
+
* Possible values:
|
|
1266
|
+
*
|
|
1267
|
+
* - `"onComplete"` (default) - Clears invisible question values when the survey is complete.
|
|
1268
|
+
* - `"onHidden"` - Clears a question value when the question becomes invisible. If the question is invisible initially, its value is removed on survey completion.
|
|
1269
|
+
* - `"onHiddenContainer"` - Clears a question value when the question or its containter (page or panel) becomes invisible. If the question is invisible initially, its value is removed on survey completion.
|
|
1270
|
+
* - `"none"` - Keeps invisible values in survey results.
|
|
1271
|
+
* - `true` - Equivalent to `"onComplete"`.
|
|
1272
|
+
* - `false` - Equivalent to `"none"`.
|
|
1273
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
|
1274
|
+
* @see onComplete
|
|
1275
|
+
*/
|
|
1276
|
+
get clearInvisibleValues(): any;
|
|
1277
|
+
set clearInvisibleValues(val: any);
|
|
1278
|
+
/**
|
|
1279
|
+
* Removes values that cannot be assigned to a question, for example, choices unlisted in the `choices` array.
|
|
1280
|
+
*
|
|
1281
|
+
* Call this method after you assign new question values in code to ensure that they are acceptable.
|
|
1282
|
+
*
|
|
1283
|
+
* > This method does not remove values that fail validation. Call the [`validate()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validate) method to validate newly assigned values.
|
|
1284
|
+
* @param removeNonExistingRootKeys Pass `true` to remove values that do not correspond to any question or [calculated value](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#calculated-values).
|
|
1285
|
+
*/
|
|
1286
|
+
clearIncorrectValues(removeNonExistingRootKeys?: boolean): void;
|
|
1287
|
+
private iscorrectValueWithPostPrefix;
|
|
1288
|
+
/**
|
|
1289
|
+
* Specifies whether to keep values that cannot be assigned to questions, for example, choices unlisted in the `choices` array.
|
|
1290
|
+
*
|
|
1291
|
+
* > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
|
|
1292
|
+
* @see clearIncorrectValues
|
|
1293
|
+
*/
|
|
1294
|
+
get keepIncorrectValues(): boolean;
|
|
1295
|
+
set keepIncorrectValues(val: boolean);
|
|
1296
|
+
/**
|
|
1297
|
+
* Specifies the survey's locale.
|
|
1298
|
+
*
|
|
1299
|
+
* Default value: `""` (a default locale is used)
|
|
1300
|
+
*
|
|
1301
|
+
* [Localization & Globalization help topic](https://surveyjs.io/form-library/documentation/survey-localization (linkStyle))
|
|
1302
|
+
*
|
|
1303
|
+
* [Survey Localization demo](https://surveyjs.io/form-library/examples/survey-localization/ (linkStyle))
|
|
1304
|
+
*/
|
|
1305
|
+
get locale(): string;
|
|
1306
|
+
set locale(value: string);
|
|
1307
|
+
private onSurveyLocaleChanged;
|
|
1308
|
+
get localeDir(): string;
|
|
1309
|
+
/**
|
|
1310
|
+
* Returns an array of locales whose translations are used in the survey.
|
|
1311
|
+
*
|
|
1312
|
+
* [Localization & Globalization help topic](https://surveyjs.io/form-library/documentation/survey-localization (linkStyle))
|
|
1313
|
+
*
|
|
1314
|
+
* [Survey Localization demo](https://surveyjs.io/form-library/examples/survey-localization/ (linkStyle))
|
|
1315
|
+
*/
|
|
1316
|
+
getUsedLocales(): Array<string>;
|
|
1317
|
+
localeChanged(): void;
|
|
1318
|
+
getLocale(): string;
|
|
1319
|
+
locStrsChanged(): void;
|
|
1320
|
+
getMarkdownHtml(text: string, name: string): string;
|
|
1321
|
+
getRenderer(name: string): string;
|
|
1322
|
+
getRendererContext(locStr: LocalizableString): any;
|
|
1323
|
+
getRendererForString(element: Question | PanelModel | PageModel | SurveyModel, name: string): string;
|
|
1324
|
+
getRendererContextForString(element: Base, locStr: LocalizableString): any;
|
|
1325
|
+
getExpressionDisplayValue(question: Question, value: any, displayValue: string): string;
|
|
1326
|
+
private getBuiltInRendererForString;
|
|
1327
|
+
getProcessedText(text: string): string;
|
|
1328
|
+
getLocString(str: string): string;
|
|
1329
|
+
getErrorCustomText(text: string, error: SurveyError): string;
|
|
1330
|
+
getSurveyErrorCustomText(obj: PanelModel | Question | SurveyModel, text: string, error: SurveyError): string;
|
|
1331
|
+
getQuestionDisplayValue(question: Question, displayValue: any): any;
|
|
1332
|
+
/**
|
|
1333
|
+
* A message that is displayed when a survey does not contain visible pages or questions.
|
|
1334
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
|
1335
|
+
*/
|
|
1336
|
+
get emptySurveyText(): string;
|
|
1337
|
+
set emptySurveyText(val: string);
|
|
1338
|
+
/**
|
|
1339
|
+
* An image URL or a Base64-encoded image to use as a survey logo.
|
|
1340
|
+
*
|
|
1341
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
|
|
1342
|
+
* @see logoPosition
|
|
1343
|
+
* @see logoFit
|
|
1344
|
+
*/
|
|
1345
|
+
get logo(): string;
|
|
1346
|
+
set logo(value: string);
|
|
1347
|
+
get locLogo(): LocalizableString;
|
|
1348
|
+
/**
|
|
1349
|
+
* A logo width in CSS-accepted values.
|
|
1350
|
+
*
|
|
1351
|
+
* Default value: `auto` (the width is calculated automatically based on the [`logoHeight`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#logoHeight) value to keep the original aspect ratio)
|
|
1352
|
+
*
|
|
1353
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
|
|
1354
|
+
* @see logo
|
|
1355
|
+
* @see logoPosition
|
|
1356
|
+
* @see logoFit
|
|
1357
|
+
*/
|
|
1358
|
+
get logoWidth(): any;
|
|
1359
|
+
set logoWidth(value: any);
|
|
1360
|
+
get renderedLogoWidth(): number;
|
|
1361
|
+
get renderedStyleLogoWidth(): string;
|
|
1362
|
+
/**
|
|
1363
|
+
* A logo height in CSS-accepted values.
|
|
1364
|
+
*
|
|
1365
|
+
* Default value: `40px`
|
|
1366
|
+
*
|
|
1367
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
|
|
1368
|
+
* @see logoWidth
|
|
1369
|
+
* @see logo
|
|
1370
|
+
* @see logoPosition
|
|
1371
|
+
* @see logoFit
|
|
1372
|
+
*/
|
|
1373
|
+
get logoHeight(): any;
|
|
1374
|
+
set logoHeight(value: any);
|
|
1375
|
+
get renderedLogoHeight(): number;
|
|
1376
|
+
get renderedStyleLogoHeight(): string;
|
|
1377
|
+
/**
|
|
1378
|
+
* A logo position relative to the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
|
|
1379
|
+
*
|
|
1380
|
+
* Possible values:
|
|
1381
|
+
*
|
|
1382
|
+
* - `"left"` (default) - Places the logo to the left of the survey title.
|
|
1383
|
+
* - `"right"` - Places the logo to the right of the survey title.
|
|
1384
|
+
* - `"none"` - Hides the logo.
|
|
1385
|
+
*
|
|
1386
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
|
|
1387
|
+
* @see logo
|
|
1388
|
+
* @see logoFit
|
|
1389
|
+
*/
|
|
1390
|
+
get logoPosition(): string;
|
|
1391
|
+
set logoPosition(value: string);
|
|
1392
|
+
get hasLogo(): boolean;
|
|
1393
|
+
private updateHasLogo;
|
|
1394
|
+
get isLogoBefore(): boolean;
|
|
1395
|
+
get isLogoAfter(): boolean;
|
|
1396
|
+
get logoClassNames(): string;
|
|
1397
|
+
private titleIsEmpty;
|
|
1398
|
+
get renderedHasTitle(): boolean;
|
|
1399
|
+
get renderedHasDescription(): boolean;
|
|
1400
|
+
get hasTitle(): boolean;
|
|
1401
|
+
get renderedHasLogo(): boolean;
|
|
1402
|
+
get renderedHasHeader(): boolean;
|
|
1403
|
+
/**
|
|
1404
|
+
* Specifies how to resize a logo to fit it into its container.
|
|
1405
|
+
*
|
|
1406
|
+
* Possible values:
|
|
1407
|
+
*
|
|
1408
|
+
* - `"contain"` (default)
|
|
1409
|
+
* - `"cover"`
|
|
1410
|
+
* - `"fill"`
|
|
1411
|
+
* - `"none"`
|
|
1412
|
+
*
|
|
1413
|
+
* Refer to the [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property description for information on the possible values.
|
|
1414
|
+
*
|
|
1415
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
|
|
1416
|
+
* @see logo
|
|
1417
|
+
* @see logoPosition
|
|
1418
|
+
*/
|
|
1419
|
+
get logoFit(): string;
|
|
1420
|
+
set logoFit(val: string);
|
|
1421
|
+
private cssVariables;
|
|
1422
|
+
get themeVariables(): {
|
|
1423
|
+
[index: string]: string;
|
|
1424
|
+
};
|
|
1425
|
+
_isMobile: boolean;
|
|
1426
|
+
setIsMobile(newVal?: boolean): void;
|
|
1427
|
+
get isMobile(): boolean;
|
|
1428
|
+
private _isCompact;
|
|
1429
|
+
set isCompact(newVal: boolean);
|
|
1430
|
+
get isCompact(): boolean;
|
|
1431
|
+
protected isLogoImageChoosen(): string;
|
|
1432
|
+
get titleMaxWidth(): string;
|
|
1433
|
+
/**
|
|
1434
|
+
* An image to display in the background of the survey or form. Accepts a base64 or URL string value.
|
|
1435
|
+
* @see backgroundOpacity
|
|
1436
|
+
*/
|
|
1437
|
+
backgroundImage: string;
|
|
1438
|
+
renderBackgroundImage: string;
|
|
1439
|
+
private updateRenderBackgroundImage;
|
|
1440
|
+
backgroundImageFit: ImageFit;
|
|
1441
|
+
backgroundImageAttachment: ImageAttachment;
|
|
1442
|
+
/**
|
|
1443
|
+
* A value from 0 to 1 that specifies how transparent the [background image](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#backgroundImage) should be: 0 makes the image completely transparent, and 1 makes it opaque.
|
|
1444
|
+
*/
|
|
1445
|
+
get backgroundOpacity(): number;
|
|
1446
|
+
set backgroundOpacity(val: number);
|
|
1447
|
+
backgroundImageStyle: any;
|
|
1448
|
+
updateBackgroundImageStyle(): void;
|
|
1449
|
+
wrapperFormCss: string;
|
|
1450
|
+
updateWrapperFormCss(): void;
|
|
1451
|
+
/**
|
|
1452
|
+
* HTML content displayed on the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
|
1453
|
+
*
|
|
1454
|
+
* [View Demo](https://surveyjs.io/form-library/examples/modify-survey-navigation-settings/ (linkStyle))
|
|
1455
|
+
* @see showCompletePage
|
|
1456
|
+
* @see completedHtmlOnCondition
|
|
1457
|
+
*/
|
|
1458
|
+
get completedHtml(): string;
|
|
1459
|
+
set completedHtml(value: string);
|
|
1460
|
+
get locCompletedHtml(): LocalizableString;
|
|
1461
|
+
/**
|
|
1462
|
+
* An array of objects that allows you to specify different HTML content for the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
|
1463
|
+
*
|
|
1464
|
+
* Each object should include the [`expression`](https://surveyjs.io/form-library/documentation/api-reference/htmlconditionitem#expression) and [`html`](https://surveyjs.io/form-library/documentation/api-reference/htmlconditionitem#html) properties. When `expression` evaluates to `true`, the survey uses the corresponding HTML markup instead of [`completedHtml`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedHtml). Refer to the following help topic for more information about expressions: [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
|
|
1465
|
+
*
|
|
1466
|
+
* [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
|
|
1467
|
+
*/
|
|
1468
|
+
get completedHtmlOnCondition(): Array<HtmlConditionItem>;
|
|
1469
|
+
set completedHtmlOnCondition(val: Array<HtmlConditionItem>);
|
|
1470
|
+
/**
|
|
1471
|
+
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns a result value.
|
|
1472
|
+
* @param expression An expression to calculate.
|
|
1473
|
+
* @param callback A callback function that you can use to access the calculation result if the expression uses asynchronous functions.
|
|
1474
|
+
*/
|
|
1475
|
+
runExpression(expression: string, callback?: (res: any) => void): any;
|
|
1476
|
+
private setValueOnExpressionCounter;
|
|
1477
|
+
get isSettingValueOnExpression(): boolean;
|
|
1478
|
+
startSetValueOnExpression(): void;
|
|
1479
|
+
finishSetValueOnExpression(): void;
|
|
1480
|
+
/**
|
|
1481
|
+
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
|
|
1482
|
+
* @param expression An expression to calculate.
|
|
1483
|
+
*/
|
|
1484
|
+
runCondition(expression: string): boolean;
|
|
1485
|
+
/**
|
|
1486
|
+
* Executes [all triggers](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#triggers), except ["complete"](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
|
|
1487
|
+
*
|
|
1488
|
+
* [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
|
|
1489
|
+
* @see onTriggerExecuted
|
|
1490
|
+
*/
|
|
1491
|
+
runTriggers(): void;
|
|
1492
|
+
get renderedCompletedHtml(): string;
|
|
1493
|
+
private getExpressionItemOnRunCondition;
|
|
1494
|
+
/**
|
|
1495
|
+
* HTML content displayed to a user who has completed the survey before. To identify such users, the survey uses a [cookie name](#cookieName) or [client ID](#clientId).
|
|
1496
|
+
* @see processedCompletedBeforeHtml
|
|
1497
|
+
*/
|
|
1498
|
+
get completedBeforeHtml(): string;
|
|
1499
|
+
set completedBeforeHtml(value: string);
|
|
1500
|
+
get locCompletedBeforeHtml(): LocalizableString;
|
|
1501
|
+
/**
|
|
1502
|
+
* HTML content displayed while a survey JSON schema is being loaded from [SurveyJS Service](https://api.surveyjs.io).
|
|
1503
|
+
* @see surveyId
|
|
1504
|
+
* @see processedLoadingHtml
|
|
1505
|
+
*/
|
|
1506
|
+
get loadingHtml(): string;
|
|
1507
|
+
set loadingHtml(value: string);
|
|
1508
|
+
get locLoadingHtml(): LocalizableString;
|
|
1509
|
+
get defaultLoadingHtml(): string;
|
|
1510
|
+
get navigationBar(): ActionContainer;
|
|
1511
|
+
/**
|
|
1512
|
+
* Adds a custom navigation item similar to the Previous Page, Next Page, and Complete buttons.
|
|
1513
|
+
* Accepts an object described in the [IAction](https://surveyjs.io/Documentation/Library?id=IAction) help section.
|
|
1514
|
+
*
|
|
1515
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-changenavigation/ (linkStyle))
|
|
1516
|
+
*/
|
|
1517
|
+
addNavigationItem(val: IAction): Action;
|
|
1518
|
+
/**
|
|
1519
|
+
* Gets or sets a caption for the Start button.
|
|
1520
|
+
* @see firstPageIsStartPage
|
|
1521
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
|
1522
|
+
*/
|
|
1523
|
+
get startSurveyText(): string;
|
|
1524
|
+
set startSurveyText(newValue: string);
|
|
1525
|
+
get locStartSurveyText(): LocalizableString;
|
|
1526
|
+
/**
|
|
1527
|
+
* Gets or sets a caption for the Previous button.
|
|
1528
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
|
1529
|
+
*/
|
|
1530
|
+
get pagePrevText(): string;
|
|
1531
|
+
set pagePrevText(newValue: string);
|
|
1532
|
+
get locPagePrevText(): LocalizableString;
|
|
1533
|
+
/**
|
|
1534
|
+
* Gets or sets a caption for the Next button.
|
|
1535
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
|
1536
|
+
*/
|
|
1537
|
+
get pageNextText(): string;
|
|
1538
|
+
set pageNextText(newValue: string);
|
|
1539
|
+
get locPageNextText(): LocalizableString;
|
|
1540
|
+
/**
|
|
1541
|
+
* Gets or sets a caption for the Complete button.
|
|
1542
|
+
* @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
|
|
1543
|
+
*/
|
|
1544
|
+
get completeText(): string;
|
|
1545
|
+
set completeText(newValue: string);
|
|
1546
|
+
get locCompleteText(): LocalizableString;
|
|
1547
|
+
/**
|
|
1548
|
+
* Gets or sets a caption for the Preview button.
|
|
1549
|
+
* @see showPreviewBeforeComplete
|
|
1550
|
+
* @see showPreview
|
|
1551
|
+
* @see editText
|
|
1552
|
+
*/
|
|
1553
|
+
get previewText(): string;
|
|
1554
|
+
set previewText(newValue: string);
|
|
1555
|
+
get locPreviewText(): LocalizableString;
|
|
1556
|
+
/**
|
|
1557
|
+
* Gets or sets a caption for the Edit button displayed when the survey shows a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
|
1558
|
+
* @see showPreviewBeforeComplete
|
|
1559
|
+
* @see cancelPreview
|
|
1560
|
+
* @see previewText
|
|
1561
|
+
*/
|
|
1562
|
+
get editText(): string;
|
|
1563
|
+
set editText(newValue: string);
|
|
1564
|
+
get locEditText(): LocalizableString;
|
|
1565
|
+
getElementTitleTagName(element: Base, tagName: string): string;
|
|
1566
|
+
/**
|
|
1567
|
+
* Specifies a pattern for question titles.
|
|
1568
|
+
*
|
|
1569
|
+
* Refer to the following help topic for more information: [Title Pattern](https://surveyjs.io/form-library/documentation/design-survey/configure-question-titles#title-pattern).
|
|
1570
|
+
*/
|
|
1571
|
+
get questionTitlePattern(): string;
|
|
1572
|
+
set questionTitlePattern(val: string);
|
|
1573
|
+
getQuestionTitlePatternOptions(): Array<any>;
|
|
1574
|
+
get questionTitleTemplate(): string;
|
|
1575
|
+
set questionTitleTemplate(value: string);
|
|
1576
|
+
private getNewTitlePattern;
|
|
1577
|
+
private getNewQuestionTitleElement;
|
|
1578
|
+
get locQuestionTitleTemplate(): LocalizableString;
|
|
1579
|
+
getUpdatedQuestionTitle(question: Question, title: string): string;
|
|
1580
|
+
getUpdatedQuestionNo(question: Question, no: string): string;
|
|
1581
|
+
getUpdatedPanelNo(panel: PanelModel, no: string): string;
|
|
1582
|
+
getUpdatedPageNo(page: PageModel, no: string): string;
|
|
1583
|
+
/**
|
|
1584
|
+
* Specifies whether page titles contain page numbers.
|
|
1585
|
+
*
|
|
1586
|
+
* [View Demo](https://surveyjs.io/form-library/examples/how-to-number-pages-and-questions/ (linkStyle))
|
|
1587
|
+
* @see onGetPageNumber
|
|
1588
|
+
*/
|
|
1589
|
+
get showPageNumbers(): boolean;
|
|
1590
|
+
set showPageNumbers(value: boolean);
|
|
1591
|
+
/**
|
|
1592
|
+
* Specifies whether to display question numbers and how to calculate them.
|
|
1593
|
+
*
|
|
1594
|
+
* Possible values:
|
|
1595
|
+
*
|
|
1596
|
+
* - `true` or `"on"` - Displays question numbers.
|
|
1597
|
+
* - `"onpage"` - Displays question numbers and starts numbering on each page from scratch.
|
|
1598
|
+
* - `false` or `"off"` - Hides question numbers.
|
|
1599
|
+
*
|
|
1600
|
+
* [View Demo](https://surveyjs.io/form-library/examples/how-to-number-pages-and-questions/ (linkStyle))
|
|
1601
|
+
*
|
|
1602
|
+
* If you want to hide the number of an individual question, disable its [`showNumber`](https://surveyjs.io/form-library/documentation/api-reference/question#showNumber) property.
|
|
1603
|
+
* @see onGetQuestionNumber
|
|
1604
|
+
*/
|
|
1605
|
+
get showQuestionNumbers(): string | boolean;
|
|
1606
|
+
set showQuestionNumbers(value: string | boolean);
|
|
1607
|
+
private progressBarValue;
|
|
1608
|
+
get progressBar(): any;
|
|
1609
|
+
/**
|
|
1610
|
+
* Specifies the visibility of the progress bar.
|
|
1611
|
+
*
|
|
1612
|
+
* Default value: `false`
|
|
1613
|
+
*
|
|
1614
|
+
* [View Demo](https://surveyjs.io/form-library/examples/navigation-default/ (linkStyle))
|
|
1615
|
+
* @see progressBarLocation
|
|
1616
|
+
* @see progressBarType
|
|
1617
|
+
* @see progressValue
|
|
1618
|
+
*/
|
|
1619
|
+
get showProgressBar(): boolean;
|
|
1620
|
+
set showProgressBar(newValue: boolean | string);
|
|
1621
|
+
protected setShowProgressBar(newValue: boolean | string): void;
|
|
1622
|
+
/**
|
|
1623
|
+
* Specifies the alignment of the progress bar. Applies only if the [`showProgressBar`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar) property is `true`.
|
|
1624
|
+
*
|
|
1625
|
+
* Possible values:
|
|
1626
|
+
*
|
|
1627
|
+
* - `"aboveHeader"` - Displays the progress bar above the survey header.
|
|
1628
|
+
* - `"belowHeader"` - Displays the progress bar below the survey header.
|
|
1629
|
+
* - `"bottom"` - Displays the progress bar below survey content.
|
|
1630
|
+
* - `"topBottom"` - Displays the progress bar above and below survey content.
|
|
1631
|
+
* - `"auto"` (default) - Displays the progress bar below the survey header if the header has a [background image](https://surveyjs.io/form-library/documentation/api-reference/iheader#backgroundImage) or color. Otherwise, the progress bar is displayed above the header.
|
|
1632
|
+
*
|
|
1633
|
+
* [View Demo](https://surveyjs.io/form-library/examples/navigation-default/ (linkStyle))
|
|
1634
|
+
* @see showProgressBar
|
|
1635
|
+
* @see progressBarType
|
|
1636
|
+
* @see progressValue
|
|
1637
|
+
*/
|
|
1638
|
+
get progressBarLocation(): string;
|
|
1639
|
+
set progressBarLocation(newValue: string);
|
|
1640
|
+
/**
|
|
1641
|
+
* Specifies the type of information displayed by the progress bar. Applies only when [`showProgressBar`](#showProgressBar) is `true`.
|
|
1642
|
+
*
|
|
1643
|
+
* Possible values:
|
|
1644
|
+
*
|
|
1645
|
+
* - `"pages"` (default) - The number of completed pages.
|
|
1646
|
+
* - `"questions"` - The number of answered questions.
|
|
1647
|
+
* - `"requiredQuestions"` - The number of answered [required questions](https://surveyjs.io/form-library/documentation/api-reference/question#isRequired).
|
|
1648
|
+
* - `"correctQuestions"` - The number of correct questions in a [quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
1649
|
+
* - `"buttons"` - *(Obsolete)* Use the `"pages"` property value with the [`progressBarShowPageTitles`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#progressBarShowPageTitles) property set to `true` instead.
|
|
1650
|
+
*
|
|
1651
|
+
* > When `progressBarType` is set to `"pages"`, you can also enable the [`progressBarShowPageNumbers`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#progressBarShowPageNumbers) and [`progressBarShowPageTitles`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#progressBarShowPageTitles) properties if you want to display page numbers and titles in the progress bar.
|
|
1652
|
+
*
|
|
1653
|
+
* [View Demo](https://surveyjs.io/form-library/examples/navigation-buttons/ (linkStyle))
|
|
1654
|
+
* @see progressValue
|
|
1655
|
+
*/
|
|
1656
|
+
get progressBarType(): string;
|
|
1657
|
+
set progressBarType(newValue: string);
|
|
1658
|
+
private get progressBarComponentName();
|
|
1659
|
+
/**
|
|
1660
|
+
* Specifies whether the progress bar displays page titles. Applies only when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar) and [`progressBarType`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#progressBarType) is `"pages"`.
|
|
1661
|
+
*
|
|
1662
|
+
* Default value: `false`
|
|
1663
|
+
* @see progressBarShowPageNumbers
|
|
1664
|
+
* @see progressBarInheritWidthFrom
|
|
1665
|
+
*/
|
|
1666
|
+
progressBarShowPageTitles: boolean;
|
|
1667
|
+
/**
|
|
1668
|
+
* Specifies whether the progress bar displays page numbers. Applies only when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar) and [`progressBarType`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#progressBarType) is `"pages"`.
|
|
1669
|
+
*
|
|
1670
|
+
* Default value: `false`
|
|
1671
|
+
* @see progressBarShowPageTitles
|
|
1672
|
+
* @see progressBarInheritWidthFrom
|
|
1673
|
+
*/
|
|
1674
|
+
progressBarShowPageNumbers: boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* Specifies whether the progress bar spans the width of the survey or that of the survey container. Applies only when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar) and [`progressBarType`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#progressBarType) is `"pages"`.
|
|
1677
|
+
*
|
|
1678
|
+
* Possible values:
|
|
1679
|
+
*
|
|
1680
|
+
* - `"survey"`\
|
|
1681
|
+
* The progress bar width is the same as the survey width.
|
|
1682
|
+
* - `"container"` (default)\
|
|
1683
|
+
* The progress bar width is the same as the survey container width.
|
|
1684
|
+
* @see progressBarShowPageTitles
|
|
1685
|
+
* @see progressBarShowPageNumbers
|
|
1686
|
+
*/
|
|
1687
|
+
progressBarInheritWidthFrom: "survey" | "container";
|
|
1688
|
+
get isShowProgressBarOnTop(): boolean;
|
|
1689
|
+
get isShowProgressBarOnBottom(): boolean;
|
|
1690
|
+
getProgressTypeComponent(): string;
|
|
1691
|
+
getProgressCssClasses(container?: string): string;
|
|
1692
|
+
private canShowProgressBar;
|
|
1693
|
+
get processedTitle(): string;
|
|
1694
|
+
/**
|
|
1695
|
+
* Gets or sets question title location relative to the input field: `"top"`, `"bottom"`, or `"left"`.
|
|
1696
|
+
*
|
|
1697
|
+
* > Certain question types (Matrix, Multiple Text) do not support the `"left"` value. For them, the `"top"` value is used.
|
|
1698
|
+
*
|
|
1699
|
+
* You can override this setting if you specify the `questionTitleLocation` property for an [individual page](https://surveyjs.io/form-library/documentation/pagemodel#questionTitleLocation) or [panel](https://surveyjs.io/form-library/documentation/panelmodel#questionTitleLocation) or set the `titleLocation` property for a [specific question](https://surveyjs.io/form-library/documentation/question#titleLocation).
|
|
1700
|
+
*/
|
|
1701
|
+
get questionTitleLocation(): string;
|
|
1702
|
+
set questionTitleLocation(value: string);
|
|
1703
|
+
updateElementCss(reNew?: boolean): void;
|
|
1704
|
+
/**
|
|
1705
|
+
* Specifies the error message position.
|
|
1706
|
+
*
|
|
1707
|
+
* Possible values:
|
|
1708
|
+
*
|
|
1709
|
+
* - `"top"` (default) - Displays error messages above questions.
|
|
1710
|
+
* - `"bottom"` - Displays error messages below questions.
|
|
1711
|
+
*
|
|
1712
|
+
* You can override this setting if you specify the `questionErrorLocation` property for an [individual page](https://surveyjs.io/form-library/documentation/pagemodel#questionErrorLocation) or [panel](https://surveyjs.io/form-library/documentation/panelmodel#questionErrorLocation) or set the `errorLocation` property for a [specific question](https://surveyjs.io/form-library/documentation/question#errorLocation).
|
|
1713
|
+
*/
|
|
1714
|
+
get questionErrorLocation(): string;
|
|
1715
|
+
set questionErrorLocation(value: string);
|
|
1716
|
+
/**
|
|
1717
|
+
* Specifies where to display question descriptions.
|
|
1718
|
+
*
|
|
1719
|
+
* Possible values:
|
|
1720
|
+
*
|
|
1721
|
+
* - `"underTitle"` (default) - Displays descriptions under question titles.
|
|
1722
|
+
* - `"underInput"` - Displays descriptions under the interactive area.
|
|
1723
|
+
*
|
|
1724
|
+
* You can override this setting for individual questions if you specify their [`descriptionLocation`](https://surveyjs.io/form-library/documentation/api-reference/question#descriptionLocation) property.
|
|
1725
|
+
*
|
|
1726
|
+
*/
|
|
1727
|
+
get questionDescriptionLocation(): string;
|
|
1728
|
+
set questionDescriptionLocation(value: string);
|
|
1729
|
+
/**
|
|
1730
|
+
* @deprecated Use the [`readOnly`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#readOnly) property.
|
|
1731
|
+
*/
|
|
1732
|
+
get mode(): string;
|
|
1733
|
+
set mode(value: string);
|
|
1734
|
+
/**
|
|
1735
|
+
* Enables the read-only mode. If you set this property to `true`, users cannot take the survey.
|
|
1736
|
+
*
|
|
1737
|
+
* Default value: `false`
|
|
1738
|
+
*
|
|
1739
|
+
* [View Demo](https://surveyjs.io/form-library/examples/prevent-form-editing-with-read-only-mode/ (linkStyle))
|
|
1740
|
+
*/
|
|
1741
|
+
get readOnly(): boolean;
|
|
1742
|
+
set readOnly(val: boolean);
|
|
1743
|
+
private onReadOnlyChanged;
|
|
1744
|
+
/**
|
|
1745
|
+
* Gets or sets an object with survey results. You can set this property with an object of the following structure:
|
|
1746
|
+
*
|
|
1747
|
+
* ```js
|
|
1748
|
+
* {
|
|
1749
|
+
* question1Name: question1Value,
|
|
1750
|
+
* question2Name: question2Value,
|
|
1751
|
+
* // ...
|
|
1752
|
+
* }
|
|
1753
|
+
* ```
|
|
1754
|
+
*
|
|
1755
|
+
* When you set this property in code, the new object overrides the old object that may contain default question values and entered data. If you want to *merge* the new and old objects, call the [`mergeData(newDataObj)`](https://surveyjs.io/form-library/documentation/surveymodel#mergeData) method.
|
|
1756
|
+
*
|
|
1757
|
+
* If you assign a new object while a respondent takes the survey, set the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property to 0 to start the survey from the beginning. This will also cause the survey to re-evaluate the [`visibleIf`](https://surveyjs.io/form-library/documentation/api-reference/question#visibleIf), [`enableIf`](https://surveyjs.io/form-library/documentation/api-reference/question#enableIf), and other [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
|
|
1758
|
+
* @see setValue
|
|
1759
|
+
* @see getValue
|
|
1760
|
+
*/
|
|
1761
|
+
get data(): any;
|
|
1762
|
+
set data(data: any);
|
|
1763
|
+
/**
|
|
1764
|
+
* Merges a specified data object with the object from the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property.
|
|
1765
|
+
*
|
|
1766
|
+
* Refer to the following help topic for more information: [Populate Form Fields | Multiple Question Values](https://surveyjs.io/form-library/documentation/design-survey/pre-populate-form-fields#multiple-question-values).
|
|
1767
|
+
*
|
|
1768
|
+
* @param data A data object to merge. It should have the following structure: `{ questionName: questionValue, ... }`
|
|
1769
|
+
* @see setValue
|
|
1770
|
+
*/
|
|
1771
|
+
mergeData(data: any): void;
|
|
1772
|
+
setDataCore(data: any, clearData?: boolean): void;
|
|
1773
|
+
get isSurvey(): boolean;
|
|
1774
|
+
/**
|
|
1775
|
+
* Returns an object with survey results.
|
|
1776
|
+
*
|
|
1777
|
+
* If you want to get a survey results object that mirrors the survey structure, call the `getData()` method with an object that has the `includePages` and `includePanels` properties enabled. Without this object, the `getData()` method returns the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property value.
|
|
1778
|
+
*
|
|
1779
|
+
* ```js
|
|
1780
|
+
* import { Model } from "survey-core";
|
|
1781
|
+
*
|
|
1782
|
+
* const surveyJson = { ... };
|
|
1783
|
+
* const survey = new Model(surveyJson);
|
|
1784
|
+
* survey.getData({ includePages: true, includePanels: true });
|
|
1785
|
+
* ```
|
|
1786
|
+
*/
|
|
1787
|
+
getData(options?: {
|
|
1788
|
+
includePages?: boolean;
|
|
1789
|
+
includePanels?: boolean;
|
|
1790
|
+
}): any;
|
|
1791
|
+
getStructuredData(includePages?: boolean, level?: number): any;
|
|
1792
|
+
setStructuredData(data: any, doMerge?: boolean): void;
|
|
1793
|
+
private collectDataFromPanel;
|
|
1794
|
+
private onEditingObjPropertyChanged;
|
|
1795
|
+
get editingObj(): Base;
|
|
1796
|
+
set editingObj(val: Base);
|
|
1797
|
+
private unConnectEditingObj;
|
|
1798
|
+
get isEditingSurveyElement(): boolean;
|
|
1799
|
+
private setCalculatedValuesIntoResult;
|
|
1800
|
+
getAllValues(): any;
|
|
1801
|
+
/**
|
|
1802
|
+
* Returns survey results as an array of objects in which the question name, title, value, and other parameters are stored as individual properties.
|
|
1803
|
+
*
|
|
1804
|
+
* If a question can have more than one value (Matrix, Multiple Text), its object enables the `isNode` flag and stores information about these values in the `data` property. Refer to the following help topic for more information: [Access Full Survey Results](https://surveyjs.io/form-library/documentation/handle-survey-results-access#access-full-survey-results).
|
|
1805
|
+
*
|
|
1806
|
+
* If you want to skip empty answers, pass an object with the `includeEmpty` property set to `false`.
|
|
1807
|
+
*/
|
|
1808
|
+
getPlainData(options?: IPlainDataOptions): Array<IQuestionPlainData>;
|
|
1809
|
+
getFilteredValues(): any;
|
|
1810
|
+
private addCalculatedValuesIntoFilteredValues;
|
|
1811
|
+
getFilteredProperties(): any;
|
|
1812
|
+
private getValuesKeys;
|
|
1813
|
+
getDataValueCore(valuesHash: any, key: string): any;
|
|
1814
|
+
setDataValueCore(valuesHash: any, key: string, value: any): void;
|
|
1815
|
+
deleteDataValueCore(valuesHash: any, key: string): void;
|
|
1816
|
+
valueHashGetDataCallback: (valuesHash: any, key: string) => any;
|
|
1817
|
+
valueHashSetDataCallback: (valuesHash: any, key: string, value: any) => void;
|
|
1818
|
+
valueHashDeleteDataCallback: (valuesHash: any, key: string) => void;
|
|
1819
|
+
private getDataFromValueHash;
|
|
1820
|
+
private setDataToValueHash;
|
|
1821
|
+
private deleteDataFromValueHash;
|
|
1822
|
+
/**
|
|
1823
|
+
* An object with all comment values.
|
|
1824
|
+
* @see Question.showCommentArea
|
|
1825
|
+
* @see storeOthersAsComment
|
|
1826
|
+
*/
|
|
1827
|
+
get comments(): any;
|
|
1828
|
+
/**
|
|
1829
|
+
* Returns an array of visible pages without the start page.
|
|
1830
|
+
*
|
|
1831
|
+
* To get an array of all pages, use the [`pages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pages) property. If all pages are visible, the `pages` and `visiblePages` arrays are identical.
|
|
1832
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
|
1833
|
+
*/
|
|
1834
|
+
get visiblePages(): Array<PageModel>;
|
|
1835
|
+
private isPageInVisibleList;
|
|
1836
|
+
/**
|
|
1837
|
+
* Returns `true` if the survey contains zero pages.
|
|
1838
|
+
* @see emptySurveyText
|
|
1839
|
+
*/
|
|
1840
|
+
get isEmpty(): boolean;
|
|
1841
|
+
get PageCount(): number;
|
|
1842
|
+
/**
|
|
1843
|
+
* Returns a total number of survey pages.
|
|
1844
|
+
*
|
|
1845
|
+
* To get the number of visible pages, use the [`visiblePageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePageCount) property.
|
|
1846
|
+
* @see pages
|
|
1847
|
+
*/
|
|
1848
|
+
get pageCount(): number;
|
|
1849
|
+
/**
|
|
1850
|
+
* Returns the number of visible survey pages.
|
|
1851
|
+
*
|
|
1852
|
+
* To get a total number of survey pages, use the [`pageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pageCount) property.
|
|
1853
|
+
* @see visiblePages
|
|
1854
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
|
1855
|
+
*/
|
|
1856
|
+
get visiblePageCount(): number;
|
|
1857
|
+
/**
|
|
1858
|
+
* Returns the start page. Applies only if the [`firstPageIsStartPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#firstPageIsStartPage) property is set to `true`.
|
|
1859
|
+
*
|
|
1860
|
+
* Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
|
1861
|
+
* @see firstPageIsStartPage
|
|
1862
|
+
* @see activePage
|
|
1863
|
+
*/
|
|
1864
|
+
get startPage(): PageModel;
|
|
1865
|
+
/**
|
|
1866
|
+
* @deprecated Use the [`startPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startPage) property instead.
|
|
1867
|
+
*/
|
|
1868
|
+
get startedPage(): PageModel;
|
|
1869
|
+
/**
|
|
1870
|
+
* Gets or sets the current page.
|
|
1871
|
+
*
|
|
1872
|
+
* If you want to change the current page, set this property to a `PageModel` object. You can get this object in different ways. For example, you can call the [`getPageByName()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#getPageByName) method to obtain a `PageModel` object with a specific name:
|
|
1873
|
+
*
|
|
1874
|
+
* ```js
|
|
1875
|
+
* survey.currentPage = survey.getPageByName("my-page-name");
|
|
1876
|
+
* ```
|
|
1877
|
+
*
|
|
1878
|
+
* Alternatively, you can change the current page if you set the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property to the index of the required page.
|
|
1879
|
+
*
|
|
1880
|
+
* The `currentPage` property does not return the start page even if it is current. Use the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage) property instead if your survey contains a start page.
|
|
1881
|
+
*/
|
|
1882
|
+
get currentPage(): any;
|
|
1883
|
+
set currentPage(value: any);
|
|
1884
|
+
tryNavigateToPage(page: PageModel): boolean;
|
|
1885
|
+
private performValidationOnPageChanging;
|
|
1886
|
+
private updateCurrentPage;
|
|
1887
|
+
private get isCurrentPageAvailable();
|
|
1888
|
+
private isPageExistsInSurvey;
|
|
1889
|
+
/**
|
|
1890
|
+
* Returns [`startPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startPage) if the survey currently displays a start page; otherwise, returns [`currentPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPage).
|
|
1891
|
+
* @see startPage
|
|
1892
|
+
* @see currentPage
|
|
1893
|
+
* @see firstPageIsStartPage
|
|
1894
|
+
*/
|
|
1895
|
+
get activePage(): any;
|
|
1896
|
+
/**
|
|
1897
|
+
* A Boolean value that indicates whether the [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page) is currently displayed.
|
|
1898
|
+
*/
|
|
1899
|
+
get isStartPageActive(): boolean;
|
|
1900
|
+
/**
|
|
1901
|
+
* @deprecated Use the [`isStartPageActive`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#isStartPageActive) property instead.
|
|
1902
|
+
*/
|
|
1903
|
+
get isShowStartingPage(): boolean;
|
|
1904
|
+
/**
|
|
1905
|
+
* Specifies which part of a matrix row responds to a drag gesture in [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) questions.
|
|
1906
|
+
*
|
|
1907
|
+
* Possible values:
|
|
1908
|
+
*
|
|
1909
|
+
* - `"entireItem"` (default) - Users can use the entire matrix row as a drag handle.
|
|
1910
|
+
* - `"icon"` - Users can only use a drag icon as a drag handle.
|
|
1911
|
+
*/
|
|
1912
|
+
get matrixDragHandleArea(): string;
|
|
1913
|
+
set matrixDragHandleArea(val: string);
|
|
1914
|
+
get isShowingPage(): boolean;
|
|
1915
|
+
private updateActivePage;
|
|
1916
|
+
private onStateAndCurrentPageChanged;
|
|
1917
|
+
private getPageByObject;
|
|
1918
|
+
/**
|
|
1919
|
+
* A zero-based index of the current page in the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
|
|
1920
|
+
*
|
|
1921
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-editprevious/ (linkStyle))
|
|
1922
|
+
* @see visiblePages
|
|
1923
|
+
*/
|
|
1924
|
+
get currentPageNo(): number;
|
|
1925
|
+
set currentPageNo(value: number);
|
|
1926
|
+
/**
|
|
1927
|
+
* Specifies the sort order of questions in the survey.
|
|
1928
|
+
*
|
|
1929
|
+
* Possible values:
|
|
1930
|
+
*
|
|
1931
|
+
* - `"initial"` (default) - Preserves the original order of questions.
|
|
1932
|
+
* - `"random"` - Displays questions in random order.
|
|
1933
|
+
*
|
|
1934
|
+
* You can override this property for individual pages and panels.
|
|
1935
|
+
* @see PageModel.questionOrder
|
|
1936
|
+
* @see PanelModel.questionOrder
|
|
1937
|
+
*/
|
|
1938
|
+
get questionOrder(): string;
|
|
1939
|
+
set questionOrder(val: string);
|
|
1940
|
+
/**
|
|
1941
|
+
* @deprecated Use the [`questionOrder`](#questionOrder) property instead.
|
|
1942
|
+
*/
|
|
1943
|
+
get questionsOrder(): string;
|
|
1944
|
+
set questionsOrder(val: string);
|
|
1945
|
+
/**
|
|
1946
|
+
* Focuses the first question on the current page.
|
|
1947
|
+
* @see focusQuestion
|
|
1948
|
+
* @see autoFocusFirstQuestion
|
|
1949
|
+
*/
|
|
1950
|
+
focusFirstQuestion(): void;
|
|
1951
|
+
scrollToTopOnPageChange(doScroll?: boolean): void;
|
|
1952
|
+
/**
|
|
1953
|
+
* Returns the current survey state.
|
|
1954
|
+
*
|
|
1955
|
+
* Possible values:
|
|
1956
|
+
*
|
|
1957
|
+
* - `"loading"` - The survey is being loaded from a JSON schema.
|
|
1958
|
+
* - `"empty"` - The survey has no elements to display.
|
|
1959
|
+
* - `"starting"` - The survey displays a [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
|
1960
|
+
* - `"running"` - A respondent is taking the survey.
|
|
1961
|
+
* - `"preview"` - A respondent is [previewing](https://surveyjs.io/form-library/examples/survey-showpreview/) answers before submitting them.
|
|
1962
|
+
* - `"completed"` - A respondent has completed the survey and submitted the results.
|
|
1963
|
+
*/
|
|
1964
|
+
get state(): string;
|
|
1965
|
+
private updateState;
|
|
1966
|
+
private calcState;
|
|
1967
|
+
private get isCompleted();
|
|
1968
|
+
private set isCompleted(value);
|
|
1969
|
+
private get isShowingPreview();
|
|
1970
|
+
private set isShowingPreview(value);
|
|
1971
|
+
private get isStartedState();
|
|
1972
|
+
private set isStartedState(value);
|
|
1973
|
+
private get isCompletedBefore();
|
|
1974
|
+
private set isCompletedBefore(value);
|
|
1975
|
+
private get isLoading();
|
|
1976
|
+
private set isLoading(value);
|
|
1977
|
+
get completedState(): string;
|
|
1978
|
+
get completedStateText(): string;
|
|
1979
|
+
protected setCompletedState(value: string, text: string): void;
|
|
1980
|
+
/**
|
|
1981
|
+
* Displays a toast notification with a specified message.
|
|
1982
|
+
*
|
|
1983
|
+
* Depending on the `type` argument, a survey can display the following notification types:
|
|
1984
|
+
*
|
|
1985
|
+
* 
|
|
1986
|
+
* @param message A message to display.
|
|
1987
|
+
* @param type A notification type: `"info"` (default), `"success"`, or `"error"`.
|
|
1988
|
+
* @param showActions For internal use.
|
|
1989
|
+
*/
|
|
1990
|
+
notify(message: string, type: string, showActions?: boolean): void;
|
|
1991
|
+
/**
|
|
1992
|
+
* Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
|
|
1993
|
+
* @param clearData *(Optional)* Specifies whether to clear survey data. Default value: `true`.
|
|
1994
|
+
* @param goToFirstPage *(Optional)* Specifies whether to switch the survey to the first page. Default value: `true`.
|
|
1995
|
+
*/
|
|
1996
|
+
clear(clearData?: boolean, goToFirstPage?: boolean): void;
|
|
1997
|
+
mergeValues(src: any, dest: any): void;
|
|
1998
|
+
private updateValuesWithDefaults;
|
|
1999
|
+
protected updateCustomWidgets(page: PageModel): void;
|
|
2000
|
+
protected currentPageChanging(newValue: PageModel, oldValue: PageModel): boolean;
|
|
2001
|
+
protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
|
|
2002
|
+
private notifyQuestionsOnHidingContent;
|
|
2003
|
+
private createPageChangeEventOptions;
|
|
2004
|
+
getProgress(): number;
|
|
2005
|
+
/**
|
|
2006
|
+
* Returns a percentage value that indicates user progress in the survey.
|
|
2007
|
+
* @see showProgressBar
|
|
2008
|
+
* @see progressBarType
|
|
2009
|
+
* @see progressText
|
|
2010
|
+
*/
|
|
2011
|
+
get progressValue(): number;
|
|
2012
|
+
get isNavigationButtonsShowing(): string;
|
|
2013
|
+
get isNavigationButtonsShowingOnTop(): boolean;
|
|
2014
|
+
get isNavigationButtonsShowingOnBottom(): boolean;
|
|
2015
|
+
private getIsNavigationButtonsShowingOn;
|
|
2016
|
+
get isEditMode(): boolean;
|
|
2017
|
+
get isDisplayMode(): boolean;
|
|
2018
|
+
get isUpdateValueTextOnTyping(): boolean;
|
|
2019
|
+
/**
|
|
2020
|
+
* Indicates whether the survey is being designed in [Survey Creator](https://surveyjs.io/survey-creator/documentation/overview).
|
|
2021
|
+
*/
|
|
2022
|
+
get isDesignMode(): boolean;
|
|
2023
|
+
private _isDesignMode;
|
|
2024
|
+
setDesignMode(value: boolean): void;
|
|
2025
|
+
/**
|
|
2026
|
+
* Specifies whether to show all survey elements, regardless of their visibility.
|
|
2027
|
+
*
|
|
2028
|
+
* Default value: `false`
|
|
2029
|
+
*/
|
|
2030
|
+
get showInvisibleElements(): boolean;
|
|
2031
|
+
set showInvisibleElements(val: boolean);
|
|
2032
|
+
private updateAllElementsVisibility;
|
|
2033
|
+
get areInvisibleElementsShowing(): boolean;
|
|
2034
|
+
get areEmptyElementsHidden(): boolean;
|
|
2035
|
+
private get isAnyQuestionAnswered();
|
|
2036
|
+
/**
|
|
2037
|
+
* Indicates whether the browser has a cookie with a specified [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName). If this property's value is `true`, the respondent has passed the survey previously.
|
|
2038
|
+
* @see setCookie
|
|
2039
|
+
* @see deleteCookie
|
|
2040
|
+
*/
|
|
2041
|
+
get hasCookie(): boolean;
|
|
2042
|
+
/**
|
|
2043
|
+
* Sets a cookie with a specified [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName) in the browser. If the `cookieName` property value is defined, this method is automatically called on survey completion.
|
|
2044
|
+
* @see hasCookie
|
|
2045
|
+
* @see deleteCookie
|
|
2046
|
+
*/
|
|
2047
|
+
setCookie(): void;
|
|
2048
|
+
/**
|
|
2049
|
+
* Deletes a cookie with a specified [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName) from the browser.
|
|
2050
|
+
* @see hasCookie
|
|
2051
|
+
* @see setCookie
|
|
2052
|
+
*/
|
|
2053
|
+
deleteCookie(): void;
|
|
2054
|
+
/**
|
|
2055
|
+
* @deprecated Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
|
|
2056
|
+
*/
|
|
2057
|
+
get ignoreValidation(): boolean;
|
|
2058
|
+
set ignoreValidation(val: boolean);
|
|
2059
|
+
/**
|
|
2060
|
+
* Specifies whether data validation is enabled.
|
|
2061
|
+
*
|
|
2062
|
+
* Default value: `true`
|
|
2063
|
+
* @see checkErrorsMode
|
|
2064
|
+
* @see hideRequiredErrors
|
|
2065
|
+
*/
|
|
2066
|
+
validationEnabled: boolean;
|
|
2067
|
+
/**
|
|
2068
|
+
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
|
2069
|
+
*
|
|
2070
|
+
* Default value: `false`
|
|
2071
|
+
* @see checkErrorsMode
|
|
2072
|
+
*/
|
|
2073
|
+
validationAllowSwitchPages: boolean;
|
|
2074
|
+
/**
|
|
2075
|
+
* Specifies whether respondents can end a survey with validation errors.
|
|
2076
|
+
*
|
|
2077
|
+
* Default value: `false`
|
|
2078
|
+
* @see checkErrorsMode
|
|
2079
|
+
*/
|
|
2080
|
+
validationAllowComplete: boolean;
|
|
2081
|
+
/**
|
|
2082
|
+
* Switches the survey to the next page.
|
|
2083
|
+
*
|
|
2084
|
+
* This method returns a Boolean value that indicates whether the page was successfully switched. `false` is returned if the current page is the last page or if it contains validation errors.
|
|
2085
|
+
* @returns `true` if the page was successfully switched; `false` otherwise.
|
|
2086
|
+
* @see isLastPage
|
|
2087
|
+
* @see prevPage
|
|
2088
|
+
* @see completeLastPage
|
|
2089
|
+
*/
|
|
2090
|
+
nextPage(): boolean;
|
|
2091
|
+
performNext(): boolean;
|
|
2092
|
+
performPrevious(): boolean;
|
|
2093
|
+
private hasErrorsOnNavigate;
|
|
2094
|
+
private canGoTroughValidation;
|
|
2095
|
+
private asyncValidationQuesitons;
|
|
2096
|
+
private checkForAsyncQuestionValidation;
|
|
2097
|
+
private clearAsyncValidationQuesitons;
|
|
2098
|
+
private onCompletedAsyncQuestionValidators;
|
|
2099
|
+
get isCurrentPageHasErrors(): boolean;
|
|
2100
|
+
/**
|
|
2101
|
+
* Returns `true` if the current page does not contain errors.
|
|
2102
|
+
* @see currentPage
|
|
2103
|
+
*/
|
|
2104
|
+
get isCurrentPageValid(): boolean;
|
|
2105
|
+
hasCurrentPageErrors(onAsyncValidation?: (hasErrors: boolean) => void): boolean;
|
|
2106
|
+
/**
|
|
2107
|
+
* Validates all questions on the current page and returns `false` if the validation fails.
|
|
2108
|
+
*
|
|
2109
|
+
* If you use validation expressions and at least one of them calls an async function, the `validateCurrentPage` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result.
|
|
2110
|
+
* @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise.
|
|
2111
|
+
* @see currentPage
|
|
2112
|
+
* @see validate
|
|
2113
|
+
* @see validateCurrentPage
|
|
2114
|
+
*/
|
|
2115
|
+
validateCurrentPage(onAsyncValidation?: (hasErrors: boolean) => void): boolean;
|
|
2116
|
+
hasPageErrors(page?: PageModel, onAsyncValidation?: (hasErrors: boolean) => void): boolean;
|
|
2117
|
+
/**
|
|
2118
|
+
* Validates all questions on a specified page and returns `false` if the validation fails.
|
|
2119
|
+
*
|
|
2120
|
+
* If you use validation expressions and at least one of them calls an async function, the `validatePage` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result.
|
|
2121
|
+
* @param page Pass the `PageModel` that you want to validate. You can pass `undefined` to validate the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage).
|
|
2122
|
+
* @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise.
|
|
2123
|
+
* @see validate
|
|
2124
|
+
* @see validateCurrentPage
|
|
2125
|
+
*/
|
|
2126
|
+
validatePage(page?: PageModel, onAsyncValidation?: (hasErrors: boolean) => void): boolean;
|
|
2127
|
+
hasErrors(fireCallback?: boolean, focusOnFirstError?: boolean, onAsyncValidation?: (hasErrors: boolean) => void): boolean;
|
|
2128
|
+
/**
|
|
2129
|
+
* Validates all questions and returns `false` if the validation fails.
|
|
2130
|
+
*
|
|
2131
|
+
* If you use validation expressions and at least one of them calls an async function, the `validate` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result.
|
|
2132
|
+
* @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI.
|
|
2133
|
+
* @param focusFirstError *(Optional)* Pass `true` if you want to focus the first question with a validation error. The survey will be switched to the page that contains this question if required.
|
|
2134
|
+
* @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise.
|
|
2135
|
+
* @see validateCurrentPage
|
|
2136
|
+
* @see validatePage
|
|
2137
|
+
*/
|
|
2138
|
+
validate(fireCallback?: boolean, focusFirstError?: boolean, onAsyncValidation?: (hasErrors: boolean) => void, changeCurrentPage?: boolean): boolean;
|
|
2139
|
+
ensureUniqueNames(element?: ISurveyElement): void;
|
|
2140
|
+
private ensureUniqueName;
|
|
2141
|
+
private ensureUniquePageName;
|
|
2142
|
+
private ensureUniquePanelName;
|
|
2143
|
+
private ensureUniqueQuestionName;
|
|
2144
|
+
private ensureUniqueElementName;
|
|
2145
|
+
private getNewName;
|
|
2146
|
+
private checkIsCurrentPageHasErrors;
|
|
2147
|
+
private checkIsPageHasErrors;
|
|
2148
|
+
private fireValidatedErrorsOnPage;
|
|
2149
|
+
/**
|
|
2150
|
+
* Switches the survey to the previous page.
|
|
2151
|
+
*
|
|
2152
|
+
* This method returns a Boolean value that indicates whether the page was successfully switched. `false` is returned if the current page is the first page.
|
|
2153
|
+
* @returns `true` if the page was successfully switched; `false` otherwise.
|
|
2154
|
+
* @see isFirstPage
|
|
2155
|
+
* @see nextPage
|
|
2156
|
+
*/
|
|
2157
|
+
prevPage(): boolean;
|
|
2158
|
+
/**
|
|
2159
|
+
* Completes the survey if it currently displays the last page and the page contains no validation errors. If both these conditions are met, this method returns `true`; otherwise, `false`.
|
|
2160
|
+
*
|
|
2161
|
+
* If you want to complete the survey regardless of the current page and validation errors, use the [`doComplete()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completeLastPage) event.
|
|
2162
|
+
* @see isCurrentPageValid
|
|
2163
|
+
* @see nextPage
|
|
2164
|
+
*/
|
|
2165
|
+
tryComplete(): boolean;
|
|
2166
|
+
/**
|
|
2167
|
+
* @deprecated Use the [`tryComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#tryComplete) method instead.
|
|
2168
|
+
*/
|
|
2169
|
+
completeLastPage(): boolean;
|
|
2170
|
+
private isNavigationButtonPressed;
|
|
2171
|
+
navigationMouseDown(): boolean;
|
|
2172
|
+
private resetNavigationButton;
|
|
2173
|
+
private mouseDownPage;
|
|
2174
|
+
nextPageUIClick(): boolean;
|
|
2175
|
+
nextPageMouseDown(): boolean;
|
|
2176
|
+
/**
|
|
2177
|
+
* Displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Returns `false` if the preview cannot be displayed because of validation errors.
|
|
2178
|
+
* @see cancelPreview
|
|
2179
|
+
* @see showPreviewBeforeComplete
|
|
2180
|
+
* @see onShowingPreview
|
|
2181
|
+
* @see state
|
|
2182
|
+
*/
|
|
2183
|
+
showPreview(): boolean;
|
|
2184
|
+
private showPreviewCore;
|
|
2185
|
+
/**
|
|
2186
|
+
* Cancels a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) and switches the survey to the page specified by the `currentPage` parameter.
|
|
2187
|
+
* @param currentPage A new current page. If you do not specify this parameter, the survey displays the last page.
|
|
2188
|
+
* @see showPreview
|
|
2189
|
+
* @see showPreviewBeforeComplete
|
|
2190
|
+
* @see state
|
|
2191
|
+
*/
|
|
2192
|
+
cancelPreview(currentPage?: any): void;
|
|
2193
|
+
private gotoPageFromPreview;
|
|
2194
|
+
cancelPreviewByPage(panel: IPanel): any;
|
|
2195
|
+
protected doCurrentPageComplete(doComplete: boolean): boolean;
|
|
2196
|
+
private doCurrentPageCompleteCore;
|
|
2197
|
+
get isSinglePage(): boolean;
|
|
2198
|
+
set isSinglePage(val: boolean);
|
|
2199
|
+
get isSingleVisibleQuestion(): boolean;
|
|
2200
|
+
private isSingleVisibleQuestionVal;
|
|
2201
|
+
/**
|
|
2202
|
+
* Specifies how to distribute survey elements between pages.
|
|
2203
|
+
*
|
|
2204
|
+
* Possible values:
|
|
2205
|
+
*
|
|
2206
|
+
* - `"singlePage"` - Combines all survey pages into a single page.
|
|
2207
|
+
* - `"questionPerPage"` - Creates a separate page for every question.
|
|
2208
|
+
* - `"standard"` (default) - Retains the original structure specified in the JSON schema.
|
|
2209
|
+
*/
|
|
2210
|
+
get questionsOnPageMode(): string;
|
|
2211
|
+
set questionsOnPageMode(val: string);
|
|
2212
|
+
/**
|
|
2213
|
+
* Gets or sets a Boolean value that specifies whether the first page is a start page.
|
|
2214
|
+
*
|
|
2215
|
+
* Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
|
2216
|
+
* @see startPage
|
|
2217
|
+
* @see activePage
|
|
2218
|
+
*/
|
|
2219
|
+
get firstPageIsStartPage(): boolean;
|
|
2220
|
+
set firstPageIsStartPage(val: boolean);
|
|
2221
|
+
/**
|
|
2222
|
+
* @deprecated Use the [`firstPageIsStartPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#firstPageIsStartPage) property instead.
|
|
2223
|
+
*/
|
|
2224
|
+
get firstPageIsStarted(): boolean;
|
|
2225
|
+
set firstPageIsStarted(val: boolean);
|
|
2226
|
+
isPageStarted(page: IPage): boolean;
|
|
2227
|
+
/**
|
|
2228
|
+
* Specifies whether to show a preview of given answers before they are submitted.
|
|
2229
|
+
*
|
|
2230
|
+
* Default value: `false`
|
|
2231
|
+
*
|
|
2232
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-preview/ (linkStyle))
|
|
2233
|
+
* @see previewMode
|
|
2234
|
+
* @see showPreview
|
|
2235
|
+
* @see cancelPreview
|
|
2236
|
+
*/
|
|
2237
|
+
get showPreviewBeforeComplete(): boolean | any;
|
|
2238
|
+
set showPreviewBeforeComplete(val: boolean | any);
|
|
2239
|
+
setShowPreviewBeforeComplete(val: boolean | any): void;
|
|
2240
|
+
/**
|
|
2241
|
+
* Specifies whether the [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) includes all or only answered questions.
|
|
2242
|
+
*
|
|
2243
|
+
* Possible values:
|
|
2244
|
+
*
|
|
2245
|
+
* - `"allQuestions"` (default)
|
|
2246
|
+
* - `"answeredQuestions"`
|
|
2247
|
+
*
|
|
2248
|
+
* [View Demo](https://surveyjs.io/form-library/examples/survey-preview/ (linkStyle))
|
|
2249
|
+
*/
|
|
2250
|
+
get previewMode(): string;
|
|
2251
|
+
set previewMode(val: string);
|
|
2252
|
+
protected onFirstPageIsStartedChanged(): void;
|
|
2253
|
+
private runningPages;
|
|
2254
|
+
private pageContainerValue;
|
|
2255
|
+
private onShowingPreviewChanged;
|
|
2256
|
+
private createRootPage;
|
|
2257
|
+
private disposeContainerPage;
|
|
2258
|
+
private updatePagesContainer;
|
|
2259
|
+
private currentSingleQuestionValue;
|
|
2260
|
+
get currentSingleQuestion(): Question;
|
|
2261
|
+
set currentSingleQuestion(val: Question);
|
|
2262
|
+
private changeCurrentPageFromPreview;
|
|
2263
|
+
protected onQuestionsOnPageModeChanged(oldValue: string): void;
|
|
2264
|
+
private getPageStartIndex;
|
|
2265
|
+
/**
|
|
2266
|
+
* Indicates whether the [current page](#currentPage) is the first page.
|
|
2267
|
+
*
|
|
2268
|
+
* > If the survey displays the [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page), this property contains `false`. Use the [`isStartPageActive`](#isStartPageActive) property to find out whether the start page is currently displayed.
|
|
2269
|
+
*/
|
|
2270
|
+
get isFirstPage(): boolean;
|
|
2271
|
+
/**
|
|
2272
|
+
* Indicates whether the [current page](#currentPage) is the last page.
|
|
2273
|
+
*/
|
|
2274
|
+
get isLastPage(): boolean;
|
|
2275
|
+
private updateButtonsVisibility;
|
|
2276
|
+
get isShowPrevButton(): boolean;
|
|
2277
|
+
get isShowNextButton(): boolean;
|
|
2278
|
+
get isCompleteButtonVisible(): boolean;
|
|
2279
|
+
get isPreviewButtonVisible(): boolean;
|
|
2280
|
+
get isCancelPreviewButtonVisible(): boolean;
|
|
2281
|
+
get isFirstElement(): boolean | undefined;
|
|
2282
|
+
get isLastElement(): boolean | undefined;
|
|
2283
|
+
private updateIsFirstLastPageState;
|
|
2284
|
+
private get isLastPageOrElement();
|
|
2285
|
+
private get isFirstPageOrElement();
|
|
2286
|
+
private calcIsShowPrevButton;
|
|
2287
|
+
private calcIsShowNextButton;
|
|
2288
|
+
calcIsCompleteButtonVisible(): boolean;
|
|
2289
|
+
private calcIsPreviewButtonVisible;
|
|
2290
|
+
private calcIsCancelPreviewButtonVisible;
|
|
2291
|
+
private get firstVisiblePage();
|
|
2292
|
+
private get lastVisiblePage();
|
|
2293
|
+
/**
|
|
2294
|
+
* Completes the survey.
|
|
2295
|
+
*
|
|
2296
|
+
* When you call this method, Form Library performs the following actions:
|
|
2297
|
+
*
|
|
2298
|
+
* 1. Saves a cookie if the [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName) property is set.
|
|
2299
|
+
* 1. Switches the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) to `"completed"`.
|
|
2300
|
+
* 1. Raises the [`onComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onComplete) event.
|
|
2301
|
+
* 1. Navigates the user to a URL specified by the [`navigateToUrl`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#navigateToUrl) or [`navigateToUrlOnCondition`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#navigateToUrlOnCondition) property.
|
|
2302
|
+
* 1. Calls the [`sendResult()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#sendResult) method if Form Library works with [SurveyJS Service](https://api.surveyjs.io/).
|
|
2303
|
+
*
|
|
2304
|
+
* The `doComplete()` method completes the survey regardless of validation errors and the current page. If you need to ensure that survey results are valid and full, call the [`completeLastPage()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completeLastPage) method instead.
|
|
2305
|
+
*
|
|
2306
|
+
* @param isCompleteOnTrigger For internal use.
|
|
2307
|
+
* @param completeTrigger For internal use.
|
|
2308
|
+
* @returns `false` if survey completion is cancelled within the [`onCompleting`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCompleting) event handler; otherwise, `true`.
|
|
2309
|
+
* @see surveyPostId
|
|
2310
|
+
*/
|
|
2311
|
+
doComplete(isCompleteOnTrigger?: boolean, completeTrigger?: Trigger): boolean;
|
|
2312
|
+
private saveDataOnComplete;
|
|
2313
|
+
private checkOnCompletingEvent;
|
|
2314
|
+
/**
|
|
2315
|
+
* Starts the survey. Applies only if the survey has a [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
|
2316
|
+
* @see firstPageIsStartPage
|
|
2317
|
+
* @see completeLastPage
|
|
2318
|
+
*/
|
|
2319
|
+
start(): boolean;
|
|
2320
|
+
/**
|
|
2321
|
+
* Indicates whether the current page is being [validated on a server](#onServerValidateQuestions).
|
|
2322
|
+
*/
|
|
2323
|
+
get isValidatingOnServer(): boolean;
|
|
2324
|
+
private serverValidationEventCount;
|
|
2325
|
+
private setIsValidatingOnServer;
|
|
2326
|
+
private createServerValidationOptions;
|
|
2327
|
+
protected onIsValidatingOnServerChanged(): void;
|
|
2328
|
+
protected doServerValidation(doComplete: boolean, isPreview?: boolean, page?: PageModel): boolean;
|
|
2329
|
+
private completeServerValidation;
|
|
2330
|
+
protected doNextPage(): void;
|
|
2331
|
+
setCompleted(trigger: Trigger): void;
|
|
2332
|
+
canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
|
|
2333
|
+
private completedByTriggers;
|
|
2334
|
+
private get canBeCompletedByTrigger();
|
|
2335
|
+
private get completedTrigger();
|
|
2336
|
+
/**
|
|
2337
|
+
* Returns HTML content displayed on the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
|
2338
|
+
*
|
|
2339
|
+
* To specify HTML content, use the [`completedHtml`](#completedHtml) property.
|
|
2340
|
+
*/
|
|
2341
|
+
get processedCompletedHtml(): string;
|
|
2342
|
+
/**
|
|
2343
|
+
* Returns HTML content displayed to a user who has completed the survey before. To identify such users, the survey uses a [cookie name](#cookieName) or [client ID](#clientId).
|
|
2344
|
+
*
|
|
2345
|
+
* To specify HTML content, use the [`completedBeforeHtml`](#completedBeforeHtml) property.
|
|
2346
|
+
*/
|
|
2347
|
+
get processedCompletedBeforeHtml(): string;
|
|
2348
|
+
/**
|
|
2349
|
+
* Returns HTML content displayed while a survey JSON schema is being loaded from [SurveyJS Service](https://api.surveyjs.io).
|
|
2350
|
+
*
|
|
2351
|
+
* To specify HTML content, use the [`loadingHtml`](#loadingHtml) property.
|
|
2352
|
+
*/
|
|
2353
|
+
get processedLoadingHtml(): string;
|
|
2354
|
+
getProgressInfo(): IProgressInfo;
|
|
2355
|
+
/**
|
|
2356
|
+
* Returns text displayed by the progress bar (for instance, "Page 2 of 3" or "Answered 3/8 questions"). Handle the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event to change this text.
|
|
2357
|
+
* @see progressValue
|
|
2358
|
+
* @see showProgressBar
|
|
2359
|
+
* @see progressBarType
|
|
2360
|
+
*/
|
|
2361
|
+
get progressText(): string;
|
|
2362
|
+
private isCalculatingProgressText;
|
|
2363
|
+
updateProgressText(onValueChanged?: boolean): void;
|
|
2364
|
+
getProgressText(): string;
|
|
2365
|
+
private getProgressTextCore;
|
|
2366
|
+
rootCss: string;
|
|
2367
|
+
getRootCss(): string;
|
|
2368
|
+
private isSmoothScrollEnabled;
|
|
2369
|
+
private resizeObserver;
|
|
2370
|
+
afterRenderSurvey(htmlElement: any): void;
|
|
2371
|
+
beforeDestroySurveyElement(): void;
|
|
2372
|
+
/**
|
|
2373
|
+
* An event that is raised when the survey's width or height is changed.
|
|
2374
|
+
*/
|
|
2375
|
+
onResize: EventBase<SurveyModel, ResizeEvent>;
|
|
2376
|
+
private processResponsiveness;
|
|
2377
|
+
triggerResponsiveness(hard: boolean): void;
|
|
2378
|
+
destroyResizeObserver(): void;
|
|
2379
|
+
updateQuestionCssClasses(question: Question, cssClasses: any): void;
|
|
2380
|
+
updatePanelCssClasses(panel: PanelModel, cssClasses: any): void;
|
|
2381
|
+
updatePageCssClasses(page: PageModel, cssClasses: any): void;
|
|
2382
|
+
updateChoiceItemCss(question: IQuestion, options: any): void;
|
|
2383
|
+
private isCurrentPageRendering;
|
|
2384
|
+
private isCurrentPageRendered;
|
|
2385
|
+
afterRenderPage(htmlElement: HTMLElement): void;
|
|
2386
|
+
afterRenderHeader(htmlElement: HTMLElement): void;
|
|
2387
|
+
afterRenderQuestion(question: Question, htmlElement: HTMLElement): void;
|
|
2388
|
+
afterRenderQuestionInput(question: Question, htmlElement: HTMLElement): void;
|
|
2389
|
+
afterRenderPanel(panel: IElement, htmlElement: HTMLElement): void;
|
|
2390
|
+
whenQuestionFocusIn(question: Question): void;
|
|
2391
|
+
whenPanelFocusIn(panel: PanelModel): void;
|
|
2392
|
+
private rebuildQuestionChoices;
|
|
2393
|
+
canChangeChoiceItemsVisibility(): boolean;
|
|
2394
|
+
getChoiceItemVisibility(question: Question, item: any, val: boolean): boolean;
|
|
2395
|
+
loadQuestionChoices(options: {
|
|
2396
|
+
question: Question;
|
|
2397
|
+
filter: string;
|
|
2398
|
+
skip: number;
|
|
2399
|
+
take: number;
|
|
2400
|
+
setItems: (items: Array<any>, totalCount: number) => void;
|
|
2401
|
+
}): void;
|
|
2402
|
+
getChoiceDisplayValue(options: {
|
|
2403
|
+
question: Question;
|
|
2404
|
+
values: Array<any>;
|
|
2405
|
+
setItems: (displayValues: Array<string>, ...customValues: Array<IValueItemCustomPropValues>) => void;
|
|
2406
|
+
}): void;
|
|
2407
|
+
matrixBeforeRowAdded(options: any): void;
|
|
2408
|
+
matrixRowAdded(question: QuestionMatrixDynamicModel, row: any): void;
|
|
2409
|
+
matrixColumnAdded(question: Question, column: any): void;
|
|
2410
|
+
multipleTextItemAdded(question: QuestionMultipleTextModel, item: any): void;
|
|
2411
|
+
getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
|
|
2412
|
+
matrixRowRemoved(question: QuestionMatrixDynamicModel, rowIndex: number, row: any): void;
|
|
2413
|
+
matrixRowRemoving(question: QuestionMatrixDynamicModel, rowIndex: number, row: any): boolean;
|
|
2414
|
+
matrixAllowRemoveRow(question: QuestionMatrixDynamicModel, rowIndex: number, row: any): boolean;
|
|
2415
|
+
matrixDetailPanelVisibleChanged(question: QuestionMatrixDropdownModelBase, rowIndex: number, row: any, visible: boolean): void;
|
|
2416
|
+
matrixCellCreating(question: QuestionMatrixDropdownModelBase, options: any): void;
|
|
2417
|
+
matrixCellCreated(question: QuestionMatrixDropdownModelBase, options: any): void;
|
|
2418
|
+
matrixAfterCellRender(question: QuestionMatrixDropdownModelBase, options: any): void;
|
|
2419
|
+
matrixCellValueChanged(question: QuestionMatrixDropdownModelBase, options: any): void;
|
|
2420
|
+
matrixCellValueChanging(question: QuestionMatrixDropdownModelBase, options: MatrixCellValueChangingEvent): void;
|
|
2421
|
+
get isValidateOnValueChanging(): boolean;
|
|
2422
|
+
get isValidateOnValueChanged(): boolean;
|
|
2423
|
+
private get isValidateOnValueChange();
|
|
2424
|
+
private get isValidateOnComplete();
|
|
2425
|
+
matrixCellValidate(question: QuestionMatrixDropdownModelBase, options: MatrixCellValidateEvent): SurveyError;
|
|
2426
|
+
dynamicPanelAdded(question: QuestionPanelDynamicModel, panelIndex?: number, panel?: PanelModel): void;
|
|
2427
|
+
dynamicPanelRemoved(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): void;
|
|
2428
|
+
private hasQuestionVisibleIndeces;
|
|
2429
|
+
dynamicPanelRemoving(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): boolean;
|
|
2430
|
+
dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
|
|
2431
|
+
dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
|
|
2432
|
+
dynamicPanelGetTabTitle(question: IQuestion, options: any): void;
|
|
2433
|
+
dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
|
|
2434
|
+
dragAndDropAllow(options: DragDropAllowEvent): boolean;
|
|
2435
|
+
elementContentVisibilityChanged(element: ISurveyElement): void;
|
|
2436
|
+
getUpdatedPanelFooterActions(panel: PanelModel, actions: Array<IAction>, question?: QuestionPanelDynamicModel): Array<IAction>;
|
|
2437
|
+
getUpdatedElementTitleActions(element: ISurveyElement, titleActions: Array<IAction>): Array<IAction>;
|
|
2438
|
+
private getTitleActionsResult;
|
|
2439
|
+
private getUpdatedQuestionTitleActions;
|
|
2440
|
+
private getUpdatedPanelTitleActions;
|
|
2441
|
+
private getUpdatedPageTitleActions;
|
|
2442
|
+
getUpdatedMatrixRowActions(question: QuestionMatrixDropdownModelBase, row: any, actions: Array<IAction>): IAction[];
|
|
2443
|
+
skeletonHeight: number;
|
|
2444
|
+
scrollElementToTop(element: ISurveyElement, question: Question, page: PageModel, id: string, scrollIfVisible?: boolean, scrollIntoViewOptions?: ScrollIntoViewOptions, passedRootElement?: HTMLElement, onScolledCallback?: () => void): any;
|
|
2445
|
+
/**
|
|
2446
|
+
* Opens a dialog window for users to select files.
|
|
2447
|
+
* @param input A [file input HTML element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).
|
|
2448
|
+
* @param callback A callback function that you can use to process selected files. Accepts an array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects.
|
|
2449
|
+
* @see onOpenFileChooser
|
|
2450
|
+
* @see onUploadFile
|
|
2451
|
+
*/
|
|
2452
|
+
chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void, context?: {
|
|
2453
|
+
element: Base;
|
|
2454
|
+
item?: any;
|
|
2455
|
+
elementType?: string;
|
|
2456
|
+
propertyName?: string;
|
|
2457
|
+
}): void;
|
|
2458
|
+
/**
|
|
2459
|
+
* Uploads files to a server.
|
|
2460
|
+
*
|
|
2461
|
+
* The following code shows how to call this method:
|
|
2462
|
+
*
|
|
2463
|
+
* ```js
|
|
2464
|
+
* const question = survey.getQuestionByName("myFileQuestion");
|
|
2465
|
+
* survey.uploadFiles(
|
|
2466
|
+
* question,
|
|
2467
|
+
* question.name,
|
|
2468
|
+
* question.value,
|
|
2469
|
+
* (data, errors) => {
|
|
2470
|
+
* // ...
|
|
2471
|
+
* }
|
|
2472
|
+
* );
|
|
2473
|
+
* ```
|
|
2474
|
+
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model) or [Signature Pad question instance](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model).
|
|
2475
|
+
* @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name) or Signature Pad question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model#name).
|
|
2476
|
+
* @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
|
|
2477
|
+
* @param callback A callback function that allows you to access successfully uploaded files as the first argument. If any files fail to upload, the second argument contains an array of error messages.
|
|
2478
|
+
* @see onUploadFiles
|
|
2479
|
+
* @see downloadFile
|
|
2480
|
+
*/
|
|
2481
|
+
uploadFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
|
|
2482
|
+
downloadFile(question: QuestionFileModel, questionName: string, fileValue: any, callback: (status: string, data: any) => any): void;
|
|
2483
|
+
clearFiles(question: QuestionFileModel | QuestionSignaturePadModel, name: string, value: any, fileName: string, callback: (status: string, data: any) => any): void;
|
|
2484
|
+
updateChoicesFromServer(question: QuestionSelectBase, choices: Array<ItemValue>, serverResult: any): Array<ItemValue>;
|
|
2485
|
+
loadedChoicesFromServer(question: IQuestion): void;
|
|
2486
|
+
protected createSurveyService(): dxSurveyService;
|
|
2487
|
+
protected uploadFilesCore(name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
|
|
2488
|
+
getPage(index: number): PageModel;
|
|
2489
|
+
/**
|
|
2490
|
+
* Adds an existing page to the survey.
|
|
2491
|
+
* @param page A page to add.
|
|
2492
|
+
* @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
|
|
2493
|
+
* @see addNewPage
|
|
2494
|
+
* @see createNewPage
|
|
2495
|
+
*/
|
|
2496
|
+
addPage(page: PageModel, index?: number): void;
|
|
2497
|
+
/**
|
|
2498
|
+
* Creates a new page and adds it to the survey.
|
|
2499
|
+
*
|
|
2500
|
+
* If you want to switch a survey to the newly added page, assign its index to the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property or assign the entire page to the [`currentPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPage) property.
|
|
2501
|
+
*
|
|
2502
|
+
* @param name A page name. If you do not specify this parameter, it will be generated automatically.
|
|
2503
|
+
* @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
|
|
2504
|
+
* @returns The created and added page.
|
|
2505
|
+
* @see addPage
|
|
2506
|
+
* @see createNewPage
|
|
2507
|
+
*/
|
|
2508
|
+
addNewPage(name?: string, index?: number): PageModel;
|
|
2509
|
+
/**
|
|
2510
|
+
* Removes a page from the survey.
|
|
2511
|
+
*
|
|
2512
|
+
* Pass a `PageModel` object to this method. You can get this object in different ways. For example, you can call the [`getPageByName()`](#getPageByName) method to obtain a `PageModel` object with a specific name or use the [`currentPage`](#currentPage) property to access and delete the current page, as shown in the code below.
|
|
2513
|
+
*
|
|
2514
|
+
* ```js
|
|
2515
|
+
* // Delete the current page
|
|
2516
|
+
* survey.removePage(survey.currentPage);
|
|
2517
|
+
* ```
|
|
2518
|
+
* @param page A page to remove.
|
|
2519
|
+
* @see addNewPage
|
|
2520
|
+
*/
|
|
2521
|
+
removePage(page: PageModel): void;
|
|
2522
|
+
/**
|
|
2523
|
+
* Returns a question with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
2524
|
+
* @param name A question name
|
|
2525
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
2526
|
+
* @returns A question with a specified name.
|
|
2527
|
+
* @see getAllQuestions
|
|
2528
|
+
* @see getQuestionByValueName
|
|
2529
|
+
*/
|
|
2530
|
+
getQuestionByName(name: string, caseInsensitive?: boolean): Question;
|
|
2531
|
+
findQuestionByName(name: string): IQuestion;
|
|
2532
|
+
getEditingSurveyElement(): Base;
|
|
2533
|
+
/**
|
|
2534
|
+
* Returns a question with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName).
|
|
2535
|
+
*
|
|
2536
|
+
* > Since `valueName` does not have to be unique, multiple questions can have the same `valueName` value. In this case, the `getQuestionByValueName()` method returns the first such question. If you need to get all questions with the same `valueName`, call the `getQuestionsByValueName()` method.
|
|
2537
|
+
* @param valueName A question's `valueName` property value.
|
|
2538
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
2539
|
+
* @returns A question with a specified `valueName`.
|
|
2540
|
+
* @see getAllQuestions
|
|
2541
|
+
* @see getQuestionByName
|
|
2542
|
+
*/
|
|
2543
|
+
getQuestionByValueName(valueName: string, caseInsensitive?: boolean): Question;
|
|
2544
|
+
/**
|
|
2545
|
+
* Returns all questions with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName). If a question's `valueName` is undefined, its [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name) property is used.
|
|
2546
|
+
* @param valueName A question's `valueName` property value.
|
|
2547
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
2548
|
+
* @returns An array of questions with a specified `valueName`.
|
|
2549
|
+
* @see getAllQuestions
|
|
2550
|
+
* @see getQuestionByName
|
|
2551
|
+
*/
|
|
2552
|
+
getQuestionsByValueName(valueName: string, caseInsensitive?: boolean): Array<Question>;
|
|
2553
|
+
getCalculatedValueByName(name: string): CalculatedValue;
|
|
2554
|
+
getQuestionsByNames(names: string[], caseInsensitive?: boolean): IQuestion[];
|
|
2555
|
+
/**
|
|
2556
|
+
* Returns a page to which a specified survey element (question or panel) belongs.
|
|
2557
|
+
* @param element A question or panel instance.
|
|
2558
|
+
*/
|
|
2559
|
+
getPageByElement(element: IElement): PageModel;
|
|
2560
|
+
/**
|
|
2561
|
+
* Returns a page to which a specified question belongs.
|
|
2562
|
+
* @param question A question instance.
|
|
2563
|
+
*/
|
|
2564
|
+
getPageByQuestion(question: IQuestion): PageModel;
|
|
2565
|
+
/**
|
|
2566
|
+
* Returns a page with a specified name.
|
|
2567
|
+
* @param name A page [name](https://surveyjs.io/form-library/documentation/api-reference/page-model#name).
|
|
2568
|
+
*/
|
|
2569
|
+
getPageByName(name: string): PageModel;
|
|
2570
|
+
getPagesByNames(names: string[]): PageModel[];
|
|
2571
|
+
/**
|
|
2572
|
+
* Returns a list of all [questions](https://surveyjs.io/form-library/documentation/api-reference/question) in the survey.
|
|
2573
|
+
* @param visibleOnly A Boolean value that specifies whether to include only visible questions.
|
|
2574
|
+
* @param includeDesignTime For internal use.
|
|
2575
|
+
* @param includeNested A Boolean value that specifies whether to include nested questions, such as questions within matrix cells.
|
|
2576
|
+
* @returns An array of questions.
|
|
2577
|
+
* @see getQuestionByName
|
|
2578
|
+
*/
|
|
2579
|
+
getAllQuestions(visibleOnly?: boolean, includeDesignTime?: boolean, includeNested?: boolean): Array<Question>;
|
|
2580
|
+
/**
|
|
2581
|
+
* Returns an array of quiz questions. A question counts if it is visible, has an input field, and specifies [`correctAnswer`](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#correctAnswer).
|
|
2582
|
+
*
|
|
2583
|
+
* For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
2584
|
+
* @returns An array of quiz questions.
|
|
2585
|
+
* @see getQuizQuestionCount
|
|
2586
|
+
*/
|
|
2587
|
+
getQuizQuestions(): Array<IQuestion>;
|
|
2588
|
+
/**
|
|
2589
|
+
* Returns a [panel](https://surveyjs.io/form-library/documentation/api-reference/panel-model) with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/panel-model#name).
|
|
2590
|
+
* @param name A panel name.
|
|
2591
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
2592
|
+
* @returns A panel with a specified name.
|
|
2593
|
+
* @see getAllPanels
|
|
2594
|
+
*/
|
|
2595
|
+
getPanelByName(name: string, caseInsensitive?: boolean): PanelModel;
|
|
2596
|
+
/**
|
|
2597
|
+
* Returns a list of all [panels](https://surveyjs.io/form-library/documentation/api-reference/panel-model) in the survey.
|
|
2598
|
+
* @param visibleOnly A Boolean value that specifies whether to include only visible panels.
|
|
2599
|
+
* @param includeDesignTime For internal use.
|
|
2600
|
+
* @returns An array of panels.
|
|
2601
|
+
* @see getPanelByName
|
|
2602
|
+
*/
|
|
2603
|
+
getAllPanels(visibleOnly?: boolean, includeDesignTime?: boolean): Array<IPanel>;
|
|
2604
|
+
/**
|
|
2605
|
+
* Creates and returns a new page but does not add it to the survey.
|
|
2606
|
+
*
|
|
2607
|
+
* Call the [`addPage(page)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addPage) method to add the created page to the survey later or the [`addNewPage(name, index)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addNewPage) method to create _and_ add a page to the survey.
|
|
2608
|
+
* @see addPage
|
|
2609
|
+
* @see addNewPage
|
|
2610
|
+
*/
|
|
2611
|
+
createNewPage(name: string): PageModel;
|
|
2612
|
+
private getValueChangeReason;
|
|
2613
|
+
protected questionOnValueChanging(valueName: string, newValue: any, questionValueName?: string): any;
|
|
2614
|
+
protected updateQuestionValue(valueName: string, newValue: any): void;
|
|
2615
|
+
private checkQuestionErrorOnValueChanged;
|
|
2616
|
+
private checkQuestionErrorOnValueChangedCore;
|
|
2617
|
+
private checkErrorsOnValueChanging;
|
|
2618
|
+
private fireOnValueChanged;
|
|
2619
|
+
protected notifyQuestionOnValueChanged(valueName: string, newValue: any, questionName: string): void;
|
|
2620
|
+
private isRunningElementsBindings;
|
|
2621
|
+
private updateVisibleIndexAfterBindings;
|
|
2622
|
+
private checkElementsBindings;
|
|
2623
|
+
private notifyElementsOnAnyValueOrVariableChanged;
|
|
2624
|
+
private updateAllQuestionsValue;
|
|
2625
|
+
private notifyAllQuestionsOnValueChanged;
|
|
2626
|
+
private checkOnPageTriggers;
|
|
2627
|
+
private getCurrentPageQuestions;
|
|
2628
|
+
private isTriggerIsRunning;
|
|
2629
|
+
private triggerValues;
|
|
2630
|
+
private triggerKeys;
|
|
2631
|
+
private checkTriggers;
|
|
2632
|
+
private checkTriggersAndRunConditions;
|
|
2633
|
+
private get hasRequiredValidQuestionTrigger();
|
|
2634
|
+
private doElementsOnLoad;
|
|
2635
|
+
private conditionValues;
|
|
2636
|
+
private get isRunningConditions();
|
|
2637
|
+
private isValueChangedOnRunningCondition;
|
|
2638
|
+
private conditionRunnerCounter;
|
|
2639
|
+
private conditionUpdateVisibleIndexes;
|
|
2640
|
+
private conditionNotifyElementsOnAnyValueOrVariableChanged;
|
|
2641
|
+
/**
|
|
2642
|
+
* Recalculates all [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) in the survey.
|
|
2643
|
+
*/
|
|
2644
|
+
runExpressions(): void;
|
|
2645
|
+
private runConditions;
|
|
2646
|
+
private questionTriggersKeys;
|
|
2647
|
+
private runConditionOnValueChanged;
|
|
2648
|
+
private runConditionsCore;
|
|
2649
|
+
private runQuestionsTriggers;
|
|
2650
|
+
private checkIfNewPagesBecomeVisible;
|
|
2651
|
+
/**
|
|
2652
|
+
* Posts a survey result to [SurveyJS Service](https://api.surveyjs.io/).
|
|
2653
|
+
* @param postId An identifier used to save survey results. You can find it on the [My Surveys](https://surveyjs.io/service/mysurveys) page. If you do not specify this parameter, the survey uses the [`surveyPostId`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#surveyPostId) property value.
|
|
2654
|
+
* @param clientId A respondent identifier (e-mail or other unique ID). This ID ensures that the respondent does not pass the same survey twice.
|
|
2655
|
+
* @param isPartial Pass `true` to save partial survey results (see [Continue an Incomplete Survey](https://surveyjs.io/form-library/documentation/handle-survey-results-continue-incomplete)).
|
|
2656
|
+
*/
|
|
2657
|
+
sendResult(postId?: string, clientId?: string, isPartial?: boolean): void;
|
|
2658
|
+
/**
|
|
2659
|
+
* Requests [SurveyJS Service](https://api.surveyjs.io/) to retrieve all answers to a specified question. Handle the [`onGetResult`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetResult) event to access the answers.
|
|
2660
|
+
* @param resultId A result ID that identifies the required survey. You can find it on the [My Surveys](https://surveyjs.io/service/mysurveys) page.
|
|
2661
|
+
* @param questionName A question name.
|
|
2662
|
+
*/
|
|
2663
|
+
getResult(resultId: string, questionName: string): void;
|
|
2664
|
+
/**
|
|
2665
|
+
* Loads a survey JSON schema from the [SurveyJS Service](https://api.surveyjs.io). You can handle the [`onLoadedSurveyFromService`](#onLoadedSurveyFromService) event to modify the schema after loading if required.
|
|
2666
|
+
* @param surveyId The identifier of a survey JSON schema to load. Refer to the following help topic for more information: [Store Survey Results in the SurveyJS Service](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-the-surveyjs-service).
|
|
2667
|
+
* @param clientId A user identifier (e-mail or other unique ID) used to determine whether the user has already taken the survey.
|
|
2668
|
+
*/
|
|
2669
|
+
loadSurveyFromService(surveyId?: string, clientId?: string): void;
|
|
2670
|
+
private loadSurveyFromServiceJson;
|
|
2671
|
+
protected onLoadingSurveyFromService(): void;
|
|
2672
|
+
protected onLoadSurveyFromService(): void;
|
|
2673
|
+
private resetVisibleIndexes;
|
|
2674
|
+
private updateVisibleIndexes;
|
|
2675
|
+
private updatePageElementsVisibleIndexes;
|
|
2676
|
+
private getStartVisibleIndex;
|
|
2677
|
+
private updatePageVisibleIndexes;
|
|
2678
|
+
fromJSON(json: any, options?: ILoadFromJSONOptions): void;
|
|
2679
|
+
startLoadingFromJson(json?: any): void;
|
|
2680
|
+
setJsonObject(jsonObj: any): void;
|
|
2681
|
+
private isEndLoadingFromJson;
|
|
2682
|
+
endLoadingFromJson(): void;
|
|
2683
|
+
private updateNavigationCss;
|
|
2684
|
+
private updateNavigationItemCssCallback;
|
|
2685
|
+
private updateNavigationBarCss;
|
|
2686
|
+
protected createNavigationBar(): ActionContainer;
|
|
2687
|
+
protected createNavigationActions(): Array<IAction>;
|
|
2688
|
+
protected onBeforeRunConstructor(): void;
|
|
2689
|
+
protected onBeforeCreating(): void;
|
|
2690
|
+
protected onCreating(): void;
|
|
2691
|
+
private getProcessedTextValue;
|
|
2692
|
+
getBuiltInVariableValue(name: string): number;
|
|
2693
|
+
private getProcessedTextValueCore;
|
|
2694
|
+
private getProcessedValuesWithoutQuestion;
|
|
2695
|
+
private getFirstName;
|
|
2696
|
+
private reduceFirstName;
|
|
2697
|
+
private isClearingUnsedValues;
|
|
2698
|
+
private clearUnusedValues;
|
|
2699
|
+
hasVisibleQuestionByValueName(valueName: string): boolean;
|
|
2700
|
+
questionsByValueName(valueName: string): Array<IQuestion>;
|
|
2701
|
+
private clearInvisibleQuestionValues;
|
|
2702
|
+
/**
|
|
2703
|
+
* Returns a variable value.
|
|
2704
|
+
*
|
|
2705
|
+
* [Variables help topic](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#variables (linkStyle))
|
|
2706
|
+
* @param name A variable name.
|
|
2707
|
+
* @return A variable value.
|
|
2708
|
+
* @see setVariable
|
|
2709
|
+
* @see getVariableNames
|
|
2710
|
+
*/
|
|
2711
|
+
getVariable(name: string): any;
|
|
2712
|
+
/**
|
|
2713
|
+
* Sets a variable value.
|
|
2714
|
+
*
|
|
2715
|
+
* [Variables help topic](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#variables (linkStyle))
|
|
2716
|
+
* @param name A variable name.
|
|
2717
|
+
* @param newValue A new variable value.
|
|
2718
|
+
* @see getVariable
|
|
2719
|
+
* @see getVariableNames
|
|
2720
|
+
*/
|
|
2721
|
+
setVariable(name: string, newValue: any): void;
|
|
2722
|
+
/**
|
|
2723
|
+
* Returns the names of all variables in the survey.
|
|
2724
|
+
*
|
|
2725
|
+
* [Variables help topic](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#variables (linkStyle))
|
|
2726
|
+
* @returns An array of variable names.
|
|
2727
|
+
* @see getVariable
|
|
2728
|
+
* @see setVariable
|
|
2729
|
+
*/
|
|
2730
|
+
getVariableNames(): Array<string>;
|
|
2731
|
+
protected getUnbindValue(value: any): any;
|
|
2732
|
+
/**
|
|
2733
|
+
* Returns a value (answer) for a question with a specified `name`.
|
|
2734
|
+
* @param name A question name.
|
|
2735
|
+
* @returns A question value (answer).
|
|
2736
|
+
* @see data
|
|
2737
|
+
* @see setValue
|
|
2738
|
+
*/
|
|
2739
|
+
getValue(name: string): any;
|
|
2740
|
+
/**
|
|
2741
|
+
* Sets a question value (answer).
|
|
2742
|
+
*
|
|
2743
|
+
* > This method executes all triggers and reevaluates conditions (`visibleIf`, `requiredId`, and others). It also switches the survey to the next page if the [`autoAdvanceEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#autoAdvanceEnabled) property is enabled and all questions on the current page have correct answers.
|
|
2744
|
+
* @param name A question name.
|
|
2745
|
+
* @param newValue A new question value.
|
|
2746
|
+
* @param locNotification For internal use.
|
|
2747
|
+
* @param allowNotifyValueChanged For internal use.
|
|
2748
|
+
* @see data
|
|
2749
|
+
* @see getValue
|
|
2750
|
+
*/
|
|
2751
|
+
setValue(name: string, newQuestionValue: any, locNotification?: any, allowNotifyValueChanged?: boolean, questionName?: string): void;
|
|
2752
|
+
private isValueEmpyOnSetValue;
|
|
2753
|
+
private updateOnSetValue;
|
|
2754
|
+
private isValueEqual;
|
|
2755
|
+
protected doOnPageAdded(page: PageModel): void;
|
|
2756
|
+
protected doOnPageRemoved(page: PageModel): void;
|
|
2757
|
+
private generateNewName;
|
|
2758
|
+
protected tryGoNextPageAutomatic(name: string): void;
|
|
2759
|
+
private tryCompleteOrShowPreview;
|
|
2760
|
+
/**
|
|
2761
|
+
* Returns a comment value from a question with a specified `name`.
|
|
2762
|
+
* @param name A question name.
|
|
2763
|
+
* @returns A comment.
|
|
2764
|
+
* @see setComment
|
|
2765
|
+
*/
|
|
2766
|
+
getComment(name: string): string;
|
|
2767
|
+
/**
|
|
2768
|
+
* Sets a comment value to a question with a specified `name`.
|
|
2769
|
+
* @param name A question name.
|
|
2770
|
+
* @param newValue A new comment value.
|
|
2771
|
+
* @param locNotification For internal use.
|
|
2772
|
+
* @see getComment
|
|
2773
|
+
*/
|
|
2774
|
+
setComment(name: string, newValue: string, locNotification?: any): void;
|
|
2775
|
+
/**
|
|
2776
|
+
* Deletes an answer from survey results.
|
|
2777
|
+
* @param {string} name An object property that stores the answer to delete. Pass a question's [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName) or [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
2778
|
+
*/
|
|
2779
|
+
clearValue(name: string): void;
|
|
2780
|
+
/**
|
|
2781
|
+
* Specifies whether to remove disabled choices from the value in [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model), [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model), and [Radio Button Group](https://surveyjs.io/form-library/documentation/api-reference/radio-button-question-model) questions.
|
|
2782
|
+
*
|
|
2783
|
+
* Default value: `false`
|
|
2784
|
+
*
|
|
2785
|
+
* > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
|
|
2786
|
+
*/
|
|
2787
|
+
get clearDisabledChoices(): boolean;
|
|
2788
|
+
set clearDisabledChoices(val: boolean);
|
|
2789
|
+
/**
|
|
2790
|
+
* @deprecated Use the [`clearDisabledChoices`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#clearDisabledChoices) property instead.
|
|
2791
|
+
*/
|
|
2792
|
+
get clearValueOnDisableItems(): boolean;
|
|
2793
|
+
set clearValueOnDisableItems(val: boolean);
|
|
2794
|
+
getQuestionClearIfInvisible(questionClearIf: string): string;
|
|
2795
|
+
questionVisibilityChanged(question: Question, newValue: boolean, resetIndexes: boolean): void;
|
|
2796
|
+
pageVisibilityChanged(page: PageModel, newValue: boolean): void;
|
|
2797
|
+
panelVisibilityChanged(panel: PanelModel, newValue: boolean): void;
|
|
2798
|
+
questionCreated(question: Question): any;
|
|
2799
|
+
questionAdded(question: Question, index: number, parentPanel: any, rootPanel: any): void;
|
|
2800
|
+
private canFireAddElement;
|
|
2801
|
+
questionRemoved(question: Question): void;
|
|
2802
|
+
questionRenamed(question: IQuestion, oldName: string, oldValueName: string): any;
|
|
2803
|
+
private questionHashes;
|
|
2804
|
+
private questionHashesClear;
|
|
2805
|
+
private questionHashesPanelAdded;
|
|
2806
|
+
private questionHashesAdded;
|
|
2807
|
+
private questionHashesRemoved;
|
|
2808
|
+
private questionHashAddedCore;
|
|
2809
|
+
private questionHashRemovedCore;
|
|
2810
|
+
panelAdded(panel: PanelModel, index: number, parentPanel: any, rootPanel: any): void;
|
|
2811
|
+
panelRemoved(panel: PanelModel): void;
|
|
2812
|
+
validateQuestion(question: Question, errors: Array<SurveyError>, fireCallback: boolean): void;
|
|
2813
|
+
validatePanel(panel: PanelModel, errors: Array<SurveyError>, fireCallback: boolean): void;
|
|
2814
|
+
processHtml(html: string, reason?: string): string;
|
|
2815
|
+
processText(text: string, returnDisplayValue: boolean): string;
|
|
2816
|
+
processTextEx(params: ITextProcessorProp): ITextProcessorResult;
|
|
2817
|
+
private textPreProcessorValue;
|
|
2818
|
+
private get textPreProcessor();
|
|
2819
|
+
getSurveyMarkdownHtml(element: Question | PanelModel | PageModel | SurveyModel, text: string, name: string): string;
|
|
2820
|
+
getCorrectedAnswerCount(): number;
|
|
2821
|
+
/**
|
|
2822
|
+
* Returns the number of correct answers in a quiz.
|
|
2823
|
+
*
|
|
2824
|
+
* For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
2825
|
+
* @returns The number of correct answers in a quiz.
|
|
2826
|
+
* @see getQuizQuestionCount
|
|
2827
|
+
* @see getIncorrectAnswerCount
|
|
2828
|
+
*/
|
|
2829
|
+
getCorrectAnswerCount(): number;
|
|
2830
|
+
/**
|
|
2831
|
+
* Returns the number of quiz questions. A question counts if it is visible, has an input field, and specifies [`correctAnswer`](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#correctAnswer).
|
|
2832
|
+
*
|
|
2833
|
+
* This number may be different from `getQuizQuestions().length` because certain question types (for instance, matrix-like types) include more than one question.
|
|
2834
|
+
*
|
|
2835
|
+
* For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
2836
|
+
* @returns The number of quiz questions.
|
|
2837
|
+
* @see getQuizQuestions
|
|
2838
|
+
*/
|
|
2839
|
+
getQuizQuestionCount(): number;
|
|
2840
|
+
getInCorrectedAnswerCount(): number;
|
|
2841
|
+
getInCorrectAnswerCount(): number;
|
|
2842
|
+
/**
|
|
2843
|
+
* Returns the number of incorrect answers in a quiz.
|
|
2844
|
+
*
|
|
2845
|
+
* For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
2846
|
+
* @returns The number of incorrect answers in a quiz.
|
|
2847
|
+
* @see getCorrectAnswerCount
|
|
2848
|
+
*/
|
|
2849
|
+
getIncorrectAnswerCount(): number;
|
|
2850
|
+
onCorrectQuestionAnswer(question: IQuestion, options: any): void;
|
|
2851
|
+
private getCorrectedAnswerCountCore;
|
|
2852
|
+
getCorrectedAnswers(): number;
|
|
2853
|
+
getInCorrectedAnswers(): number;
|
|
2854
|
+
/**
|
|
2855
|
+
* @deprecated Use the [`showTimer`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer) and [`timerLocation`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerLocation) properties instead.
|
|
2856
|
+
*/
|
|
2857
|
+
get showTimerPanel(): string;
|
|
2858
|
+
set showTimerPanel(val: string);
|
|
2859
|
+
/**
|
|
2860
|
+
* Specifies the timer's visibility. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
2861
|
+
*
|
|
2862
|
+
* Default value: `false`
|
|
2863
|
+
*
|
|
2864
|
+
* If you set this property to `true`, the timer starts automatically when the survey begins. To specify time limits, use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimit) and [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimitPerPage) properties.
|
|
2865
|
+
*
|
|
2866
|
+
* The timer displays information about time spent on an individual page and the entire survey. If you want to display only the page timer or the survey timer, set the [`timerInfoMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerInfoMode) property to `"page"` or `"survey"`.
|
|
2867
|
+
*
|
|
2868
|
+
* You can enable the timer without displaying it. In this case, you need to specify the required time limits and use the [`startTimer()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startTimer) and [`stopTimer()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#stopTimer) methods to control the timer.
|
|
2869
|
+
* @see timerLocation
|
|
2870
|
+
* @see timeSpent
|
|
2871
|
+
* @see onTimerTick
|
|
2872
|
+
*/
|
|
2873
|
+
get showTimer(): boolean;
|
|
2874
|
+
set showTimer(val: boolean);
|
|
2875
|
+
/**
|
|
2876
|
+
* Specifies the timer's position relative to the survey. Applies only if the [`showTimer`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer) property is set to `true`.
|
|
2877
|
+
*
|
|
2878
|
+
* Possible values:
|
|
2879
|
+
*
|
|
2880
|
+
* - `"top"` (default) - Displays the timer at the top of the survey.
|
|
2881
|
+
* - `"bottom"` - Displays the timer at the bottom of the survey.
|
|
2882
|
+
* @see onTimerTick
|
|
2883
|
+
*/
|
|
2884
|
+
get timerLocation(): string;
|
|
2885
|
+
set timerLocation(val: string);
|
|
2886
|
+
get isTimerPanelShowingOnTop(): boolean;
|
|
2887
|
+
get isTimerPanelShowingOnBottom(): boolean;
|
|
2888
|
+
/**
|
|
2889
|
+
* Specifies whether the timer panel displays timers for the current page, the entire survey, or both. Applies only if the timer panel is [visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer).
|
|
2890
|
+
*
|
|
2891
|
+
* Possible values:
|
|
2892
|
+
*
|
|
2893
|
+
* - `"survey"` - Displays only the survey timer.
|
|
2894
|
+
* - `"page"` - Displays only the page timer.
|
|
2895
|
+
* - `"combined"` (default) - Displays both the survey and page timers.
|
|
2896
|
+
* @see timeSpent
|
|
2897
|
+
* @see onTimerTick
|
|
2898
|
+
* @see startTimer
|
|
2899
|
+
* @see stopTimer
|
|
2900
|
+
*/
|
|
2901
|
+
get timerInfoMode(): string;
|
|
2902
|
+
set timerInfoMode(val: string);
|
|
2903
|
+
private getTimerInfoVal;
|
|
2904
|
+
/**
|
|
2905
|
+
* @deprecated Use the [`timerInfoMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerInfoMode) property instead.
|
|
2906
|
+
*/
|
|
2907
|
+
get showTimerPanelMode(): string;
|
|
2908
|
+
set showTimerPanelMode(val: string);
|
|
2909
|
+
/**
|
|
2910
|
+
* Enables the grid layout, which structures form elements using a column-based system.
|
|
2911
|
+
*
|
|
2912
|
+
* Default value: `false`
|
|
2913
|
+
*
|
|
2914
|
+
* Specify the [`gridLayoutColumns`](https://surveyjs.io/form-library/documentation/api-reference/page-model#gridLayoutColumns) property for pages and panels to configure layout columns. Set the [`colSpan`](https://surveyjs.io/form-library/documentation/api-reference/question#colSpan) property for an individual question or panel to adjust how many columns this survey element spans.
|
|
2915
|
+
*/
|
|
2916
|
+
gridLayoutEnabled: boolean;
|
|
2917
|
+
updateGridColumns(): void;
|
|
2918
|
+
/**
|
|
2919
|
+
* Specifies how to calculate the survey width.
|
|
2920
|
+
*
|
|
2921
|
+
* Possible values:
|
|
2922
|
+
*
|
|
2923
|
+
* - `"static"` - A survey has a [fixed width](#width).
|
|
2924
|
+
* - `"responsive"` - A survey occupies all available horizontal space and stretches or shrinks horizontally to fit in the screen size.
|
|
2925
|
+
* - `"auto"` (default) - Survey width depends on a question type and corresponds to the `"static"` or `"responsive"` mode.
|
|
2926
|
+
*/
|
|
2927
|
+
get widthMode(): string;
|
|
2928
|
+
set widthMode(val: string);
|
|
2929
|
+
private calculatedWidthModeUpdater;
|
|
2930
|
+
setCalculatedWidthModeUpdater(): void;
|
|
2931
|
+
calculatedWidthMode: string;
|
|
2932
|
+
calculateWidthMode(): string;
|
|
2933
|
+
/**
|
|
2934
|
+
* A survey width in CSS values.
|
|
2935
|
+
*
|
|
2936
|
+
* Default value: `undefined` (the survey inherits the width from its container)
|
|
2937
|
+
* @see onResize
|
|
2938
|
+
*/
|
|
2939
|
+
get width(): string;
|
|
2940
|
+
set width(val: string);
|
|
2941
|
+
get renderedWidth(): string;
|
|
2942
|
+
widthScale: number;
|
|
2943
|
+
staticStartWidth: number;
|
|
2944
|
+
setStaticStartWidth(width: number): void;
|
|
2945
|
+
responsiveStartWidth: number;
|
|
2946
|
+
setResponsiveStartWidth(width: number): void;
|
|
2947
|
+
get isScaled(): boolean;
|
|
2948
|
+
get timerInfo(): {
|
|
2949
|
+
spent: number;
|
|
2950
|
+
limit?: number;
|
|
2951
|
+
};
|
|
2952
|
+
get timerClock(): {
|
|
2953
|
+
majorText: string;
|
|
2954
|
+
minorText?: string;
|
|
2955
|
+
};
|
|
2956
|
+
get timerInfoText(): string;
|
|
2957
|
+
private getTimerInfo;
|
|
2958
|
+
private getTimerInfoText;
|
|
2959
|
+
private getTimerInfoPageText;
|
|
2960
|
+
private getTimerInfoSurveyText;
|
|
2961
|
+
private getDisplayClockTime;
|
|
2962
|
+
private getDisplayTime;
|
|
2963
|
+
get timerModel(): SurveyTimerModel;
|
|
2964
|
+
/**
|
|
2965
|
+
* Starts a timer that calculates how many seconds a respondent has spent on the survey. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
2966
|
+
* @see stopTimer
|
|
2967
|
+
* @see timeLimit
|
|
2968
|
+
* @see timeLimitPerPage
|
|
2969
|
+
* @see timeSpent
|
|
2970
|
+
* @see onTimerTick
|
|
2971
|
+
*/
|
|
2972
|
+
startTimer(): void;
|
|
2973
|
+
startTimerFromUI(): void;
|
|
2974
|
+
/**
|
|
2975
|
+
* Stops the timer. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
2976
|
+
* @see startTimer
|
|
2977
|
+
* @see timeLimit
|
|
2978
|
+
* @see timeLimitPerPage
|
|
2979
|
+
* @see timeSpent
|
|
2980
|
+
* @see onTimerTick
|
|
2981
|
+
*/
|
|
2982
|
+
stopTimer(): void;
|
|
2983
|
+
/**
|
|
2984
|
+
* A time period that a respondent has spent on the survey so far; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
2985
|
+
*
|
|
2986
|
+
* Assign a number to this property if you need to start the quiz timer from a specific time (for instance, if you want to continue an interrupted quiz).
|
|
2987
|
+
*
|
|
2988
|
+
* You can also find out how many seconds a respondent has spent on an individual survey page. To do this, use the [`timeSpent`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeSpent) property of a [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) object.
|
|
2989
|
+
* @see timeLimit
|
|
2990
|
+
* @see timeLimitPerPage
|
|
2991
|
+
* @see startTimer
|
|
2992
|
+
*/
|
|
2993
|
+
get timeSpent(): number;
|
|
2994
|
+
set timeSpent(val: number);
|
|
2995
|
+
/**
|
|
2996
|
+
* A time period that a respondent has to complete the survey; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
2997
|
+
*
|
|
2998
|
+
* Default value: 0 (time is unlimited)
|
|
2999
|
+
*
|
|
3000
|
+
* [View Demo](https://surveyjs.io/form-library/examples/make-quiz-javascript/ (linkStyle))
|
|
3001
|
+
* @see timeLimitPerPage
|
|
3002
|
+
* @see startTimer
|
|
3003
|
+
* @see timeSpent
|
|
3004
|
+
*/
|
|
3005
|
+
get timeLimit(): number;
|
|
3006
|
+
set timeLimit(val: number);
|
|
3007
|
+
/**
|
|
3008
|
+
* @deprecated Use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimit) property instead.
|
|
3009
|
+
*/
|
|
3010
|
+
get maxTimeToFinish(): number;
|
|
3011
|
+
set maxTimeToFinish(val: number);
|
|
3012
|
+
/**
|
|
3013
|
+
* A time period that a respondent has to complete each survey page; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
3014
|
+
*
|
|
3015
|
+
* Default value: 0 (time is unlimited)
|
|
3016
|
+
*
|
|
3017
|
+
* You can also use `PageModel`'s [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeLimit) property to specify a time period for an individual survey page.
|
|
3018
|
+
*
|
|
3019
|
+
* [View Demo](https://surveyjs.io/form-library/examples/make-quiz-javascript/ (linkStyle))
|
|
3020
|
+
* @see timeLimit
|
|
3021
|
+
* @see startTimer
|
|
3022
|
+
* @see timeSpent
|
|
3023
|
+
*/
|
|
3024
|
+
get timeLimitPerPage(): number;
|
|
3025
|
+
set timeLimitPerPage(val: number);
|
|
3026
|
+
/**
|
|
3027
|
+
* @deprecated Use the [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimitPerPage) property instead.
|
|
3028
|
+
*/
|
|
3029
|
+
get maxTimeToFinishPage(): number;
|
|
3030
|
+
set maxTimeToFinishPage(val: number);
|
|
3031
|
+
private doTimer;
|
|
3032
|
+
get inSurvey(): boolean;
|
|
3033
|
+
getSurveyData(): ISurveyData;
|
|
3034
|
+
getSurvey(): ISurvey;
|
|
3035
|
+
getTextProcessor(): ITextProcessor;
|
|
3036
|
+
getObjects(pages: string[], questions: string[]): any[];
|
|
3037
|
+
setTriggerValue(name: string, value: any, isVariable: boolean): void;
|
|
3038
|
+
copyTriggerValue(name: string, fromName: string, copyDisplayValue: boolean): void;
|
|
3039
|
+
triggerExecuted(trigger: Trigger): void;
|
|
3040
|
+
private setValueFromTriggerCounter;
|
|
3041
|
+
get isSettingValueFromTrigger(): boolean;
|
|
3042
|
+
private startSetValueFromTrigger;
|
|
3043
|
+
private finishSetValueFromTrigger;
|
|
3044
|
+
private focusingQuestionInfo;
|
|
3045
|
+
private isMovingQuestion;
|
|
3046
|
+
startMovingQuestion(): void;
|
|
3047
|
+
stopMovingQuestion(): void;
|
|
3048
|
+
get isQuestionDragging(): boolean;
|
|
3049
|
+
needRenderIcons: boolean;
|
|
3050
|
+
private skippedPages;
|
|
3051
|
+
/**
|
|
3052
|
+
* Focuses a question with a specified name. Switches the current page if needed.
|
|
3053
|
+
* @param name A question name.
|
|
3054
|
+
* @returns `false` if the survey does not contain a question with a specified name or this question is hidden; otherwise, `true`.
|
|
3055
|
+
* @see focusFirstQuestion
|
|
3056
|
+
* @see autoFocusFirstQuestion
|
|
3057
|
+
*/
|
|
3058
|
+
focusQuestion(name: string): boolean;
|
|
3059
|
+
focusQuestionByInstance(question: Question, onError?: boolean): boolean;
|
|
3060
|
+
private focusQuestionInfo;
|
|
3061
|
+
questionEditFinishCallback(question: Question, event: any): void;
|
|
3062
|
+
private elementWrapperComponentNameCore;
|
|
3063
|
+
private elementWrapperDataCore;
|
|
3064
|
+
getElementWrapperComponentName(element: any, reason?: string): string;
|
|
3065
|
+
getQuestionContentWrapperComponentName(element: any): string;
|
|
3066
|
+
getRowWrapperComponentName(row: QuestionRowModel): string;
|
|
3067
|
+
getItemValueWrapperComponentName(item: ItemValue, question: QuestionSelectBase): string;
|
|
3068
|
+
getElementWrapperComponentData(element: any, reason?: string): any;
|
|
3069
|
+
getRowWrapperComponentData(row: QuestionRowModel): any;
|
|
3070
|
+
getItemValueWrapperComponentData(item: ItemValue, question: QuestionSelectBase): any;
|
|
3071
|
+
getMatrixCellTemplateData(cell: any): any;
|
|
3072
|
+
searchText(text: string): Array<IFindElement>;
|
|
3073
|
+
skeletonComponentName: string;
|
|
3074
|
+
getSkeletonComponentName(element: ISurveyElement): string;
|
|
3075
|
+
private layoutElements;
|
|
3076
|
+
/**
|
|
3077
|
+
* Adds an element to the survey layout.
|
|
3078
|
+
*
|
|
3079
|
+
* This method accepts an object with the following layout element properties:
|
|
3080
|
+
*
|
|
3081
|
+
* - `id`: `string` | `"timerpanel"` | `"progress-buttons"` | `"progress-questions"` | `"progress-pages"` | `"progress-correctquestions"` | `"progress-requiredquestions"` | `"toc-navigation"` | `"buttons-navigation"`\
|
|
3082
|
+
* A layout element identifier. You can use possible values to access and relocate or customize predefined layout elements.
|
|
3083
|
+
*
|
|
3084
|
+
* - `container`: `"header"` | `"footer"` | `"left"` | `"right"` | `"contentTop"` | `"contentBottom"`\
|
|
3085
|
+
* A layout container that holds the element. If you want to display the element within multiple containers, set this property to an array of possible values.
|
|
3086
|
+
*
|
|
3087
|
+
* - `component`: `string`\
|
|
3088
|
+
* The name of the component that renders the layout element.
|
|
3089
|
+
*
|
|
3090
|
+
* - `data`: `any`\
|
|
3091
|
+
* Data passed as props to `component`.
|
|
3092
|
+
*
|
|
3093
|
+
* [View Demo](https://surveyjs.io/form-library/examples/progress-bar-with-percentage/ (linkStyle))
|
|
3094
|
+
* @param layoutElement A layout element configuration.
|
|
3095
|
+
* @returns The configuration of the previous layout element with the same `id`.
|
|
3096
|
+
*/
|
|
3097
|
+
addLayoutElement(layoutElement: ISurveyLayoutElement): ISurveyLayoutElement;
|
|
3098
|
+
findLayoutElement(layoutElementId: string): ISurveyLayoutElement;
|
|
3099
|
+
removeLayoutElement(layoutElementId: string): ISurveyLayoutElement;
|
|
3100
|
+
getContainerContent(container: LayoutElementContainer): any[];
|
|
3101
|
+
processPopupVisiblityChanged(question: Question, popup: PopupModel<any>, visible: boolean): void;
|
|
3102
|
+
processOpenDropdownMenu(question: Question, options: IDropdownMenuOptions): void;
|
|
3103
|
+
getCssTitleExpandableSvg(): string;
|
|
3104
|
+
/**
|
|
3105
|
+
* Applies a specified theme to the survey.
|
|
3106
|
+
*
|
|
3107
|
+
* [Themes & Styles](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles (linkStyle))
|
|
3108
|
+
* @param theme An [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme) object with theme settings.
|
|
3109
|
+
*/
|
|
3110
|
+
applyTheme(theme: ITheme): void;
|
|
3111
|
+
themeChanged(theme: ITheme): void;
|
|
3112
|
+
private taskManager;
|
|
3113
|
+
/**
|
|
3114
|
+
* Disposes of the survey model.
|
|
3115
|
+
*
|
|
3116
|
+
* Call this method to release resources if your application contains multiple survey models or if you re-create a survey model at runtime.
|
|
3117
|
+
*/
|
|
3118
|
+
dispose(): void;
|
|
3119
|
+
disposeCallback: () => void;
|
|
3120
|
+
private onScrollCallback;
|
|
3121
|
+
_isElementShouldBeSticky(selector: string): boolean;
|
|
3122
|
+
onScroll(): void;
|
|
3123
|
+
addScrollEventListener(): void;
|
|
3124
|
+
removeScrollEventListener(): void;
|
|
3125
|
+
questionErrorComponent: string;
|
|
3126
|
+
}
|