survey-core 1.12.15 → 1.12.16
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/defaultV2.css +8 -8
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +8 -8
- 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/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/icons/iconsV1.js +1 -1
- package/icons/iconsV1.min.js +1 -1
- package/icons/iconsV2.js +1 -1
- package/icons/iconsV2.min.js +1 -1
- package/modern.css +15 -15
- package/modern.css.map +1 -1
- package/modern.fontless.css +15 -15
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- 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 +504 -263
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- 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.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
- 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 +1 -0
- package/ts3.4/typings/packages/survey-core/src/page.d.ts +11 -3
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +11 -7
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/settings.d.ts +2 -1
- package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +16 -5
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +15 -8
- package/ts3.4/typings/packages/survey-core/src/surveyStrings.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +11 -2
- package/ts3.4/typings/packages/survey-core/src/validator.d.ts +1 -1
- package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
- package/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
- package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/packages/survey-core/src/page.d.ts +11 -3
- package/typings/packages/survey-core/src/panel.d.ts +11 -7
- package/typings/packages/survey-core/src/question.d.ts +3 -0
- package/typings/packages/survey-core/src/settings.d.ts +2 -1
- package/typings/packages/survey-core/src/survey-element.d.ts +16 -5
- package/typings/packages/survey-core/src/survey.d.ts +16 -8
- package/typings/packages/survey-core/src/surveyStrings.d.ts +1 -0
- package/typings/packages/survey-core/src/utils/utils.d.ts +11 -2
- package/typings/packages/survey-core/src/validator.d.ts +1 -1
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.16
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -105,7 +105,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
105
105
|
/*!*******************************************!*\
|
|
106
106
|
!*** ./src/entries/core.ts + 127 modules ***!
|
|
107
107
|
\*******************************************/
|
|
108
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionFilePage, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, getLocaleString, setupLocale, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, renamedIcons, getIconNameFromProxy, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgThemeSets, addIconsToThemeSet, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, activateLazyRenderingChecks, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
108
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionFilePage, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, getLocaleString, getLocaleStrings, setupLocale, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, renamedIcons, getIconNameFromProxy, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgThemeSets, addIconsToThemeSet, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, activateLazyRenderingChecks, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
109
109
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
110
110
|
|
|
111
111
|
"use strict";
|
|
@@ -267,6 +267,7 @@ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return
|
|
|
267
267
|
__webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return /* reexport */ surveyLocalization; });
|
|
268
268
|
__webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return /* reexport */ surveyStrings; });
|
|
269
269
|
__webpack_require__.d(__webpack_exports__, "getLocaleString", function() { return /* reexport */ getLocaleString; });
|
|
270
|
+
__webpack_require__.d(__webpack_exports__, "getLocaleStrings", function() { return /* reexport */ getLocaleStrings; });
|
|
270
271
|
__webpack_require__.d(__webpack_exports__, "setupLocale", function() { return /* reexport */ setupLocale; });
|
|
271
272
|
__webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return /* reexport */ QuestionCustomWidget; });
|
|
272
273
|
__webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return /* reexport */ questionCustomWidgets_CustomWidgetCollection; });
|
|
@@ -1247,6 +1248,9 @@ function getLocaleString(strName, locale) {
|
|
|
1247
1248
|
if (locale === void 0) { locale = null; }
|
|
1248
1249
|
return surveyLocalization.getString(strName, locale);
|
|
1249
1250
|
}
|
|
1251
|
+
function getLocaleStrings(locale) {
|
|
1252
|
+
return surveyLocalization.getLocaleStrings(locale);
|
|
1253
|
+
}
|
|
1250
1254
|
function setupLocale(localeConfig) {
|
|
1251
1255
|
surveyLocalization.setupLocale(localeConfig);
|
|
1252
1256
|
}
|
|
@@ -3883,6 +3887,24 @@ function dateDiff(params) {
|
|
|
3883
3887
|
return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
|
|
3884
3888
|
}
|
|
3885
3889
|
functionsfactory_FunctionFactory.Instance.register("dateDiff", dateDiff);
|
|
3890
|
+
function dateAdd(params) {
|
|
3891
|
+
if (!Array.isArray(params) || params.length < 2 || !params[0] || !params[1])
|
|
3892
|
+
return null;
|
|
3893
|
+
var date = createDate("function-dateAdd", params[0]);
|
|
3894
|
+
var valToAdd = params[1];
|
|
3895
|
+
var interval = params[2] || "days";
|
|
3896
|
+
if (interval === "days") {
|
|
3897
|
+
date.setDate(date.getDate() + valToAdd);
|
|
3898
|
+
}
|
|
3899
|
+
if (interval === "months") {
|
|
3900
|
+
date.setMonth(date.getMonth() + valToAdd);
|
|
3901
|
+
}
|
|
3902
|
+
if (interval === "years") {
|
|
3903
|
+
date.setFullYear(date.getFullYear() + valToAdd);
|
|
3904
|
+
}
|
|
3905
|
+
return date;
|
|
3906
|
+
}
|
|
3907
|
+
functionsfactory_FunctionFactory.Instance.register("dateAdd", dateAdd);
|
|
3886
3908
|
function isContainerReadyCore(container) {
|
|
3887
3909
|
if (!container)
|
|
3888
3910
|
return false;
|
|
@@ -11958,7 +11980,13 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
|
11958
11980
|
Object.defineProperty(SurveyElementCore.prototype, "isPage", {
|
|
11959
11981
|
/**
|
|
11960
11982
|
* Returns `true` if the survey element is a page.
|
|
11961
|
-
*
|
|
11983
|
+
*
|
|
11984
|
+
* This property returns `false` for [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) objects in the following cases:
|
|
11985
|
+
*
|
|
11986
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
|
11987
|
+
* - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
|
11988
|
+
*
|
|
11989
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
|
|
11962
11990
|
*/
|
|
11963
11991
|
get: function () { return false; },
|
|
11964
11992
|
enumerable: false,
|
|
@@ -11966,8 +11994,14 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
|
11966
11994
|
});
|
|
11967
11995
|
Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
|
|
11968
11996
|
/**
|
|
11969
|
-
* Returns `true` if the survey element is a panel.
|
|
11970
|
-
*
|
|
11997
|
+
* Returns `true` if the survey element is a panel or acts as one.
|
|
11998
|
+
*
|
|
11999
|
+
* This property returns `true` for `PageModel` objects in the following cases:
|
|
12000
|
+
*
|
|
12001
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
|
12002
|
+
* - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
|
12003
|
+
*
|
|
12004
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
|
|
11971
12005
|
*/
|
|
11972
12006
|
get: function () { return false; },
|
|
11973
12007
|
enumerable: false,
|
|
@@ -11976,7 +12010,6 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
|
11976
12010
|
Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
|
|
11977
12011
|
/**
|
|
11978
12012
|
* Returns `true` if the survey element is a question.
|
|
11979
|
-
* @see Base.getType
|
|
11980
12013
|
*/
|
|
11981
12014
|
get: function () { return false; },
|
|
11982
12015
|
enumerable: false,
|
|
@@ -11985,7 +12018,6 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
|
11985
12018
|
Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
|
|
11986
12019
|
/**
|
|
11987
12020
|
* Returns `true` if the element is a survey.
|
|
11988
|
-
* @see Base.getType
|
|
11989
12021
|
*/
|
|
11990
12022
|
get: function () { return false; },
|
|
11991
12023
|
enumerable: false,
|
|
@@ -12744,9 +12776,11 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
12744
12776
|
SurveyElement.prototype.createCssClassesValue = function () {
|
|
12745
12777
|
var res = this.calcCssClasses(this.css);
|
|
12746
12778
|
this.setPropertyValue("cssClassesValue", res);
|
|
12779
|
+
this.onCalcCssClasses(res);
|
|
12747
12780
|
this.updateElementCssCore(this.cssClassesValue);
|
|
12748
12781
|
return res;
|
|
12749
12782
|
};
|
|
12783
|
+
SurveyElement.prototype.onCalcCssClasses = function (classes) { };
|
|
12750
12784
|
Object.defineProperty(SurveyElement.prototype, "cssClasses", {
|
|
12751
12785
|
/**
|
|
12752
12786
|
* Returns an object in which keys are UI elements and values are CSS classes applied to them.
|
|
@@ -13000,7 +13034,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13000
13034
|
SurveyElement.prototype.getPage = function (parent) {
|
|
13001
13035
|
while (parent && parent.parent)
|
|
13002
13036
|
parent = parent.parent;
|
|
13003
|
-
if (parent && parent.
|
|
13037
|
+
if (parent && parent.isPage)
|
|
13004
13038
|
return parent;
|
|
13005
13039
|
return null;
|
|
13006
13040
|
};
|
|
@@ -13052,7 +13086,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13052
13086
|
});
|
|
13053
13087
|
Object.defineProperty(SurveyElement.prototype, "hasParent", {
|
|
13054
13088
|
get: function () {
|
|
13055
|
-
return (this.parent && !this.parent.isPage
|
|
13089
|
+
return (this.parent && !this.parent.isPage) || (this.parent === undefined);
|
|
13056
13090
|
},
|
|
13057
13091
|
enumerable: false,
|
|
13058
13092
|
configurable: true
|
|
@@ -13239,9 +13273,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13239
13273
|
}
|
|
13240
13274
|
}
|
|
13241
13275
|
if (Object.keys(style).length == 0) {
|
|
13242
|
-
var minWidth = this.minWidth;
|
|
13243
|
-
if (minWidth != "auto")
|
|
13276
|
+
var minWidth = "" + this.minWidth;
|
|
13277
|
+
if (!!minWidth && minWidth != "auto") {
|
|
13278
|
+
if (minWidth.indexOf("px") != -1 && this.survey) {
|
|
13279
|
+
minWidth = minWidth.replace("px", "");
|
|
13280
|
+
var minWidthNum = parseFloat(minWidth);
|
|
13281
|
+
if (!isNaN(minWidthNum)) {
|
|
13282
|
+
minWidth = minWidthNum * this.survey.widthScale / 100;
|
|
13283
|
+
minWidth = "" + minWidth + "px";
|
|
13284
|
+
}
|
|
13285
|
+
}
|
|
13244
13286
|
minWidth = "min(100%, " + minWidth + ")";
|
|
13287
|
+
}
|
|
13245
13288
|
if (this.allowRootStyle && this.renderWidth) {
|
|
13246
13289
|
// style["width"] = this.renderWidth;
|
|
13247
13290
|
style["flexGrow"] = 1;
|
|
@@ -13312,6 +13355,8 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13312
13355
|
return null;
|
|
13313
13356
|
};
|
|
13314
13357
|
SurveyElement.prototype.getCssTitle = function (cssClasses) {
|
|
13358
|
+
if (!cssClasses)
|
|
13359
|
+
return "";
|
|
13315
13360
|
var isExpandable = this.state !== "default";
|
|
13316
13361
|
var numInlineLimit = 4;
|
|
13317
13362
|
return new CssClassBuilder()
|
|
@@ -14211,18 +14256,18 @@ function confirmAction(message) {
|
|
|
14211
14256
|
return settings.confirmActionFunc(message);
|
|
14212
14257
|
return confirm(message);
|
|
14213
14258
|
}
|
|
14214
|
-
function confirmActionAsync(
|
|
14259
|
+
function confirmActionAsync(options) {
|
|
14215
14260
|
var callbackFunc = function (res) {
|
|
14216
14261
|
if (res)
|
|
14217
|
-
funcOnYes();
|
|
14218
|
-
else if (!!funcOnNo)
|
|
14219
|
-
funcOnNo();
|
|
14262
|
+
options.funcOnYes();
|
|
14263
|
+
else if (!!options.funcOnNo)
|
|
14264
|
+
options.funcOnNo();
|
|
14220
14265
|
};
|
|
14221
14266
|
if (!!settings && !!settings.confirmActionAsync) {
|
|
14222
|
-
if (settings.confirmActionAsync(message, callbackFunc,
|
|
14267
|
+
if (settings.confirmActionAsync(options.message, callbackFunc, options))
|
|
14223
14268
|
return;
|
|
14224
14269
|
}
|
|
14225
|
-
callbackFunc(confirmAction(message));
|
|
14270
|
+
callbackFunc(confirmAction(options.message));
|
|
14226
14271
|
}
|
|
14227
14272
|
function detectIEBrowser() {
|
|
14228
14273
|
var ua = navigator.userAgent;
|
|
@@ -14758,7 +14803,7 @@ var Logger = /** @class */ (function () {
|
|
|
14758
14803
|
return Logger;
|
|
14759
14804
|
}());
|
|
14760
14805
|
|
|
14761
|
-
function showConfirmDialog(message, callback,
|
|
14806
|
+
function showConfirmDialog(message, callback, options) {
|
|
14762
14807
|
var locStr = new localizablestring_LocalizableString(undefined);
|
|
14763
14808
|
var popupViewModel = settings.showDialog({
|
|
14764
14809
|
componentName: "sv-string-viewer",
|
|
@@ -14771,17 +14816,17 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
|
|
|
14771
14816
|
callback(false);
|
|
14772
14817
|
return false;
|
|
14773
14818
|
},
|
|
14774
|
-
title: message,
|
|
14819
|
+
title: message || options.message,
|
|
14775
14820
|
displayMode: "popup",
|
|
14776
14821
|
isFocusedContent: false,
|
|
14777
|
-
cssClass: "sv-popup--confirm
|
|
14778
|
-
}, rootElement);
|
|
14822
|
+
cssClass: options.cssClass || "sv-popup--confirm"
|
|
14823
|
+
}, options.rootElement);
|
|
14779
14824
|
var toolbar = popupViewModel.footerToolbar;
|
|
14780
14825
|
var applyBtn = toolbar.getActionById("apply");
|
|
14781
14826
|
var cancelBtn = toolbar.getActionById("cancel");
|
|
14782
|
-
cancelBtn.title = getLocaleString("cancel", locale);
|
|
14827
|
+
cancelBtn.title = getLocaleString("cancel", options.locale);
|
|
14783
14828
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
|
14784
|
-
applyBtn.title = applyTitle || getLocaleString("ok", locale);
|
|
14829
|
+
applyBtn.title = options.applyTitle || getLocaleString("ok", options.locale);
|
|
14785
14830
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
|
14786
14831
|
configConfirmDialog(popupViewModel);
|
|
14787
14832
|
return true;
|
|
@@ -15398,8 +15443,8 @@ var settings = {
|
|
|
15398
15443
|
* @param message A message to be displayed in the confirm dialog window.
|
|
15399
15444
|
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
|
15400
15445
|
*/
|
|
15401
|
-
confirmActionAsync: function (message, callback,
|
|
15402
|
-
return showConfirmDialog(message, callback,
|
|
15446
|
+
confirmActionAsync: function (message, callback, options) {
|
|
15447
|
+
return showConfirmDialog(message, callback, options);
|
|
15403
15448
|
},
|
|
15404
15449
|
/**
|
|
15405
15450
|
* A minimum width value for all survey elements.
|
|
@@ -16628,7 +16673,7 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
|
16628
16673
|
});
|
|
16629
16674
|
Object.defineProperty(ExpressionValidator.prototype, "isAsync", {
|
|
16630
16675
|
get: function () {
|
|
16631
|
-
if (!this.ensureConditionRunner())
|
|
16676
|
+
if (!this.ensureConditionRunner(false))
|
|
16632
16677
|
return false;
|
|
16633
16678
|
return this.conditionRunner.isAsync;
|
|
16634
16679
|
},
|
|
@@ -16647,8 +16692,12 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
|
16647
16692
|
if (name === void 0) { name = null; }
|
|
16648
16693
|
if (values === void 0) { values = null; }
|
|
16649
16694
|
if (properties === void 0) { properties = null; }
|
|
16650
|
-
if (!this.
|
|
16695
|
+
if (!this.expression)
|
|
16651
16696
|
return null;
|
|
16697
|
+
if (!!this.conditionRunner) {
|
|
16698
|
+
this.conditionRunner.onRunComplete = null;
|
|
16699
|
+
}
|
|
16700
|
+
this.ensureConditionRunner(true);
|
|
16652
16701
|
this.conditionRunner.onRunComplete = function (res) {
|
|
16653
16702
|
_this.isRunningValue = false;
|
|
16654
16703
|
if (!!_this.onAsyncCompleted) {
|
|
@@ -16671,14 +16720,15 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
|
16671
16720
|
ExpressionValidator.prototype.getDefaultErrorText = function (name) {
|
|
16672
16721
|
return this.getLocalizationFormatString("invalidExpression", this.expression);
|
|
16673
16722
|
};
|
|
16674
|
-
ExpressionValidator.prototype.ensureConditionRunner = function () {
|
|
16675
|
-
if (!!this.conditionRunner) {
|
|
16676
|
-
this.conditionRunner.expression = this.expression;
|
|
16677
|
-
return true;
|
|
16678
|
-
}
|
|
16723
|
+
ExpressionValidator.prototype.ensureConditionRunner = function (reNew) {
|
|
16679
16724
|
if (!this.expression)
|
|
16680
16725
|
return false;
|
|
16681
|
-
|
|
16726
|
+
if (reNew || !this.conditionRunner) {
|
|
16727
|
+
this.conditionRunner = new ConditionRunner(this.expression);
|
|
16728
|
+
}
|
|
16729
|
+
else {
|
|
16730
|
+
this.conditionRunner.expression = this.expression;
|
|
16731
|
+
}
|
|
16682
16732
|
return true;
|
|
16683
16733
|
};
|
|
16684
16734
|
Object.defineProperty(ExpressionValidator.prototype, "expression", {
|
|
@@ -18335,13 +18385,16 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18335
18385
|
this.copyCssClasses(classes, css.question);
|
|
18336
18386
|
this.copyCssClasses(classes.error, css.error);
|
|
18337
18387
|
this.updateCssClasses(classes, css);
|
|
18388
|
+
return classes;
|
|
18389
|
+
};
|
|
18390
|
+
Question.prototype.onCalcCssClasses = function (classes) {
|
|
18391
|
+
_super.prototype.onCalcCssClasses.call(this, classes);
|
|
18338
18392
|
if (this.survey) {
|
|
18339
18393
|
this.survey.updateQuestionCssClasses(this, classes);
|
|
18340
18394
|
}
|
|
18341
18395
|
if (this.onUpdateCssClassesCallback) {
|
|
18342
18396
|
this.onUpdateCssClassesCallback(classes);
|
|
18343
18397
|
}
|
|
18344
|
-
return classes;
|
|
18345
18398
|
};
|
|
18346
18399
|
Object.defineProperty(Question.prototype, "cssRoot", {
|
|
18347
18400
|
get: function () {
|
|
@@ -18527,18 +18580,33 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18527
18580
|
.toString();
|
|
18528
18581
|
};
|
|
18529
18582
|
Question.prototype.updateElementCss = function (reNew) {
|
|
18530
|
-
|
|
18531
|
-
|
|
18532
|
-
|
|
18583
|
+
if (this.wasRendered) {
|
|
18584
|
+
_super.prototype.updateElementCss.call(this, reNew);
|
|
18585
|
+
if (reNew) {
|
|
18586
|
+
this.updateQuestionCss(true);
|
|
18587
|
+
}
|
|
18588
|
+
}
|
|
18589
|
+
else {
|
|
18590
|
+
this.isRequireUpdateElements = true;
|
|
18533
18591
|
}
|
|
18534
18592
|
this.resetIndents();
|
|
18535
18593
|
};
|
|
18594
|
+
Question.prototype.onFirstRenderingCore = function () {
|
|
18595
|
+
if (this.isRequireUpdateElements) {
|
|
18596
|
+
this.isRequireUpdateElements = false;
|
|
18597
|
+
this.updateElementCss(true);
|
|
18598
|
+
}
|
|
18599
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
|
18600
|
+
};
|
|
18536
18601
|
Question.prototype.updateQuestionCss = function (reNew) {
|
|
18537
|
-
if (this.isLoadingFromJson ||
|
|
18538
|
-
!this.survey ||
|
|
18539
|
-
(reNew !== true && !this.cssClassesValue))
|
|
18602
|
+
if (this.isLoadingFromJson || !this.survey)
|
|
18540
18603
|
return;
|
|
18541
|
-
|
|
18604
|
+
if (this.wasRendered) {
|
|
18605
|
+
this.updateElementCssCore(this.cssClasses);
|
|
18606
|
+
}
|
|
18607
|
+
else {
|
|
18608
|
+
this.isRequireUpdateElements = true;
|
|
18609
|
+
}
|
|
18542
18610
|
};
|
|
18543
18611
|
Question.prototype.ensureElementCss = function () {
|
|
18544
18612
|
if (!this.cssClassesValue) {
|
|
@@ -31813,10 +31881,16 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31813
31881
|
confirmDelete = this.isRequireConfirmOnRowDelete(index);
|
|
31814
31882
|
}
|
|
31815
31883
|
if (confirmDelete) {
|
|
31816
|
-
confirmActionAsync(
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31884
|
+
confirmActionAsync({
|
|
31885
|
+
message: this.confirmDeleteText,
|
|
31886
|
+
funcOnYes: function () {
|
|
31887
|
+
_this.removeRowAsync(index, row);
|
|
31888
|
+
onRowRemoved && onRowRemoved();
|
|
31889
|
+
},
|
|
31890
|
+
locale: this.getLocale(),
|
|
31891
|
+
rootElement: this.survey.rootElement,
|
|
31892
|
+
cssClass: this.cssClasses.confirmDialog
|
|
31893
|
+
});
|
|
31820
31894
|
return;
|
|
31821
31895
|
}
|
|
31822
31896
|
this.removeRowAsync(index, row);
|
|
@@ -32542,7 +32616,8 @@ var defaultV2Css = {
|
|
|
32542
32616
|
noPointerEventsMode: "sd-question--no-pointer-events",
|
|
32543
32617
|
errorsContainer: "sd-element__erbox sd-question__erbox",
|
|
32544
32618
|
errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
|
|
32545
|
-
errorsContainerBottom: "sd-question__erbox--below-question"
|
|
32619
|
+
errorsContainerBottom: "sd-question__erbox--below-question",
|
|
32620
|
+
confirmDialog: "sd-popup--confirm sv-popup--confirm"
|
|
32546
32621
|
},
|
|
32547
32622
|
image: {
|
|
32548
32623
|
mainRoot: "sd-question sd-question--image",
|
|
@@ -34475,7 +34550,6 @@ var panel_spreadArray = (undefined && undefined.__spreadArray) || function (to,
|
|
|
34475
34550
|
|
|
34476
34551
|
|
|
34477
34552
|
|
|
34478
|
-
|
|
34479
34553
|
var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
34480
34554
|
panel_extends(QuestionRowModel, _super);
|
|
34481
34555
|
function QuestionRowModel(panel) {
|
|
@@ -35078,9 +35152,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35078
35152
|
});
|
|
35079
35153
|
Object.defineProperty(PanelModelBase.prototype, "parent", {
|
|
35080
35154
|
/**
|
|
35081
|
-
* Returns a survey element (panel or page) that contains this panel and allows you to move
|
|
35155
|
+
* Returns a survey element (panel or page) that contains this panel and allows you to move the panel to a different survey element.
|
|
35156
|
+
*
|
|
35157
|
+
* For `PageModel` objects, the `parent` property is `null`, except in the following cases:
|
|
35082
35158
|
*
|
|
35083
|
-
*
|
|
35159
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
|
35160
|
+
* - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
|
35161
|
+
*
|
|
35162
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and the `parent` property contains this object.
|
|
35084
35163
|
*/
|
|
35085
35164
|
get: function () {
|
|
35086
35165
|
return this.getPropertyValue("parent", null);
|
|
@@ -35163,10 +35242,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35163
35242
|
configurable: true
|
|
35164
35243
|
});
|
|
35165
35244
|
Object.defineProperty(PanelModelBase.prototype, "isPanel", {
|
|
35166
|
-
/**
|
|
35167
|
-
* Returns `true` if the survey element is a panel.
|
|
35168
|
-
* @see Base.getType
|
|
35169
|
-
*/
|
|
35170
35245
|
get: function () {
|
|
35171
35246
|
return false;
|
|
35172
35247
|
},
|
|
@@ -35908,11 +35983,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35908
35983
|
PanelModelBase.prototype.updateRows = function () {
|
|
35909
35984
|
if (this.isLoadingFromJson)
|
|
35910
35985
|
return;
|
|
35911
|
-
|
|
35912
|
-
if (
|
|
35913
|
-
|
|
35986
|
+
this.getElementsForRows().forEach(function (el) {
|
|
35987
|
+
if (el.isPanel) {
|
|
35988
|
+
el.updateRows();
|
|
35914
35989
|
}
|
|
35915
|
-
}
|
|
35990
|
+
});
|
|
35916
35991
|
this.onRowsChanged();
|
|
35917
35992
|
};
|
|
35918
35993
|
Object.defineProperty(PanelModelBase.prototype, "rows", {
|
|
@@ -36021,7 +36096,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36021
36096
|
var _this = this;
|
|
36022
36097
|
var survey = this.survey;
|
|
36023
36098
|
var fireNotification = this.canFireAddRemoveNotifications(element);
|
|
36024
|
-
|
|
36099
|
+
if (!!this.surveyImpl) {
|
|
36100
|
+
element.setSurveyImpl(this.surveyImpl);
|
|
36101
|
+
}
|
|
36025
36102
|
element.parent = this;
|
|
36026
36103
|
this.markQuestionListDirty();
|
|
36027
36104
|
if (this.canBuildRows()) {
|
|
@@ -36047,8 +36124,8 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36047
36124
|
};
|
|
36048
36125
|
PanelModelBase.prototype.onRemoveElement = function (element) {
|
|
36049
36126
|
element.parent = null;
|
|
36127
|
+
this.unregisterElementPropertiesChanged(element);
|
|
36050
36128
|
this.markQuestionListDirty();
|
|
36051
|
-
element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
|
|
36052
36129
|
this.updateRowsOnElementRemoved(element);
|
|
36053
36130
|
if (this.isRandomizing)
|
|
36054
36131
|
return;
|
|
@@ -36057,6 +36134,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36057
36134
|
this.removeElementCallback(element);
|
|
36058
36135
|
this.onElementVisibilityChanged(this);
|
|
36059
36136
|
};
|
|
36137
|
+
PanelModelBase.prototype.unregisterElementPropertiesChanged = function (element) {
|
|
36138
|
+
element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
|
|
36139
|
+
};
|
|
36060
36140
|
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
|
36061
36141
|
if (!this.canFireAddRemoveNotifications(element))
|
|
36062
36142
|
return;
|
|
@@ -36101,19 +36181,21 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36101
36181
|
PanelModelBase.prototype.buildRows = function () {
|
|
36102
36182
|
if (!this.canBuildRows())
|
|
36103
36183
|
return [];
|
|
36104
|
-
var
|
|
36105
|
-
|
|
36106
|
-
|
|
36184
|
+
var res = new Array();
|
|
36185
|
+
var els = this.getElementsForRows();
|
|
36186
|
+
for (var i = 0; i < els.length; i++) {
|
|
36187
|
+
var el = els[i];
|
|
36107
36188
|
var isNewRow = i == 0 || el.startWithNewLine;
|
|
36108
|
-
var row = isNewRow ? this.createRowAndSetLazy(
|
|
36189
|
+
var row = isNewRow ? this.createRowAndSetLazy(res.length) : res[res.length - 1];
|
|
36109
36190
|
if (isNewRow)
|
|
36110
|
-
|
|
36191
|
+
res.push(row);
|
|
36111
36192
|
row.addElement(el);
|
|
36112
36193
|
}
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
|
|
36194
|
+
res.forEach(function (row) { return row.updateVisible(); });
|
|
36195
|
+
return res;
|
|
36196
|
+
};
|
|
36197
|
+
PanelModelBase.prototype.getElementsForRows = function () {
|
|
36198
|
+
return this.elements;
|
|
36117
36199
|
};
|
|
36118
36200
|
PanelModelBase.prototype.getDragDropInfo = function () {
|
|
36119
36201
|
var page = this.getPage(this.parent);
|
|
@@ -36676,10 +36758,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36676
36758
|
}
|
|
36677
36759
|
this.rows.splice(0, this.rows.length);
|
|
36678
36760
|
}
|
|
36761
|
+
this.disposeElements();
|
|
36762
|
+
this.elements.splice(0, this.elements.length);
|
|
36763
|
+
};
|
|
36764
|
+
PanelModelBase.prototype.disposeElements = function () {
|
|
36679
36765
|
for (var i = 0; i < this.elements.length; i++) {
|
|
36680
36766
|
this.elements[i].dispose();
|
|
36681
36767
|
}
|
|
36682
|
-
this.elements.splice(0, this.elements.length);
|
|
36683
36768
|
};
|
|
36684
36769
|
PanelModelBase.panelCounter = 100;
|
|
36685
36770
|
panel_decorate([
|
|
@@ -36732,7 +36817,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36732
36817
|
});
|
|
36733
36818
|
PanelModel.prototype.getSurvey = function (live) {
|
|
36734
36819
|
if (live === void 0) { live = false; }
|
|
36735
|
-
if (live) {
|
|
36820
|
+
if (live && this.isPanel) {
|
|
36736
36821
|
return !!this.parent ? this.parent.getSurvey(live) : null;
|
|
36737
36822
|
}
|
|
36738
36823
|
return _super.prototype.getSurvey.call(this, live);
|
|
@@ -36883,6 +36968,8 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36883
36968
|
return locTitleValue;
|
|
36884
36969
|
};
|
|
36885
36970
|
PanelModel.prototype.beforeSetVisibleIndex = function (index) {
|
|
36971
|
+
if (this.isPage)
|
|
36972
|
+
return _super.prototype.beforeSetVisibleIndex.call(this, index);
|
|
36886
36973
|
var visibleIndex = -1;
|
|
36887
36974
|
if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty || this.hasParentInQuestionIndex())) {
|
|
36888
36975
|
visibleIndex = index;
|
|
@@ -36914,7 +37001,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36914
37001
|
}
|
|
36915
37002
|
};
|
|
36916
37003
|
PanelModel.prototype.getRenderedTitle = function (str) {
|
|
36917
|
-
if (!str) {
|
|
37004
|
+
if (this.isPanel && !str) {
|
|
36918
37005
|
if (this.isCollapsed || this.isExpanded)
|
|
36919
37006
|
return this.name;
|
|
36920
37007
|
if (this.isDesignMode)
|
|
@@ -37039,11 +37126,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
37039
37126
|
return this.footerToolbarValue;
|
|
37040
37127
|
};
|
|
37041
37128
|
Object.defineProperty(PanelModel.prototype, "hasEditButton", {
|
|
37042
|
-
get: function () {
|
|
37043
|
-
if (this.survey && this.survey.state === "preview")
|
|
37044
|
-
return (this.parent && this.parent instanceof page_PageModel);
|
|
37045
|
-
return false;
|
|
37046
|
-
},
|
|
37129
|
+
get: function () { return false; },
|
|
37047
37130
|
enumerable: false,
|
|
37048
37131
|
configurable: true
|
|
37049
37132
|
});
|
|
@@ -37052,19 +37135,16 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
37052
37135
|
return;
|
|
37053
37136
|
this.survey.cancelPreviewByPage(this);
|
|
37054
37137
|
};
|
|
37055
|
-
PanelModel.prototype.canShowTitle = function (survey) {
|
|
37056
|
-
var page = this.originalPage;
|
|
37057
|
-
if (!!page)
|
|
37058
|
-
return page.canShowTitle(survey);
|
|
37059
|
-
return _super.prototype.canShowTitle.call(this, survey);
|
|
37060
|
-
};
|
|
37061
37138
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
|
37062
37139
|
get: function () {
|
|
37063
|
-
return this.
|
|
37140
|
+
return this.getCssPanelTitle();
|
|
37064
37141
|
},
|
|
37065
37142
|
enumerable: false,
|
|
37066
37143
|
configurable: true
|
|
37067
37144
|
});
|
|
37145
|
+
PanelModel.prototype.getCssPanelTitle = function () {
|
|
37146
|
+
return this.getCssTitle(this.cssClasses.panel);
|
|
37147
|
+
};
|
|
37068
37148
|
PanelModel.prototype.getCssTitleExpandableSvg = function () {
|
|
37069
37149
|
if (this.state === "default")
|
|
37070
37150
|
return null;
|
|
@@ -37078,6 +37158,8 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
37078
37158
|
configurable: true
|
|
37079
37159
|
});
|
|
37080
37160
|
PanelModel.prototype.getCssError = function (cssClasses) {
|
|
37161
|
+
if (this.isPage)
|
|
37162
|
+
return _super.prototype.getCssError.call(this, cssClasses);
|
|
37081
37163
|
var builder = new CssClassBuilder()
|
|
37082
37164
|
.append(_super.prototype.getCssError.call(this, cssClasses))
|
|
37083
37165
|
.append(cssClasses.panel.errorsContainer);
|
|
@@ -37108,10 +37190,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
37108
37190
|
};
|
|
37109
37191
|
Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
|
|
37110
37192
|
get: function () {
|
|
37111
|
-
|
|
37112
|
-
if (!!panel.originalPage)
|
|
37113
|
-
return true;
|
|
37114
|
-
return panel.survey.isShowingPreview && panel.survey.isSinglePage && !!panel.parent && !!panel.parent.originalPage;
|
|
37193
|
+
return false;
|
|
37115
37194
|
},
|
|
37116
37195
|
enumerable: false,
|
|
37117
37196
|
configurable: true
|
|
@@ -37151,7 +37230,9 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
37151
37230
|
PanelModel.prototype.afterRenderCore = function (element) {
|
|
37152
37231
|
var _a;
|
|
37153
37232
|
_super.prototype.afterRenderCore.call(this, element);
|
|
37154
|
-
(
|
|
37233
|
+
if (this.isPanel) {
|
|
37234
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.afterRenderPanel(this, element);
|
|
37235
|
+
}
|
|
37155
37236
|
};
|
|
37156
37237
|
return PanelModel;
|
|
37157
37238
|
}(panel_PanelModelBase));
|
|
@@ -37199,27 +37280,17 @@ Serializer.addClass("panelbase", [
|
|
|
37199
37280
|
return new panel_PanelModelBase();
|
|
37200
37281
|
});
|
|
37201
37282
|
Serializer.addClass("panel", [
|
|
37202
|
-
{
|
|
37203
|
-
name: "state",
|
|
37204
|
-
default: "default",
|
|
37205
|
-
choices: ["default", "collapsed", "expanded"],
|
|
37206
|
-
},
|
|
37283
|
+
{ name: "state", default: "default", choices: ["default", "collapsed", "expanded"] },
|
|
37207
37284
|
{ name: "isRequired:switch", overridingProperty: "requiredIf" },
|
|
37208
|
-
{
|
|
37209
|
-
name: "requiredErrorText:text",
|
|
37210
|
-
serializationProperty: "locRequiredErrorText",
|
|
37211
|
-
},
|
|
37285
|
+
{ name: "requiredErrorText:text", serializationProperty: "locRequiredErrorText" },
|
|
37212
37286
|
{ name: "startWithNewLine:boolean", default: true },
|
|
37213
|
-
"width",
|
|
37287
|
+
{ name: "width" },
|
|
37214
37288
|
{ name: "minWidth", defaultFunc: function () { return "auto"; } },
|
|
37215
37289
|
{ name: "maxWidth", defaultFunc: function () { return settings.maxWidth; } },
|
|
37216
|
-
{
|
|
37217
|
-
name: "colSpan:number", visible: false,
|
|
37218
|
-
onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
|
|
37219
|
-
},
|
|
37290
|
+
{ name: "colSpan:number", visible: false, onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); } },
|
|
37220
37291
|
{
|
|
37221
37292
|
name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
|
|
37222
|
-
visibleIf: function (obj) { return !!obj
|
|
37293
|
+
visibleIf: function (obj) { return !!obj.survey && obj.survey.gridLayoutEnabled; }
|
|
37223
37294
|
},
|
|
37224
37295
|
{ name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
|
|
37225
37296
|
{ name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
|
|
@@ -37239,13 +37310,9 @@ Serializer.addClass("panel", [
|
|
|
37239
37310
|
: [];
|
|
37240
37311
|
},
|
|
37241
37312
|
},
|
|
37242
|
-
"showNumber:boolean",
|
|
37243
|
-
{
|
|
37244
|
-
|
|
37245
|
-
default: "default",
|
|
37246
|
-
choices: ["default", "onpanel", "off"],
|
|
37247
|
-
},
|
|
37248
|
-
"questionStartIndex",
|
|
37313
|
+
{ name: "showNumber:boolean" },
|
|
37314
|
+
{ name: "showQuestionNumbers", default: "default", choices: ["default", "onpanel", "off"] },
|
|
37315
|
+
{ name: "questionStartIndex", visibleIf: function (obj) { return obj.isPanel; } },
|
|
37249
37316
|
{ name: "allowAdaptiveActions:boolean", default: true, visible: false },
|
|
37250
37317
|
], function () {
|
|
37251
37318
|
return new panel_PanelModel();
|
|
@@ -37521,12 +37588,61 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37521
37588
|
return this.name;
|
|
37522
37589
|
};
|
|
37523
37590
|
Object.defineProperty(PageModel.prototype, "isPage", {
|
|
37591
|
+
get: function () {
|
|
37592
|
+
return !this.isPanel;
|
|
37593
|
+
},
|
|
37594
|
+
enumerable: false,
|
|
37595
|
+
configurable: true
|
|
37596
|
+
});
|
|
37597
|
+
Object.defineProperty(PageModel.prototype, "isPanel", {
|
|
37598
|
+
get: function () {
|
|
37599
|
+
return !!this.parent;
|
|
37600
|
+
},
|
|
37601
|
+
enumerable: false,
|
|
37602
|
+
configurable: true
|
|
37603
|
+
});
|
|
37604
|
+
Object.defineProperty(PageModel.prototype, "showPanelAsPage", {
|
|
37524
37605
|
get: function () {
|
|
37525
37606
|
return true;
|
|
37526
37607
|
},
|
|
37527
37608
|
enumerable: false,
|
|
37528
37609
|
configurable: true
|
|
37529
37610
|
});
|
|
37611
|
+
Object.defineProperty(PageModel.prototype, "hasEditButton", {
|
|
37612
|
+
get: function () {
|
|
37613
|
+
return this.isPanel && this.survey && this.survey.state === "preview"
|
|
37614
|
+
&& !!this.parent && !this.parent.isPanel;
|
|
37615
|
+
},
|
|
37616
|
+
enumerable: false,
|
|
37617
|
+
configurable: true
|
|
37618
|
+
});
|
|
37619
|
+
PageModel.prototype.getElementsForRows = function () {
|
|
37620
|
+
var _a;
|
|
37621
|
+
var q = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.currentSingleQuestion;
|
|
37622
|
+
if (!!q) {
|
|
37623
|
+
if (q.page === this)
|
|
37624
|
+
return [q];
|
|
37625
|
+
return [];
|
|
37626
|
+
}
|
|
37627
|
+
return _super.prototype.getElementsForRows.call(this);
|
|
37628
|
+
};
|
|
37629
|
+
PageModel.prototype.disposeElements = function () {
|
|
37630
|
+
if (!this.isPageContainer) {
|
|
37631
|
+
_super.prototype.disposeElements.call(this);
|
|
37632
|
+
}
|
|
37633
|
+
};
|
|
37634
|
+
PageModel.prototype.onRemoveElement = function (element) {
|
|
37635
|
+
if (this.isPageContainer) {
|
|
37636
|
+
element.parent = null;
|
|
37637
|
+
this.unregisterElementPropertiesChanged(element);
|
|
37638
|
+
}
|
|
37639
|
+
else {
|
|
37640
|
+
_super.prototype.onRemoveElement.call(this, element);
|
|
37641
|
+
}
|
|
37642
|
+
};
|
|
37643
|
+
PageModel.prototype.getTemplate = function () {
|
|
37644
|
+
return this.isPanel ? "panel" : _super.prototype.getTemplate.call(this);
|
|
37645
|
+
};
|
|
37530
37646
|
Object.defineProperty(PageModel.prototype, "no", {
|
|
37531
37647
|
get: function () {
|
|
37532
37648
|
if (!this.canShowPageNumber() || !this.survey)
|
|
@@ -37664,6 +37780,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37664
37780
|
configurable: true
|
|
37665
37781
|
});
|
|
37666
37782
|
PageModel.prototype.calcCssClasses = function (css) {
|
|
37783
|
+
if (this.isPanel)
|
|
37784
|
+
return _super.prototype.calcCssClasses.call(this, css);
|
|
37667
37785
|
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowReplace: "" };
|
|
37668
37786
|
this.copyCssClasses(classes.page, css.page);
|
|
37669
37787
|
this.copyCssClasses(classes.error, css.error);
|
|
@@ -37702,20 +37820,18 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37702
37820
|
}
|
|
37703
37821
|
return classes;
|
|
37704
37822
|
};
|
|
37705
|
-
|
|
37706
|
-
|
|
37707
|
-
|
|
37708
|
-
|
|
37709
|
-
return
|
|
37710
|
-
|
|
37711
|
-
|
|
37712
|
-
|
|
37713
|
-
|
|
37714
|
-
configurable: true
|
|
37715
|
-
});
|
|
37823
|
+
PageModel.prototype.getCssPanelTitle = function () {
|
|
37824
|
+
if (this.isPanel)
|
|
37825
|
+
return _super.prototype.getCssPanelTitle.call(this);
|
|
37826
|
+
if (!this.cssClasses.page)
|
|
37827
|
+
return "";
|
|
37828
|
+
return new CssClassBuilder()
|
|
37829
|
+
.append(this.cssClasses.page.title)
|
|
37830
|
+
.toString();
|
|
37831
|
+
};
|
|
37716
37832
|
Object.defineProperty(PageModel.prototype, "cssRoot", {
|
|
37717
37833
|
get: function () {
|
|
37718
|
-
if (!this.cssClasses.page || !this.survey)
|
|
37834
|
+
if (this.isPanel || !this.cssClasses.page || !this.survey)
|
|
37719
37835
|
return "";
|
|
37720
37836
|
return new CssClassBuilder()
|
|
37721
37837
|
.append(this.cssClasses.page.root)
|
|
@@ -37727,6 +37843,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37727
37843
|
configurable: true
|
|
37728
37844
|
});
|
|
37729
37845
|
PageModel.prototype.getCssError = function (cssClasses) {
|
|
37846
|
+
if (this.isPanel)
|
|
37847
|
+
return _super.prototype.getCssError.call(this, cssClasses);
|
|
37730
37848
|
return new CssClassBuilder()
|
|
37731
37849
|
.append(_super.prototype.getCssError.call(this, cssClasses))
|
|
37732
37850
|
.append(cssClasses.page.errorsContainer).toString();
|
|
@@ -37903,7 +38021,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37903
38021
|
jsonobject_property({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
|
|
37904
38022
|
], PageModel.prototype, "num", void 0);
|
|
37905
38023
|
return PageModel;
|
|
37906
|
-
}(
|
|
38024
|
+
}(panel_PanelModel));
|
|
37907
38025
|
|
|
37908
38026
|
Serializer.addClass("page", [
|
|
37909
38027
|
{
|
|
@@ -37928,9 +38046,25 @@ Serializer.addClass("page", [
|
|
|
37928
38046
|
},
|
|
37929
38047
|
{ name: "title:text", serializationProperty: "locTitle" },
|
|
37930
38048
|
{ name: "description:text", serializationProperty: "locDescription" },
|
|
38049
|
+
{ name: "state", visible: false },
|
|
38050
|
+
{ name: "isRequired", visible: false },
|
|
38051
|
+
{ name: "startWithNewLine", visible: false },
|
|
38052
|
+
{ name: "width", visible: false },
|
|
38053
|
+
{ name: "minWidth", visible: false },
|
|
38054
|
+
{ name: "maxWidth", visible: false },
|
|
38055
|
+
{ name: "colSpan", visible: false, isSerializable: false },
|
|
38056
|
+
{ name: "effectiveColSpan:number", visible: false, isSerializable: false },
|
|
38057
|
+
{ name: "innerIndent", visible: false },
|
|
38058
|
+
{ name: "indent", visible: false },
|
|
38059
|
+
{ name: "page", visible: false, isSerializable: false },
|
|
38060
|
+
{ name: "showNumber", visible: false },
|
|
38061
|
+
{ name: "showQuestionNumbers", visible: false },
|
|
38062
|
+
{ name: "questionStartIndex", visible: false },
|
|
38063
|
+
{ name: "allowAdaptiveActions", visible: false },
|
|
38064
|
+
{ name: "requiredErrorText:text", serializationProperty: "locRequiredErrorText", visible: false },
|
|
37931
38065
|
], function () {
|
|
37932
38066
|
return new page_PageModel();
|
|
37933
|
-
}, "
|
|
38067
|
+
}, "panel");
|
|
37934
38068
|
|
|
37935
38069
|
// CONCATENATED MODULE: ./packages/survey-core/src/progress-buttons.ts
|
|
37936
38070
|
var progress_buttons_extends = (undefined && undefined.__extends) || (function () {
|
|
@@ -38172,16 +38306,27 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
|
|
|
38172
38306
|
|
|
38173
38307
|
|
|
38174
38308
|
|
|
38175
|
-
|
|
38176
38309
|
function tryFocusPage(survey, panel) {
|
|
38177
38310
|
if (survey.isDesignMode)
|
|
38178
38311
|
return true;
|
|
38179
38312
|
panel.focusFirstQuestion();
|
|
38180
38313
|
return true;
|
|
38181
38314
|
}
|
|
38315
|
+
function getPage(question) {
|
|
38316
|
+
if (!!question.parentQuestion) {
|
|
38317
|
+
return getPage(question.parentQuestion);
|
|
38318
|
+
}
|
|
38319
|
+
var parent = question.parent;
|
|
38320
|
+
while (parent && parent.getType() !== "page" && parent.parent) {
|
|
38321
|
+
parent = parent.parent;
|
|
38322
|
+
}
|
|
38323
|
+
if (parent && parent.getType() === "page") {
|
|
38324
|
+
return parent;
|
|
38325
|
+
}
|
|
38326
|
+
return null;
|
|
38327
|
+
}
|
|
38182
38328
|
function createTOCListModel(survey, onAction) {
|
|
38183
38329
|
var items = getTOCItems(survey, onAction);
|
|
38184
|
-
var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items[0];
|
|
38185
38330
|
var listOptions = {
|
|
38186
38331
|
items: items,
|
|
38187
38332
|
onSelectionChanged: function (item) {
|
|
@@ -38189,15 +38334,20 @@ function createTOCListModel(survey, onAction) {
|
|
|
38189
38334
|
listModel.selectedItem = item;
|
|
38190
38335
|
}
|
|
38191
38336
|
},
|
|
38192
|
-
allowSelection: true,
|
|
38193
38337
|
searchEnabled: false,
|
|
38194
38338
|
locOwner: survey,
|
|
38195
|
-
selectedItem: selectedItem
|
|
38196
38339
|
};
|
|
38197
38340
|
var listModel = new list_ListModel(listOptions);
|
|
38198
38341
|
listModel.allowSelection = false;
|
|
38342
|
+
var updateSelectedItem = function (currentPage, defaultSelection) {
|
|
38343
|
+
listModel.selectedItem = !!currentPage && listModel.actions.filter(function (i) { return i.id === currentPage.name; })[0] || defaultSelection;
|
|
38344
|
+
};
|
|
38345
|
+
updateSelectedItem(survey.currentPage, items[0]);
|
|
38199
38346
|
survey.onCurrentPageChanged.add(function (s, o) {
|
|
38200
|
-
|
|
38347
|
+
updateSelectedItem(survey.currentPage);
|
|
38348
|
+
});
|
|
38349
|
+
survey.onFocusInQuestion.add(function (s, o) {
|
|
38350
|
+
updateSelectedItem(getPage(o.question));
|
|
38201
38351
|
});
|
|
38202
38352
|
survey.registerFunctionOnPropertyValueChanged("pages", function () {
|
|
38203
38353
|
listModel.setItems(getTOCItems(survey, onAction));
|
|
@@ -38205,8 +38355,7 @@ function createTOCListModel(survey, onAction) {
|
|
|
38205
38355
|
return listModel;
|
|
38206
38356
|
}
|
|
38207
38357
|
function getTOCItems(survey, onAction) {
|
|
38208
|
-
var
|
|
38209
|
-
var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
|
|
38358
|
+
var pagesSource = survey.pages;
|
|
38210
38359
|
var items = (pagesSource || []).map(function (page) {
|
|
38211
38360
|
return new action_Action({
|
|
38212
38361
|
id: page.name,
|
|
@@ -38214,7 +38363,7 @@ function getTOCItems(survey, onAction) {
|
|
|
38214
38363
|
action: function () {
|
|
38215
38364
|
DomDocumentHelper.activeElementBlur();
|
|
38216
38365
|
!!onAction && onAction();
|
|
38217
|
-
if (page
|
|
38366
|
+
if (page.isPage) {
|
|
38218
38367
|
return survey.tryNavigateToPage(page);
|
|
38219
38368
|
}
|
|
38220
38369
|
return tryFocusPage(survey, page);
|
|
@@ -41927,6 +42076,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
41927
42076
|
get: function () {
|
|
41928
42077
|
if (this.isDesignMode)
|
|
41929
42078
|
return this.pages;
|
|
42079
|
+
if (!!this.pageContainerValue && (this.isShowingPreview || this.isSinglePage))
|
|
42080
|
+
return [this.pageContainerValue];
|
|
41930
42081
|
var result = new Array();
|
|
41931
42082
|
for (var i = 0; i < this.pages.length; i++) {
|
|
41932
42083
|
if (this.isPageInVisibleList(this.pages[i])) {
|
|
@@ -42060,7 +42211,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42060
42211
|
return false;
|
|
42061
42212
|
if (index === this.currentPageNo)
|
|
42062
42213
|
return false;
|
|
42063
|
-
if (index < this.currentPageNo || this.
|
|
42214
|
+
if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages) {
|
|
42064
42215
|
this.currentPageNo = index;
|
|
42065
42216
|
return true;
|
|
42066
42217
|
}
|
|
@@ -42392,6 +42543,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42392
42543
|
this.onFirstPageIsStartedChanged();
|
|
42393
42544
|
if (goToFirstPage) {
|
|
42394
42545
|
this.currentPage = this.firstVisiblePage;
|
|
42546
|
+
if (this.currentSingleQuestion) {
|
|
42547
|
+
var questions = this.getAllQuestions(true);
|
|
42548
|
+
this.currentSingleQuestion = questions.length > 0 ? questions[0] : undefined;
|
|
42549
|
+
}
|
|
42395
42550
|
}
|
|
42396
42551
|
if (clearData) {
|
|
42397
42552
|
this.updateValuesWithDefaults();
|
|
@@ -42429,7 +42584,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42429
42584
|
SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
|
|
42430
42585
|
this.notifyQuestionsOnHidingContent(oldValue);
|
|
42431
42586
|
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
|
42432
|
-
if (oldValue && !oldValue.passed) {
|
|
42587
|
+
if (oldValue && !oldValue.isDisposed && !oldValue.passed) {
|
|
42433
42588
|
if (oldValue.validate(false)) {
|
|
42434
42589
|
oldValue.passed = true;
|
|
42435
42590
|
}
|
|
@@ -42440,9 +42595,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42440
42595
|
this.onCurrentPageChanged.fire(this, options);
|
|
42441
42596
|
};
|
|
42442
42597
|
SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
|
|
42443
|
-
if (!page)
|
|
42444
|
-
return;
|
|
42445
|
-
|
|
42598
|
+
if (page && !page.isDisposed) {
|
|
42599
|
+
page.questions.forEach(function (q) { return q.onHidingContent(); });
|
|
42600
|
+
}
|
|
42446
42601
|
};
|
|
42447
42602
|
SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue) {
|
|
42448
42603
|
var diff = !!newValue && !!oldValue ? newValue.visibleIndex - oldValue.visibleIndex : 0;
|
|
@@ -42678,6 +42833,30 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42678
42833
|
return false;
|
|
42679
42834
|
return this.doCurrentPageComplete(false);
|
|
42680
42835
|
};
|
|
42836
|
+
SurveyModel.prototype.performNext = function () {
|
|
42837
|
+
var q = this.currentSingleQuestion;
|
|
42838
|
+
if (!q)
|
|
42839
|
+
return this.nextPage();
|
|
42840
|
+
if (!q.validate(true))
|
|
42841
|
+
return false;
|
|
42842
|
+
var questions = this.getAllQuestions(true);
|
|
42843
|
+
var index = questions.indexOf(q);
|
|
42844
|
+
if (index < 0 || index === questions.length - 1)
|
|
42845
|
+
return false;
|
|
42846
|
+
this.currentSingleQuestion = questions[index + 1];
|
|
42847
|
+
return true;
|
|
42848
|
+
};
|
|
42849
|
+
SurveyModel.prototype.performPrevious = function () {
|
|
42850
|
+
var q = this.currentSingleQuestion;
|
|
42851
|
+
if (!q)
|
|
42852
|
+
return this.prevPage();
|
|
42853
|
+
var questions = this.getAllQuestions(true);
|
|
42854
|
+
var index = questions.indexOf(q);
|
|
42855
|
+
if (index === 0)
|
|
42856
|
+
return false;
|
|
42857
|
+
this.currentSingleQuestion = questions[index - 1];
|
|
42858
|
+
return true;
|
|
42859
|
+
};
|
|
42681
42860
|
SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
|
|
42682
42861
|
var _this = this;
|
|
42683
42862
|
if (!this.isEditMode || this.ignoreValidation)
|
|
@@ -43007,9 +43186,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43007
43186
|
};
|
|
43008
43187
|
SurveyModel.prototype.nextPageUIClick = function () {
|
|
43009
43188
|
if (!!this.mouseDownPage && this.mouseDownPage !== this.activePage)
|
|
43010
|
-
return;
|
|
43189
|
+
return false;
|
|
43011
43190
|
this.mouseDownPage = null;
|
|
43012
|
-
return this.
|
|
43191
|
+
return this.performNext();
|
|
43013
43192
|
};
|
|
43014
43193
|
SurveyModel.prototype.nextPageMouseDown = function () {
|
|
43015
43194
|
this.mouseDownPage = this.activePage;
|
|
@@ -43053,7 +43232,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43053
43232
|
this.isShowingPreview = false;
|
|
43054
43233
|
};
|
|
43055
43234
|
SurveyModel.prototype.cancelPreviewByPage = function (panel) {
|
|
43056
|
-
this.cancelPreview(panel
|
|
43235
|
+
this.cancelPreview(panel);
|
|
43057
43236
|
};
|
|
43058
43237
|
SurveyModel.prototype.doCurrentPageComplete = function (doComplete) {
|
|
43059
43238
|
if (this.isValidatingOnServer)
|
|
@@ -43083,6 +43262,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43083
43262
|
enumerable: false,
|
|
43084
43263
|
configurable: true
|
|
43085
43264
|
});
|
|
43265
|
+
Object.defineProperty(SurveyModel.prototype, "isSingleVisibleQuestion", {
|
|
43266
|
+
get: function () {
|
|
43267
|
+
return this.isSingleVisibleQuestionVal(this.questionsOnPageMode);
|
|
43268
|
+
},
|
|
43269
|
+
enumerable: false,
|
|
43270
|
+
configurable: true
|
|
43271
|
+
});
|
|
43272
|
+
SurveyModel.prototype.isSingleVisibleQuestionVal = function (val) {
|
|
43273
|
+
return val === "questionPerPage" || val === "questionOnPage";
|
|
43274
|
+
};
|
|
43086
43275
|
Object.defineProperty(SurveyModel.prototype, "questionsOnPageMode", {
|
|
43087
43276
|
/**
|
|
43088
43277
|
* Specifies how to distribute survey elements between pages.
|
|
@@ -43158,25 +43347,54 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43158
43347
|
this.pageVisibilityChanged(this.pages[0], !this.isStartedState);
|
|
43159
43348
|
};
|
|
43160
43349
|
SurveyModel.prototype.onShowingPreviewChanged = function () {
|
|
43350
|
+
this.updatePagesContainer();
|
|
43351
|
+
};
|
|
43352
|
+
SurveyModel.prototype.createRootPage = function (name, pages) {
|
|
43353
|
+
var container = Serializer.createClass("page");
|
|
43354
|
+
container.name = name;
|
|
43355
|
+
container.isPageContainer = true;
|
|
43356
|
+
pages.forEach(function (page) {
|
|
43357
|
+
if (!page.isStartPage) {
|
|
43358
|
+
container.addElement(page);
|
|
43359
|
+
}
|
|
43360
|
+
});
|
|
43361
|
+
return container;
|
|
43362
|
+
};
|
|
43363
|
+
SurveyModel.prototype.disposeContainerPage = function () {
|
|
43364
|
+
var cPage = this.pageContainerValue;
|
|
43365
|
+
var elements = [].concat(cPage.elements);
|
|
43366
|
+
elements.forEach(function (el) { return cPage.removeElement(el); });
|
|
43367
|
+
cPage.dispose();
|
|
43368
|
+
this.pageContainerValue = undefined;
|
|
43369
|
+
};
|
|
43370
|
+
SurveyModel.prototype.updatePagesContainer = function () {
|
|
43161
43371
|
if (this.isDesignMode)
|
|
43162
43372
|
return;
|
|
43163
|
-
|
|
43164
|
-
|
|
43165
|
-
|
|
43166
|
-
|
|
43167
|
-
|
|
43168
|
-
|
|
43169
|
-
|
|
43373
|
+
this.getAllQuestions().forEach(function (q) { return q.updateElementVisibility(); });
|
|
43374
|
+
this.setPropertyValue("currentPage", undefined);
|
|
43375
|
+
var singleName = "single-page";
|
|
43376
|
+
var previewName = "preview-page";
|
|
43377
|
+
var rootPage = undefined;
|
|
43378
|
+
if (this.isSinglePage) {
|
|
43379
|
+
var cPage = this.pageContainerValue;
|
|
43380
|
+
if (cPage && cPage.name === previewName) {
|
|
43381
|
+
rootPage = cPage.elements[0];
|
|
43382
|
+
this.disposeContainerPage();
|
|
43383
|
+
}
|
|
43384
|
+
else {
|
|
43385
|
+
rootPage = this.createRootPage(singleName, this.pages);
|
|
43170
43386
|
}
|
|
43171
|
-
this.runningPages = undefined;
|
|
43172
43387
|
}
|
|
43173
|
-
this.runConditions();
|
|
43174
|
-
this.updateAllElementsVisibility(this.pages);
|
|
43175
|
-
this.updateVisibleIndexes();
|
|
43176
43388
|
if (this.isShowingPreview) {
|
|
43177
|
-
this.
|
|
43389
|
+
rootPage = this.createRootPage(previewName, rootPage ? [rootPage] : this.pages);
|
|
43178
43390
|
}
|
|
43179
|
-
|
|
43391
|
+
if (rootPage) {
|
|
43392
|
+
rootPage.setSurveyImpl(this);
|
|
43393
|
+
this.pageContainerValue = rootPage;
|
|
43394
|
+
this.currentPage = rootPage;
|
|
43395
|
+
}
|
|
43396
|
+
if (!this.isSinglePage && !this.isShowingPreview) {
|
|
43397
|
+
this.disposeContainerPage();
|
|
43180
43398
|
var curPage = this.gotoPageFromPreview;
|
|
43181
43399
|
this.gotoPageFromPreview = null;
|
|
43182
43400
|
if (helpers_Helpers.isValueEmpty(curPage) && this.visiblePageCount > 0) {
|
|
@@ -43188,110 +43406,62 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43188
43406
|
this.changeCurrentPageFromPreview = false;
|
|
43189
43407
|
}
|
|
43190
43408
|
}
|
|
43409
|
+
if (!this.currentPage && this.visiblePageCount > 0) {
|
|
43410
|
+
this.currentPage = this.visiblePages[0];
|
|
43411
|
+
}
|
|
43412
|
+
this.pages.forEach(function (page) {
|
|
43413
|
+
if (page.hasShown) {
|
|
43414
|
+
page.updateElementCss(true);
|
|
43415
|
+
}
|
|
43416
|
+
});
|
|
43417
|
+
this.updateButtonsVisibility();
|
|
43191
43418
|
};
|
|
43192
|
-
SurveyModel.prototype
|
|
43193
|
-
|
|
43419
|
+
Object.defineProperty(SurveyModel.prototype, "currentSingleQuestion", {
|
|
43420
|
+
get: function () { return this.currentSingleQuestionValue; },
|
|
43421
|
+
set: function (val) {
|
|
43422
|
+
if (val !== this.currentSingleQuestion) {
|
|
43423
|
+
this.currentSingleQuestionValue = val;
|
|
43424
|
+
if (!!val) {
|
|
43425
|
+
var page = val.page;
|
|
43426
|
+
page.updateRows();
|
|
43427
|
+
if (page !== this.currentPage) {
|
|
43428
|
+
this.currentPage = page;
|
|
43429
|
+
}
|
|
43430
|
+
else {
|
|
43431
|
+
if (this.focusFirstQuestionAutomatic) {
|
|
43432
|
+
val.focus();
|
|
43433
|
+
}
|
|
43434
|
+
}
|
|
43435
|
+
this.updateButtonsVisibility();
|
|
43436
|
+
}
|
|
43437
|
+
else {
|
|
43438
|
+
this.visiblePages.forEach(function (page) { return page.updateRows(); });
|
|
43439
|
+
}
|
|
43440
|
+
}
|
|
43441
|
+
},
|
|
43442
|
+
enumerable: false,
|
|
43443
|
+
configurable: true
|
|
43444
|
+
});
|
|
43445
|
+
SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
|
|
43194
43446
|
if (this.isShowingPreview)
|
|
43195
43447
|
return;
|
|
43196
|
-
|
|
43197
|
-
|
|
43198
|
-
|
|
43199
|
-
}
|
|
43200
|
-
this.originalPages = undefined;
|
|
43448
|
+
this.currentSingleQuestion = undefined;
|
|
43449
|
+
if (oldValue === "singlePage") {
|
|
43450
|
+
this.updatePagesContainer();
|
|
43201
43451
|
}
|
|
43202
|
-
|
|
43203
|
-
|
|
43204
|
-
this.originalPages = this.pages.slice(0, this.pages.length);
|
|
43205
|
-
}
|
|
43206
|
-
this.setupPagesForPageModes(this.isSinglePage, isFirstLoad);
|
|
43452
|
+
if (this.isSinglePage) {
|
|
43453
|
+
this.updatePagesContainer();
|
|
43207
43454
|
}
|
|
43208
|
-
this.
|
|
43209
|
-
|
|
43210
|
-
|
|
43211
|
-
|
|
43212
|
-
|
|
43213
|
-
this.pages.splice(0, this.pages.length);
|
|
43214
|
-
for (var i = 0; i < originalPages.length; i++) {
|
|
43215
|
-
var page = originalPages[i];
|
|
43216
|
-
page.setWasShown(false);
|
|
43217
|
-
this.pages.push(page);
|
|
43455
|
+
if (this.isSingleVisibleQuestion) {
|
|
43456
|
+
var questions = this.getAllQuestions(true);
|
|
43457
|
+
if (questions.length > 0) {
|
|
43458
|
+
this.currentSingleQuestion = questions[0];
|
|
43459
|
+
}
|
|
43218
43460
|
}
|
|
43219
43461
|
};
|
|
43220
43462
|
SurveyModel.prototype.getPageStartIndex = function () {
|
|
43221
43463
|
return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
|
|
43222
43464
|
};
|
|
43223
|
-
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
|
|
43224
|
-
var _this = this;
|
|
43225
|
-
this.questionHashesClear();
|
|
43226
|
-
if (this.firstPageIsStarted && this.pages.length > 0) {
|
|
43227
|
-
this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
|
|
43228
|
-
}
|
|
43229
|
-
this.isLockingUpdateOnPageModes = !isFirstLoad;
|
|
43230
|
-
var startIndex = this.getPageStartIndex();
|
|
43231
|
-
_super.prototype.startLoadingFromJson.call(this);
|
|
43232
|
-
var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
|
|
43233
|
-
var deletedLen = this.pages.length - startIndex;
|
|
43234
|
-
this.pages.splice(startIndex, deletedLen);
|
|
43235
|
-
for (var i = 0; i < newPages.length; i++) {
|
|
43236
|
-
this.pages.push(newPages[i]);
|
|
43237
|
-
}
|
|
43238
|
-
_super.prototype.endLoadingFromJson.call(this);
|
|
43239
|
-
for (var i = 0; i < newPages.length; i++) {
|
|
43240
|
-
newPages[i].setSurveyImpl(this, true);
|
|
43241
|
-
}
|
|
43242
|
-
this.doElementsOnLoad();
|
|
43243
|
-
this.updateCurrentPage();
|
|
43244
|
-
this.isLockingUpdateOnPageModes = false;
|
|
43245
|
-
};
|
|
43246
|
-
SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
|
|
43247
|
-
if (isSinglePage) {
|
|
43248
|
-
return [this.createSinglePage(startIndex)];
|
|
43249
|
-
}
|
|
43250
|
-
return this.createPagesForEveryQuestion(startIndex);
|
|
43251
|
-
};
|
|
43252
|
-
SurveyModel.prototype.createSinglePage = function (startIndex) {
|
|
43253
|
-
var single = this.createNewPage("all");
|
|
43254
|
-
single.setSurveyImpl(this);
|
|
43255
|
-
for (var i = startIndex; i < this.pages.length; i++) {
|
|
43256
|
-
var page = this.pages[i];
|
|
43257
|
-
var panel = Serializer.createClass("panel");
|
|
43258
|
-
panel.originalPage = page;
|
|
43259
|
-
single.addPanel(panel);
|
|
43260
|
-
var json = new jsonobject_JsonObject().toJsonObject(page);
|
|
43261
|
-
new jsonobject_JsonObject().toObject(json, panel);
|
|
43262
|
-
}
|
|
43263
|
-
return single;
|
|
43264
|
-
};
|
|
43265
|
-
SurveyModel.prototype.createPagesForEveryQuestion = function (startIndex) {
|
|
43266
|
-
var res = [];
|
|
43267
|
-
for (var i = startIndex; i < this.pages.length; i++) {
|
|
43268
|
-
var originalPage = this.pages[i];
|
|
43269
|
-
// Initialize randomization
|
|
43270
|
-
originalPage.setWasShown(true);
|
|
43271
|
-
for (var j = 0; j < originalPage.elements.length; j++) {
|
|
43272
|
-
var originalElement = originalPage.elements[j];
|
|
43273
|
-
var element = Serializer.createClass(originalElement.getType());
|
|
43274
|
-
if (!element)
|
|
43275
|
-
continue;
|
|
43276
|
-
var jsonObj = new jsonobject_JsonObject();
|
|
43277
|
-
//Deserialize page properties only, excluding elements
|
|
43278
|
-
jsonObj.lightSerializing = true;
|
|
43279
|
-
var pageJson = jsonObj.toJsonObject(originalPage);
|
|
43280
|
-
var page = Serializer.createClass(originalPage.getType());
|
|
43281
|
-
page.fromJSON(pageJson);
|
|
43282
|
-
page.name = originalElement.name;
|
|
43283
|
-
page.setSurveyImpl(this);
|
|
43284
|
-
res.push(page);
|
|
43285
|
-
var json = new jsonobject_JsonObject().toJsonObject(originalElement);
|
|
43286
|
-
page.addElement(element);
|
|
43287
|
-
new jsonobject_JsonObject().toObject(json, element);
|
|
43288
|
-
for (var k = 0; k < page.questions.length; k++) {
|
|
43289
|
-
this.questionHashesAdded(page.questions[k]);
|
|
43290
|
-
}
|
|
43291
|
-
}
|
|
43292
|
-
}
|
|
43293
|
-
return res;
|
|
43294
|
-
};
|
|
43295
43465
|
Object.defineProperty(SurveyModel.prototype, "isFirstPage", {
|
|
43296
43466
|
/**
|
|
43297
43467
|
* Indicates whether the [current page](#currentPage) is the first page.
|
|
@@ -43357,30 +43527,73 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43357
43527
|
enumerable: false,
|
|
43358
43528
|
configurable: true
|
|
43359
43529
|
});
|
|
43530
|
+
Object.defineProperty(SurveyModel.prototype, "isFirstElement", {
|
|
43531
|
+
get: function () {
|
|
43532
|
+
return this.getPropertyValue("isFirstElement");
|
|
43533
|
+
},
|
|
43534
|
+
enumerable: false,
|
|
43535
|
+
configurable: true
|
|
43536
|
+
});
|
|
43537
|
+
Object.defineProperty(SurveyModel.prototype, "isLastElement", {
|
|
43538
|
+
get: function () {
|
|
43539
|
+
return this.getPropertyValue("isLastElement");
|
|
43540
|
+
},
|
|
43541
|
+
enumerable: false,
|
|
43542
|
+
configurable: true
|
|
43543
|
+
});
|
|
43360
43544
|
SurveyModel.prototype.updateIsFirstLastPageState = function () {
|
|
43361
43545
|
var curPage = this.currentPage;
|
|
43362
43546
|
this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage);
|
|
43363
43547
|
this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage);
|
|
43548
|
+
var fVal = undefined;
|
|
43549
|
+
var lVal = undefined;
|
|
43550
|
+
var q = this.currentSingleQuestion;
|
|
43551
|
+
if (!!q) {
|
|
43552
|
+
var questions = this.getAllQuestions(true);
|
|
43553
|
+
var index = questions.indexOf(q);
|
|
43554
|
+
if (index >= 0) {
|
|
43555
|
+
fVal = index === 0;
|
|
43556
|
+
lVal = index === questions.length - 1;
|
|
43557
|
+
}
|
|
43558
|
+
}
|
|
43559
|
+
this.setPropertyValue("isFirstElement", fVal);
|
|
43560
|
+
this.setPropertyValue("isLastElement", lVal);
|
|
43364
43561
|
};
|
|
43562
|
+
Object.defineProperty(SurveyModel.prototype, "isLastPageOrElement", {
|
|
43563
|
+
get: function () {
|
|
43564
|
+
return this.isLastElement !== undefined ? this.isLastElement : this.isLastPage;
|
|
43565
|
+
},
|
|
43566
|
+
enumerable: false,
|
|
43567
|
+
configurable: true
|
|
43568
|
+
});
|
|
43569
|
+
Object.defineProperty(SurveyModel.prototype, "isFirstPageOrElement", {
|
|
43570
|
+
get: function () {
|
|
43571
|
+
return this.isFirstElement !== undefined ? this.isFirstElement : this.isFirstPage;
|
|
43572
|
+
},
|
|
43573
|
+
enumerable: false,
|
|
43574
|
+
configurable: true
|
|
43575
|
+
});
|
|
43365
43576
|
SurveyModel.prototype.calcIsShowPrevButton = function () {
|
|
43366
|
-
if (this.
|
|
43577
|
+
if (this.isFirstPageOrElement || !this.showPrevButton || this.state !== "running")
|
|
43367
43578
|
return false;
|
|
43579
|
+
if (this.isFirstElement !== undefined)
|
|
43580
|
+
return true;
|
|
43368
43581
|
var page = this.visiblePages[this.currentPageNo - 1];
|
|
43369
43582
|
return page && page.getMaxTimeToFinish() <= 0;
|
|
43370
43583
|
};
|
|
43371
43584
|
SurveyModel.prototype.calcIsShowNextButton = function () {
|
|
43372
|
-
return this.state === "running" && !this.
|
|
43585
|
+
return this.state === "running" && !this.isLastPageOrElement && !this.canBeCompletedByTrigger;
|
|
43373
43586
|
};
|
|
43374
43587
|
SurveyModel.prototype.calcIsCompleteButtonVisible = function () {
|
|
43375
43588
|
var state = this.state;
|
|
43376
43589
|
return this.isEditMode && (this.state === "running" &&
|
|
43377
|
-
(this.
|
|
43590
|
+
(this.isLastPageOrElement && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
|
|
43378
43591
|
|| state === "preview") && this.showCompleteButton;
|
|
43379
43592
|
};
|
|
43380
43593
|
SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
|
|
43381
43594
|
return (this.isEditMode &&
|
|
43382
43595
|
this.isShowPreviewBeforeComplete &&
|
|
43383
|
-
this.state == "running" && this.
|
|
43596
|
+
this.state == "running" && this.isLastPageOrElement);
|
|
43384
43597
|
};
|
|
43385
43598
|
SurveyModel.prototype.calcIsCancelPreviewButtonVisible = function () {
|
|
43386
43599
|
return (this.isEditMode &&
|
|
@@ -43389,6 +43602,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43389
43602
|
};
|
|
43390
43603
|
Object.defineProperty(SurveyModel.prototype, "firstVisiblePage", {
|
|
43391
43604
|
get: function () {
|
|
43605
|
+
if (this.visiblePageCount === 1)
|
|
43606
|
+
return this.visiblePages[0];
|
|
43392
43607
|
var pages = this.pages;
|
|
43393
43608
|
for (var i = 0; i < pages.length; i++) {
|
|
43394
43609
|
if (this.isPageInVisibleList(pages[i]))
|
|
@@ -43401,6 +43616,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43401
43616
|
});
|
|
43402
43617
|
Object.defineProperty(SurveyModel.prototype, "lastVisiblePage", {
|
|
43403
43618
|
get: function () {
|
|
43619
|
+
if (this.visiblePageCount === 1)
|
|
43620
|
+
return this.visiblePages[0];
|
|
43404
43621
|
var pages = this.pages;
|
|
43405
43622
|
for (var i = pages.length - 1; i >= 0; i--) {
|
|
43406
43623
|
if (this.isPageInVisibleList(pages[i]))
|
|
@@ -43749,7 +43966,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43749
43966
|
});
|
|
43750
43967
|
SurveyModel.prototype.updateProgressText = function (onValueChanged) {
|
|
43751
43968
|
if (onValueChanged === void 0) { onValueChanged = false; }
|
|
43752
|
-
if (this.isCalculatingProgressText || this.isShowingPreview
|
|
43969
|
+
if (this.isCalculatingProgressText || this.isShowingPreview)
|
|
43753
43970
|
return;
|
|
43754
43971
|
if (onValueChanged &&
|
|
43755
43972
|
this.progressBarType == "pages" &&
|
|
@@ -45091,7 +45308,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45091
45308
|
this.updateVisibleIndexes();
|
|
45092
45309
|
};
|
|
45093
45310
|
SurveyModel.prototype.updateVisibleIndexes = function (page) {
|
|
45094
|
-
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson
|
|
45311
|
+
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson)
|
|
45095
45312
|
return;
|
|
45096
45313
|
if (this.isRunningConditions &&
|
|
45097
45314
|
this.onQuestionVisibleChanged.isEmpty &&
|
|
@@ -45160,12 +45377,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45160
45377
|
SurveyModel.prototype.endLoadingFromJson = function () {
|
|
45161
45378
|
this.isEndLoadingFromJson = "processing";
|
|
45162
45379
|
this.onFirstPageIsStartedChanged();
|
|
45163
|
-
this.onQuestionsOnPageModeChanged("standard", true);
|
|
45164
45380
|
_super.prototype.endLoadingFromJson.call(this);
|
|
45165
45381
|
if (this.hasCookie) {
|
|
45166
45382
|
this.isCompletedBefore = true;
|
|
45167
45383
|
}
|
|
45168
45384
|
this.doElementsOnLoad();
|
|
45385
|
+
this.onQuestionsOnPageModeChanged("standard");
|
|
45169
45386
|
this.isEndLoadingFromJson = "conditions";
|
|
45170
45387
|
this.runConditions();
|
|
45171
45388
|
this.notifyElementsOnAnyValueOrVariableChanged("");
|
|
@@ -45213,7 +45430,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45213
45430
|
mouseDown: function () { return _this.navigationMouseDown(); },
|
|
45214
45431
|
},
|
|
45215
45432
|
locTitle: this.locPagePrevText,
|
|
45216
|
-
action: function () { return _this.
|
|
45433
|
+
action: function () { return _this.performPrevious(); },
|
|
45217
45434
|
component: defaultComponent
|
|
45218
45435
|
});
|
|
45219
45436
|
var navNext = new action_Action({
|
|
@@ -45493,8 +45710,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45493
45710
|
SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
|
|
45494
45711
|
if (locNotification === void 0) { locNotification = false; }
|
|
45495
45712
|
if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
|
|
45496
|
-
if (this.isLockingUpdateOnPageModes)
|
|
45497
|
-
return;
|
|
45498
45713
|
var newValue = newQuestionValue;
|
|
45499
45714
|
if (allowNotifyValueChanged) {
|
|
45500
45715
|
newValue = this.questionOnValueChanging(name, newQuestionValue);
|
|
@@ -47031,7 +47246,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47031
47246
|
jsonobject_property()
|
|
47032
47247
|
], SurveyModel.prototype, "calculatedWidthMode", void 0);
|
|
47033
47248
|
survey_decorate([
|
|
47034
|
-
jsonobject_property({
|
|
47249
|
+
jsonobject_property({
|
|
47250
|
+
defaultValue: 100,
|
|
47251
|
+
onSet: function (val, target, prevVal) {
|
|
47252
|
+
target.pages.forEach(function (p) { return p.updateRootStyle(); });
|
|
47253
|
+
},
|
|
47254
|
+
})
|
|
47035
47255
|
], SurveyModel.prototype, "widthScale", void 0);
|
|
47036
47256
|
survey_decorate([
|
|
47037
47257
|
jsonobject_property()
|
|
@@ -54290,6 +54510,9 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
|
|
|
54290
54510
|
if (title) {
|
|
54291
54511
|
_this.title = title;
|
|
54292
54512
|
}
|
|
54513
|
+
_this.editor.onPropertyChanged.add(function (sender, options) {
|
|
54514
|
+
_this.onPropertyChanged.fire(_this, options);
|
|
54515
|
+
});
|
|
54293
54516
|
return _this;
|
|
54294
54517
|
}
|
|
54295
54518
|
MultipleTextItemModel.prototype.getType = function () {
|
|
@@ -59311,7 +59534,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
|
59311
59534
|
};
|
|
59312
59535
|
_this.doClean = function () {
|
|
59313
59536
|
if (_this.needConfirmRemoveFile) {
|
|
59314
|
-
confirmActionAsync(
|
|
59537
|
+
confirmActionAsync({
|
|
59538
|
+
message: _this.confirmRemoveAllMessage,
|
|
59539
|
+
funcOnYes: function () { _this.clearFilesCore(); },
|
|
59540
|
+
locale: _this.getLocale(),
|
|
59541
|
+
rootElement: _this.survey.rootElement,
|
|
59542
|
+
cssClass: _this.cssClasses.confirmDialog
|
|
59543
|
+
});
|
|
59315
59544
|
return;
|
|
59316
59545
|
}
|
|
59317
59546
|
_this.clearFilesCore();
|
|
@@ -60320,7 +60549,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
|
60320
60549
|
var _this = this;
|
|
60321
60550
|
event.stopPropagation();
|
|
60322
60551
|
if (this.needConfirmRemoveFile) {
|
|
60323
|
-
confirmActionAsync(
|
|
60552
|
+
confirmActionAsync({
|
|
60553
|
+
message: this.getConfirmRemoveMessage(data.name),
|
|
60554
|
+
funcOnYes: function () { _this.clearFilesCore(); },
|
|
60555
|
+
locale: this.getLocale(),
|
|
60556
|
+
rootElement: this.survey.rootElement,
|
|
60557
|
+
cssClass: this.cssClasses.confirmDialog
|
|
60558
|
+
});
|
|
60324
60559
|
return;
|
|
60325
60560
|
}
|
|
60326
60561
|
this.removeFileCore(data);
|
|
@@ -66305,7 +66540,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
66305
66540
|
}
|
|
66306
66541
|
};
|
|
66307
66542
|
if (this.isRequireConfirmOnDelete(value)) {
|
|
66308
|
-
confirmActionAsync(
|
|
66543
|
+
confirmActionAsync({
|
|
66544
|
+
message: this.confirmDeleteText,
|
|
66545
|
+
funcOnYes: function () { removePanel(); },
|
|
66546
|
+
locale: this.getLocale(),
|
|
66547
|
+
rootElement: this.survey.rootElement,
|
|
66548
|
+
cssClass: this.cssClasses.confirmDialog
|
|
66549
|
+
});
|
|
66309
66550
|
}
|
|
66310
66551
|
else {
|
|
66311
66552
|
removePanel();
|
|
@@ -70446,8 +70687,8 @@ Serializer.addClass("currencymask", [
|
|
|
70446
70687
|
|
|
70447
70688
|
var Version;
|
|
70448
70689
|
var ReleaseDate;
|
|
70449
|
-
Version = "" + "1.12.
|
|
70450
|
-
ReleaseDate = "" + "2024-12-
|
|
70690
|
+
Version = "" + "1.12.16";
|
|
70691
|
+
ReleaseDate = "" + "2024-12-24";
|
|
70451
70692
|
function checkLibraryVersion(ver, libraryName) {
|
|
70452
70693
|
if (Version != ver) {
|
|
70453
70694
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|