survey-core 1.11.14 → 1.12.2
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 +159 -134
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +159 -134
- 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 +45 -45
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- 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 +45 -45
- package/i18n/japanese.js.map +1 -1
- package/i18n/japanese.min.js +2 -2
- 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/modern.css +27 -41
- package/modern.css.map +1 -1
- package/modern.fontless.css +27 -41
- 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 +1237 -436
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +45 -45
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- 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 -0
- package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/choicesRestful.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +29 -17
- package/ts3.4/typings/packages/survey-core/src/header.d.ts +2 -2
- package/ts3.4/typings/packages/survey-core/src/helpers.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/itemvalue.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/martixBase.d.ts +7 -6
- package/ts3.4/typings/packages/survey-core/src/mask/mask_base.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/mask/mask_datetime.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/page.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +6 -1
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +10 -7
- package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +12 -1
- package/ts3.4/typings/packages/survey-core/src/question_checkbox.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/question_comment.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/question_custom.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/question_file.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/question_matrix.d.ts +10 -2
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdown.d.ts +4 -1
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +23 -2
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +3 -2
- package/ts3.4/typings/packages/survey-core/src/question_matrixdynamic.d.ts +2 -1
- package/ts3.4/typings/packages/survey-core/src/question_paneldynamic.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/question_text.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +2 -1
- package/ts3.4/typings/packages/survey-core/src/utils/animation.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/utils/responsivity-manager.d.ts +1 -2
- package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +56 -0
- package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +14 -0
- package/ts3.4/typings/packages/survey-core/src/validator.d.ts +59 -16
- package/ts3.4/typings/src/defaultCss/cssmodern.d.ts +1 -0
- package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -0
- package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/typings/packages/survey-core/src/choicesRestful.d.ts +1 -0
- package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +29 -17
- package/typings/packages/survey-core/src/header.d.ts +2 -2
- package/typings/packages/survey-core/src/helpers.d.ts +1 -0
- package/typings/packages/survey-core/src/itemvalue.d.ts +3 -0
- package/typings/packages/survey-core/src/martixBase.d.ts +7 -6
- package/typings/packages/survey-core/src/mask/mask_base.d.ts +1 -0
- package/typings/packages/survey-core/src/mask/mask_datetime.d.ts +1 -0
- package/typings/packages/survey-core/src/page.d.ts +3 -0
- package/typings/packages/survey-core/src/panel.d.ts +6 -1
- package/typings/packages/survey-core/src/question.d.ts +10 -7
- package/typings/packages/survey-core/src/question_baseselect.d.ts +13 -1
- package/typings/packages/survey-core/src/question_checkbox.d.ts +1 -1
- package/typings/packages/survey-core/src/question_comment.d.ts +4 -0
- package/typings/packages/survey-core/src/question_custom.d.ts +1 -1
- package/typings/packages/survey-core/src/question_file.d.ts +1 -1
- package/typings/packages/survey-core/src/question_matrix.d.ts +10 -2
- package/typings/packages/survey-core/src/question_matrixdropdown.d.ts +4 -1
- package/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +24 -2
- package/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +3 -2
- package/typings/packages/survey-core/src/question_matrixdynamic.d.ts +2 -1
- package/typings/packages/survey-core/src/question_paneldynamic.d.ts +3 -0
- package/typings/packages/survey-core/src/question_text.d.ts +1 -1
- package/typings/packages/survey-core/src/survey-element.d.ts +1 -0
- package/typings/packages/survey-core/src/survey.d.ts +2 -1
- package/typings/packages/survey-core/src/utils/animation.d.ts +1 -0
- package/typings/packages/survey-core/src/utils/responsivity-manager.d.ts +1 -2
- package/typings/packages/survey-core/src/utils/text-area.d.ts +56 -0
- package/typings/packages/survey-core/src/utils/utils.d.ts +14 -0
- package/typings/packages/survey-core/src/validator.d.ts +60 -16
- package/typings/src/defaultCss/cssmodern.d.ts +1 -0
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.2
|
|
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
|
*/
|
|
@@ -962,9 +962,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
962
962
|
|
|
963
963
|
/***/ "./src/entries/core.ts":
|
|
964
964
|
/*!*******************************************!*\
|
|
965
|
-
!*** ./src/entries/core.ts +
|
|
965
|
+
!*** ./src/entries/core.ts + 127 modules ***!
|
|
966
966
|
\*******************************************/
|
|
967
|
-
/*! 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, 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, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
967
|
+
/*! 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, 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, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
968
968
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
969
969
|
|
|
970
970
|
"use strict";
|
|
@@ -1164,6 +1164,7 @@ __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { retu
|
|
|
1164
1164
|
__webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return /* reexport */ mask_datetime_InputMaskDateTime; });
|
|
1165
1165
|
__webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return /* reexport */ mask_currency_InputMaskCurrency; });
|
|
1166
1166
|
__webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return /* reexport */ CssClassBuilder; });
|
|
1167
|
+
__webpack_require__.d(__webpack_exports__, "TextAreaModel", function() { return /* reexport */ text_area_TextAreaModel; });
|
|
1167
1168
|
__webpack_require__.d(__webpack_exports__, "surveyCss", function() { return /* reexport */ surveyCss; });
|
|
1168
1169
|
__webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return /* reexport */ defaultV2Css; });
|
|
1169
1170
|
__webpack_require__.d(__webpack_exports__, "defaultV2ThemeName", function() { return /* reexport */ defaultV2ThemeName; });
|
|
@@ -1779,7 +1780,7 @@ var helpers_Helpers = /** @class */ (function () {
|
|
|
1779
1780
|
return Helpers.convertDateTimeToString(val);
|
|
1780
1781
|
return Helpers.convertDateToString(val);
|
|
1781
1782
|
}
|
|
1782
|
-
return val;
|
|
1783
|
+
return this.getUnbindValue(val);
|
|
1783
1784
|
};
|
|
1784
1785
|
Helpers.compareVerions = function (ver1, ver2) {
|
|
1785
1786
|
if (!ver1 && !ver2)
|
|
@@ -1802,6 +1803,18 @@ var helpers_Helpers = /** @class */ (function () {
|
|
|
1802
1803
|
}
|
|
1803
1804
|
return len1 === len2 ? 0 : (len1 < len2 ? -1 : 1);
|
|
1804
1805
|
};
|
|
1806
|
+
Helpers.isUrlYoutubeVideo = function (url) {
|
|
1807
|
+
if (!url)
|
|
1808
|
+
return false;
|
|
1809
|
+
var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
|
|
1810
|
+
url = url.toLowerCase();
|
|
1811
|
+
url = url.replace(/^https?:\/\//, "");
|
|
1812
|
+
for (var i = 0; i < youtubeDomains.length; i++) {
|
|
1813
|
+
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
|
1814
|
+
return true;
|
|
1815
|
+
}
|
|
1816
|
+
return false;
|
|
1817
|
+
};
|
|
1805
1818
|
return Helpers;
|
|
1806
1819
|
}());
|
|
1807
1820
|
|
|
@@ -9553,6 +9566,8 @@ var base_Base = /** @class */ (function () {
|
|
|
9553
9566
|
name: name,
|
|
9554
9567
|
oldValue: oldValue,
|
|
9555
9568
|
newValue: newValue,
|
|
9569
|
+
arrayChanges: arrayChanges,
|
|
9570
|
+
target: target
|
|
9556
9571
|
});
|
|
9557
9572
|
this.doPropertyValueChangedCallback(name, oldValue, newValue, arrayChanges, this);
|
|
9558
9573
|
this.checkConditionPropertyChanged(name);
|
|
@@ -10068,6 +10083,8 @@ var base_Base = /** @class */ (function () {
|
|
|
10068
10083
|
this.onElementRenderedEventEnabled = true;
|
|
10069
10084
|
};
|
|
10070
10085
|
Base.prototype.disableOnElementRenderedEvent = function () {
|
|
10086
|
+
var _a;
|
|
10087
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: true });
|
|
10071
10088
|
this.onElementRenderedEventEnabled = false;
|
|
10072
10089
|
};
|
|
10073
10090
|
Object.defineProperty(Base.prototype, "onElementRerendered", {
|
|
@@ -10079,7 +10096,7 @@ var base_Base = /** @class */ (function () {
|
|
|
10079
10096
|
});
|
|
10080
10097
|
Base.prototype.afterRerender = function () {
|
|
10081
10098
|
var _a;
|
|
10082
|
-
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this,
|
|
10099
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: false });
|
|
10083
10100
|
};
|
|
10084
10101
|
Base.currentDependencis = undefined;
|
|
10085
10102
|
return Base;
|
|
@@ -10194,6 +10211,10 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
10194
10211
|
function ResponsivityManager(container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) {
|
|
10195
10212
|
var _this = this;
|
|
10196
10213
|
if (dotsItemSize === void 0) { dotsItemSize = null; }
|
|
10214
|
+
if (delayedUpdateFunction === void 0) { delayedUpdateFunction = function (callback) { if (queueMicrotask)
|
|
10215
|
+
queueMicrotask(callback);
|
|
10216
|
+
else
|
|
10217
|
+
callback(); }; }
|
|
10197
10218
|
this.container = container;
|
|
10198
10219
|
this.model = model;
|
|
10199
10220
|
this.itemsSelector = itemsSelector;
|
|
@@ -10211,8 +10232,9 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
10211
10232
|
return DomDocumentHelper.getComputedStyle(elt);
|
|
10212
10233
|
};
|
|
10213
10234
|
this.model.updateCallback = function (isResetInitialized) {
|
|
10214
|
-
if (isResetInitialized)
|
|
10235
|
+
if (isResetInitialized) {
|
|
10215
10236
|
_this.isInitialized = false;
|
|
10237
|
+
}
|
|
10216
10238
|
setTimeout(function () { _this.process(); }, 1);
|
|
10217
10239
|
};
|
|
10218
10240
|
if (typeof ResizeObserver !== "undefined") {
|
|
@@ -10251,16 +10273,6 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
10251
10273
|
(currentAction.needSeparator ? this.separatorSize : 0)
|
|
10252
10274
|
: currentAction.maxDimension;
|
|
10253
10275
|
};
|
|
10254
|
-
ResponsivityManager.prototype.getRenderedVisibleActionsCount = function () {
|
|
10255
|
-
var _this = this;
|
|
10256
|
-
var count = 0;
|
|
10257
|
-
this.container.querySelectorAll(this.itemsSelector).forEach(function (item) {
|
|
10258
|
-
if (_this.calcItemSize(item) > 0) {
|
|
10259
|
-
count++;
|
|
10260
|
-
}
|
|
10261
|
-
});
|
|
10262
|
-
return count;
|
|
10263
|
-
};
|
|
10264
10276
|
ResponsivityManager.prototype.calcItemsSizes = function () {
|
|
10265
10277
|
var _this = this;
|
|
10266
10278
|
if (this.isInitialized)
|
|
@@ -10304,16 +10316,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
10304
10316
|
_this.isInitialized = true;
|
|
10305
10317
|
processResponsiveness_1();
|
|
10306
10318
|
};
|
|
10307
|
-
if (this.
|
|
10308
|
-
|
|
10309
|
-
this.delayedUpdateFunction(callback);
|
|
10310
|
-
}
|
|
10311
|
-
else if (queueMicrotask) {
|
|
10312
|
-
queueMicrotask(callback);
|
|
10313
|
-
}
|
|
10314
|
-
else {
|
|
10315
|
-
callback();
|
|
10316
|
-
}
|
|
10319
|
+
if (this.delayedUpdateFunction) {
|
|
10320
|
+
this.delayedUpdateFunction(callback);
|
|
10317
10321
|
}
|
|
10318
10322
|
else {
|
|
10319
10323
|
callback();
|
|
@@ -12225,7 +12229,6 @@ var animation_AnimationUtils = /** @class */ (function () {
|
|
|
12225
12229
|
var animationsCount = this.getAnimationsCount(element);
|
|
12226
12230
|
var onEndCallback = function (isCancel) {
|
|
12227
12231
|
if (isCancel === void 0) { isCancel = true; }
|
|
12228
|
-
_this.afterAnimationRun(element, options);
|
|
12229
12232
|
callback(isCancel);
|
|
12230
12233
|
clearTimeout(cancelTimeout);
|
|
12231
12234
|
_this.removeCancelCallback(onEndCallback);
|
|
@@ -12244,7 +12247,6 @@ var animation_AnimationUtils = /** @class */ (function () {
|
|
|
12244
12247
|
}, this.getAnimationDuration(element) + 10);
|
|
12245
12248
|
}
|
|
12246
12249
|
else {
|
|
12247
|
-
this.afterAnimationRun(element, options);
|
|
12248
12250
|
callback(true);
|
|
12249
12251
|
}
|
|
12250
12252
|
};
|
|
@@ -12279,6 +12281,7 @@ var animation_AnimationUtils = /** @class */ (function () {
|
|
|
12279
12281
|
element.classList.remove(cssClass);
|
|
12280
12282
|
});
|
|
12281
12283
|
}
|
|
12284
|
+
this.afterAnimationRun(element, options);
|
|
12282
12285
|
};
|
|
12283
12286
|
AnimationUtils.prototype.onNextRender = function (callback, isCancel) {
|
|
12284
12287
|
var _this = this;
|
|
@@ -12401,7 +12404,7 @@ var animation_AnimationProperty = /** @class */ (function () {
|
|
|
12401
12404
|
this.update = update;
|
|
12402
12405
|
this.getCurrentValue = getCurrentValue;
|
|
12403
12406
|
this._debouncedSync = debounce(function (newValue) {
|
|
12404
|
-
_this.
|
|
12407
|
+
_this.cancelAnimations();
|
|
12405
12408
|
try {
|
|
12406
12409
|
_this._sync(newValue);
|
|
12407
12410
|
}
|
|
@@ -12434,8 +12437,13 @@ var animation_AnimationProperty = /** @class */ (function () {
|
|
|
12434
12437
|
rerenderEvent.remove(nextRenderCallback_1);
|
|
12435
12438
|
_this.cancelCallback = undefined;
|
|
12436
12439
|
};
|
|
12437
|
-
var nextRenderCallback_1 = function () {
|
|
12438
|
-
|
|
12440
|
+
var nextRenderCallback_1 = function (_, options) {
|
|
12441
|
+
if (options.isCancel) {
|
|
12442
|
+
onCancel && onCancel();
|
|
12443
|
+
}
|
|
12444
|
+
else {
|
|
12445
|
+
callback();
|
|
12446
|
+
}
|
|
12439
12447
|
clear_1();
|
|
12440
12448
|
};
|
|
12441
12449
|
this.cancelCallback = function () {
|
|
@@ -12456,6 +12464,9 @@ var animation_AnimationProperty = /** @class */ (function () {
|
|
|
12456
12464
|
};
|
|
12457
12465
|
AnimationProperty.prototype.cancel = function () {
|
|
12458
12466
|
this._debouncedSync.cancel();
|
|
12467
|
+
this.cancelAnimations();
|
|
12468
|
+
};
|
|
12469
|
+
AnimationProperty.prototype.cancelAnimations = function () {
|
|
12459
12470
|
this.cancelCallback && this.cancelCallback();
|
|
12460
12471
|
this.animation.cancel();
|
|
12461
12472
|
};
|
|
@@ -12501,7 +12512,8 @@ var animation_AnimationGroup = /** @class */ (function (_super) {
|
|
|
12501
12512
|
AnimationGroup.prototype._sync = function (newValue) {
|
|
12502
12513
|
var _this = this;
|
|
12503
12514
|
var _a, _b;
|
|
12504
|
-
|
|
12515
|
+
newValue = [].concat(newValue);
|
|
12516
|
+
var oldValue = [].concat(this.getCurrentValue());
|
|
12505
12517
|
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
|
12506
12518
|
var _c = compareArrays(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; })), addedItems = _c.addedItems, deletedItems = _c.deletedItems, reorderedItems = _c.reorderedItems, mergedItems = _c.mergedItems;
|
|
12507
12519
|
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
|
@@ -12775,7 +12787,7 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
|
12775
12787
|
});
|
|
12776
12788
|
SurveyElementCore.prototype.getIsTitleRenderedAsString = function () { return !this.isTitleOwner; };
|
|
12777
12789
|
survey_element_decorate([
|
|
12778
|
-
jsonobject_property()
|
|
12790
|
+
jsonobject_property({})
|
|
12779
12791
|
], SurveyElementCore.prototype, "hasDescription", void 0);
|
|
12780
12792
|
survey_element_decorate([
|
|
12781
12793
|
jsonobject_property({
|
|
@@ -13365,6 +13377,14 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13365
13377
|
enumerable: false,
|
|
13366
13378
|
configurable: true
|
|
13367
13379
|
});
|
|
13380
|
+
Object.defineProperty(SurveyElement.prototype, "cssRequiredText", {
|
|
13381
|
+
get: function () {
|
|
13382
|
+
var css = this.cssClasses;
|
|
13383
|
+
return css.requiredText || (css.panel && css.panel.requiredText);
|
|
13384
|
+
},
|
|
13385
|
+
enumerable: false,
|
|
13386
|
+
configurable: true
|
|
13387
|
+
});
|
|
13368
13388
|
SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
|
|
13369
13389
|
SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
|
|
13370
13390
|
Object.defineProperty(SurveyElement.prototype, "cssError", {
|
|
@@ -13944,17 +13964,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13944
13964
|
var _this = this;
|
|
13945
13965
|
var beforeRunAnimation = function (el) {
|
|
13946
13966
|
_this.isAnimatingCollapseExpand = true;
|
|
13947
|
-
|
|
13967
|
+
prepareElementForVerticalAnimation(el);
|
|
13948
13968
|
};
|
|
13949
13969
|
var afterRunAnimation = function (el) {
|
|
13950
13970
|
_this.isAnimatingCollapseExpand = false;
|
|
13971
|
+
cleanHtmlElementAfterAnimation(el);
|
|
13951
13972
|
};
|
|
13952
13973
|
return {
|
|
13953
13974
|
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
13954
13975
|
getEnterOptions: function () {
|
|
13955
13976
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
|
13956
13977
|
return {
|
|
13957
|
-
cssClass: cssClasses.
|
|
13978
|
+
cssClass: cssClasses.contentEnter,
|
|
13958
13979
|
onBeforeRunAnimation: beforeRunAnimation,
|
|
13959
13980
|
onAfterRunAnimation: function (el) {
|
|
13960
13981
|
afterRunAnimation(el);
|
|
@@ -13964,8 +13985,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13964
13985
|
},
|
|
13965
13986
|
getLeaveOptions: function () {
|
|
13966
13987
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
|
13967
|
-
return {
|
|
13968
|
-
cssClass: cssClasses.contentFadeOut,
|
|
13988
|
+
return { cssClass: cssClasses.contentLeave,
|
|
13969
13989
|
onBeforeRunAnimation: beforeRunAnimation,
|
|
13970
13990
|
onAfterRunAnimation: afterRunAnimation
|
|
13971
13991
|
};
|
|
@@ -14797,10 +14817,142 @@ function navigateToUrl(url) {
|
|
|
14797
14817
|
function wrapUrlForBackgroundImage(url) {
|
|
14798
14818
|
return !!url ? ["url(", url, ")"].join("") : "";
|
|
14799
14819
|
}
|
|
14820
|
+
// new-name: old-name
|
|
14821
|
+
var renamedIcons = {
|
|
14822
|
+
"flip-24x24": "changecamera",
|
|
14823
|
+
"toolbox-file-24x24": "choosefile",
|
|
14824
|
+
"clear-24x24": "clear",
|
|
14825
|
+
"close-24x24": "closecamera",
|
|
14826
|
+
"file-72x72": "defaultfile",
|
|
14827
|
+
"chevronleft-16x16": "left",
|
|
14828
|
+
"plus-32x32": "modernbooleancheckchecked",
|
|
14829
|
+
"minus-32x32": "modernbooleancheckunchecked",
|
|
14830
|
+
"more-24x24": "more",
|
|
14831
|
+
"navmenu-24x24": "navmenu_24x24",
|
|
14832
|
+
"error-24x24": "removefile",
|
|
14833
|
+
"camera-32x32": "takepicture",
|
|
14834
|
+
"camera-24x24": "takepicture_24x24",
|
|
14835
|
+
"pg-quiz-24x24": "timercircle",
|
|
14836
|
+
"check-16x16": "v2check",
|
|
14837
|
+
"check-24x24": "v2check_24x24",
|
|
14838
|
+
"restoredown-16x16": "back-to-panel_16x16",
|
|
14839
|
+
"clear-16x16": "clear_16x16",
|
|
14840
|
+
"close-16x16": "close_16x16",
|
|
14841
|
+
"collapsedetails-16x16": "collapsedetail",
|
|
14842
|
+
"expanddetails-16x16": "expanddetail",
|
|
14843
|
+
"maximize-16x16": "full-screen_16x16",
|
|
14844
|
+
"loading-48x48": "loading",
|
|
14845
|
+
"minimize-16x16": "minimize_16x16",
|
|
14846
|
+
"chevronright-16x16": "next_16x16",
|
|
14847
|
+
"noimage-48x48": "no-image",
|
|
14848
|
+
"reorder-24x24": "ranking-arrows",
|
|
14849
|
+
"fullsize-16x16": "restore_16x16",
|
|
14850
|
+
"search-24x24": "search",
|
|
14851
|
+
"smiley-rate5-24x24": "average",
|
|
14852
|
+
"smiley-rate9-24x24": "excellent",
|
|
14853
|
+
"smiley-rate7-24x24": "good",
|
|
14854
|
+
"smiley-rate6-24x24": "normal",
|
|
14855
|
+
"smiley-rate4-24x24": "not-good",
|
|
14856
|
+
"smiley-rate10-24x24": "perfect",
|
|
14857
|
+
"smiley-rate3-24x24": "poor",
|
|
14858
|
+
"smiley-rate1-24x24": "terrible",
|
|
14859
|
+
"smiley-rate8-24x24": "very-good",
|
|
14860
|
+
"smiley-rate2-24x24": "very-poor",
|
|
14861
|
+
"add-16x16": "add_16x16",
|
|
14862
|
+
"add-24x24": "add_24x24",
|
|
14863
|
+
"warning-24x24": "alert_24x24",
|
|
14864
|
+
"apply-24x24": "apply",
|
|
14865
|
+
"arrowdown-24x24": "arrow-down",
|
|
14866
|
+
"arrowleft-24x24": "arrow-left",
|
|
14867
|
+
"arrowleft-16x16": "arrow-left_16x16",
|
|
14868
|
+
"arrowright-24x24": "arrow-right",
|
|
14869
|
+
"arrowright-16x16": "arrow-right_16x16",
|
|
14870
|
+
"arrowup-24x24": "arrow-up",
|
|
14871
|
+
"toolbox-boolean-24x24": "boolean",
|
|
14872
|
+
"speechbubble-16x16": "change-question-type_16x16",
|
|
14873
|
+
"toolbox-checkbox-24x24": "checkbox",
|
|
14874
|
+
"minusbox-16x16": "collapse-detail_16x16",
|
|
14875
|
+
"collapse-pg-24x24": "collapse-panel",
|
|
14876
|
+
"collapse-16x16": "collapse_16x16",
|
|
14877
|
+
"dropper-16x16": "color-picker",
|
|
14878
|
+
"toolbox-longtext-24x24": "comment",
|
|
14879
|
+
"wrench-24x24": "config",
|
|
14880
|
+
"copy-24x24": "copy",
|
|
14881
|
+
"toolbox-customquestion-24x24": "default",
|
|
14882
|
+
"delete-16x16": "delete_16x16",
|
|
14883
|
+
"delete-24x24": "delete_24x24",
|
|
14884
|
+
"hidehint-24x24": "description-hide",
|
|
14885
|
+
"hint-24x24": "description",
|
|
14886
|
+
"desktop-24x24": "device-desktop",
|
|
14887
|
+
"phone-24x24": "device-phone",
|
|
14888
|
+
"rotate-24x24": "device-rotate",
|
|
14889
|
+
"tablet-24x24": "device-tablet",
|
|
14890
|
+
"download-24x24": "download",
|
|
14891
|
+
"drag-24x24": "drag-area-indicator",
|
|
14892
|
+
"draghorizontal-24x16": "drag-area-indicator_24x16",
|
|
14893
|
+
"chevrondown-24x24": "drop-down-arrow",
|
|
14894
|
+
"chevrondown-16x16": "drop-down-arrow_16x16",
|
|
14895
|
+
"toolbox-dropdown-24x24": "dropdown",
|
|
14896
|
+
"copy-16x16": "duplicate_16x16",
|
|
14897
|
+
"edit-24x24": "edit",
|
|
14898
|
+
"edit-16x16": "edit_16x16",
|
|
14899
|
+
"finishedit-24x24": "editing-finish",
|
|
14900
|
+
"error-16x16": "error",
|
|
14901
|
+
"plusbox-16x16": "expand-detail_16x16",
|
|
14902
|
+
"expand-pg-24x24": "expand-panel",
|
|
14903
|
+
"expand-16x16": "expand_16x16",
|
|
14904
|
+
"toolbox-expression-24x24": "expression",
|
|
14905
|
+
"textedit-24x24": "fast-entry",
|
|
14906
|
+
"fix-24x24": "fix",
|
|
14907
|
+
"toolbox-html-24x24": "html",
|
|
14908
|
+
"toolbox-image-24x24": "image",
|
|
14909
|
+
"toolbox-imagepicker-24x24": "imagepicker",
|
|
14910
|
+
"import-24x24": "import",
|
|
14911
|
+
"invisible-24x24": "invisible-items",
|
|
14912
|
+
"language-24x24": "language",
|
|
14913
|
+
"folder-24x24": "load",
|
|
14914
|
+
"collapsepage-16x16": "logic-collapse",
|
|
14915
|
+
"expandpage-16x16": "logic-expand",
|
|
14916
|
+
"image-48x48": "logo",
|
|
14917
|
+
"toolbox-matrix-24x24": "matrix",
|
|
14918
|
+
"toolbox-multimatrix-24x24": "matrixdropdown",
|
|
14919
|
+
"toolbox-dynamicmatrix-24x24": "matrixdynamic",
|
|
14920
|
+
"toolbox-multipletext-24x24": "multipletext",
|
|
14921
|
+
"toolbox-panel-24x24": "panel",
|
|
14922
|
+
"toolbox-dynamicpanel-24x24": "paneldynamic",
|
|
14923
|
+
"preview-24x24": "preview",
|
|
14924
|
+
"toolbox-radiogroup-24x24": "radiogroup",
|
|
14925
|
+
"toolbox-ranking-24x24": "ranking",
|
|
14926
|
+
"toolbox-rating-24x24": "rating",
|
|
14927
|
+
"redo-24x24": "redo",
|
|
14928
|
+
"remove-16x16": "remove_16x16",
|
|
14929
|
+
"required-16x16": "required",
|
|
14930
|
+
"restore-24x24": "reset",
|
|
14931
|
+
"save-24x24": "save",
|
|
14932
|
+
"selectpage-24x24": "select-page",
|
|
14933
|
+
"settings-24x24": "settings",
|
|
14934
|
+
"settings-16x16": "settings_16x16",
|
|
14935
|
+
"toolbox-signature-24x24": "signaturepad",
|
|
14936
|
+
"switchon-16x16": "switch-active_16x16",
|
|
14937
|
+
"switchoff-16x16": "switch-inactive_16x16",
|
|
14938
|
+
"toolbox-tagbox-24x24": "tagbox",
|
|
14939
|
+
"toolbox-singleline-24x24": "text",
|
|
14940
|
+
"theme-24x24": "theme",
|
|
14941
|
+
"toolbox-24x24": "toolbox",
|
|
14942
|
+
"undo-24x24": "undo",
|
|
14943
|
+
"visible-24x24": "visible",
|
|
14944
|
+
"wand-24x24": "wizard"
|
|
14945
|
+
};
|
|
14800
14946
|
function getIconNameFromProxy(iconName) {
|
|
14801
14947
|
if (!iconName)
|
|
14802
14948
|
return iconName;
|
|
14803
14949
|
var proxyName = settings.customIcons[iconName];
|
|
14950
|
+
if (!proxyName) {
|
|
14951
|
+
var oldName = renamedIcons[iconName];
|
|
14952
|
+
if (!!oldName) {
|
|
14953
|
+
proxyName = settings.customIcons[oldName];
|
|
14954
|
+
}
|
|
14955
|
+
}
|
|
14804
14956
|
return !!proxyName ? proxyName : iconName;
|
|
14805
14957
|
}
|
|
14806
14958
|
function createSvg(size, width, height, iconName, svgElem, title) {
|
|
@@ -15195,6 +15347,53 @@ function compareArrays(oldValue, newValue, getKey) {
|
|
|
15195
15347
|
});
|
|
15196
15348
|
return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
|
|
15197
15349
|
}
|
|
15350
|
+
function getVerticalDimensions(el) {
|
|
15351
|
+
if (DomDocumentHelper.isAvailable()) {
|
|
15352
|
+
var _a = DomDocumentHelper.getComputedStyle(el), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, borderTopWidth = _a.borderTopWidth, borderBottomWidth = _a.borderBottomWidth, marginTop = _a.marginTop, marginBottom = _a.marginBottom, boxSizing = _a.boxSizing;
|
|
15353
|
+
var heightTo = el.offsetHeight + "px";
|
|
15354
|
+
if (boxSizing == "content-box") {
|
|
15355
|
+
var heightPx_1 = el.offsetHeight;
|
|
15356
|
+
[borderBottomWidth, borderTopWidth, paddingBottom, paddingTop].forEach(function (style) {
|
|
15357
|
+
heightPx_1 -= parseFloat(style);
|
|
15358
|
+
});
|
|
15359
|
+
heightTo = heightPx_1 + "px";
|
|
15360
|
+
}
|
|
15361
|
+
return {
|
|
15362
|
+
paddingTop: paddingTop,
|
|
15363
|
+
paddingBottom: paddingBottom,
|
|
15364
|
+
borderTopWidth: borderTopWidth,
|
|
15365
|
+
borderBottomWidth: borderBottomWidth,
|
|
15366
|
+
marginTop: marginTop,
|
|
15367
|
+
marginBottom: marginBottom,
|
|
15368
|
+
heightFrom: "0px",
|
|
15369
|
+
heightTo: heightTo
|
|
15370
|
+
};
|
|
15371
|
+
}
|
|
15372
|
+
else {
|
|
15373
|
+
return undefined;
|
|
15374
|
+
}
|
|
15375
|
+
}
|
|
15376
|
+
function setPropertiesOnElementForAnimation(el, styles, prefix) {
|
|
15377
|
+
var _a;
|
|
15378
|
+
if (prefix === void 0) { prefix = "--animation-"; }
|
|
15379
|
+
el["__sv_created_properties"] = (_a = el["__sv_created_properties"]) !== null && _a !== void 0 ? _a : [];
|
|
15380
|
+
Object.keys(styles).forEach(function (key) {
|
|
15381
|
+
var propertyName = "" + prefix + key.split(/\.?(?=[A-Z])/).join("-").toLowerCase();
|
|
15382
|
+
el.style.setProperty(propertyName, styles[key]);
|
|
15383
|
+
el["__sv_created_properties"].push(propertyName);
|
|
15384
|
+
});
|
|
15385
|
+
}
|
|
15386
|
+
function prepareElementForVerticalAnimation(el) {
|
|
15387
|
+
setPropertiesOnElementForAnimation(el, getVerticalDimensions(el));
|
|
15388
|
+
}
|
|
15389
|
+
function cleanHtmlElementAfterAnimation(el) {
|
|
15390
|
+
if (Array.isArray(el["__sv_created_properties"])) {
|
|
15391
|
+
el["__sv_created_properties"].forEach(function (propertyName) {
|
|
15392
|
+
el.style.removeProperty(propertyName);
|
|
15393
|
+
});
|
|
15394
|
+
delete el["__sv_created_properties"];
|
|
15395
|
+
}
|
|
15396
|
+
}
|
|
15198
15397
|
function roundTo2Decimals(number) {
|
|
15199
15398
|
return Math.round(number * 100) / 100;
|
|
15200
15399
|
}
|
|
@@ -16332,7 +16531,9 @@ var ValidatorResult = /** @class */ (function () {
|
|
|
16332
16531
|
}());
|
|
16333
16532
|
|
|
16334
16533
|
/**
|
|
16335
|
-
*
|
|
16534
|
+
* A base class for all classes that implement validators.
|
|
16535
|
+
*
|
|
16536
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16336
16537
|
*/
|
|
16337
16538
|
var validator_SurveyValidator = /** @class */ (function (_super) {
|
|
16338
16539
|
validator_extends(SurveyValidator, _super);
|
|
@@ -16348,6 +16549,9 @@ var validator_SurveyValidator = /** @class */ (function (_super) {
|
|
|
16348
16549
|
: null;
|
|
16349
16550
|
};
|
|
16350
16551
|
Object.defineProperty(SurveyValidator.prototype, "text", {
|
|
16552
|
+
/**
|
|
16553
|
+
* An error message to display when a value fails validation.
|
|
16554
|
+
*/
|
|
16351
16555
|
get: function () {
|
|
16352
16556
|
return this.getLocalizableStringText("text");
|
|
16353
16557
|
},
|
|
@@ -16488,7 +16692,9 @@ var ValidatorRunner = /** @class */ (function () {
|
|
|
16488
16692
|
}());
|
|
16489
16693
|
|
|
16490
16694
|
/**
|
|
16491
|
-
*
|
|
16695
|
+
* A class that implements a validator for numeric values.
|
|
16696
|
+
*
|
|
16697
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16492
16698
|
*/
|
|
16493
16699
|
var validator_NumericValidator = /** @class */ (function (_super) {
|
|
16494
16700
|
validator_extends(NumericValidator, _super);
|
|
@@ -16537,7 +16743,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
|
|
|
16537
16743
|
};
|
|
16538
16744
|
Object.defineProperty(NumericValidator.prototype, "minValue", {
|
|
16539
16745
|
/**
|
|
16540
|
-
*
|
|
16746
|
+
* A minimum allowed numeric value.
|
|
16747
|
+
*
|
|
16748
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16541
16749
|
*/
|
|
16542
16750
|
get: function () {
|
|
16543
16751
|
return this.getPropertyValue("minValue");
|
|
@@ -16550,7 +16758,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
|
|
|
16550
16758
|
});
|
|
16551
16759
|
Object.defineProperty(NumericValidator.prototype, "maxValue", {
|
|
16552
16760
|
/**
|
|
16553
|
-
*
|
|
16761
|
+
* A maximum allowed numeric value.
|
|
16762
|
+
*
|
|
16763
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16554
16764
|
*/
|
|
16555
16765
|
get: function () {
|
|
16556
16766
|
return this.getPropertyValue("maxValue");
|
|
@@ -16565,7 +16775,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
|
|
|
16565
16775
|
}(validator_SurveyValidator));
|
|
16566
16776
|
|
|
16567
16777
|
/**
|
|
16568
|
-
*
|
|
16778
|
+
* A class that implements a validator for text values.
|
|
16779
|
+
*
|
|
16780
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16569
16781
|
*/
|
|
16570
16782
|
var TextValidator = /** @class */ (function (_super) {
|
|
16571
16783
|
validator_extends(TextValidator, _super);
|
|
@@ -16604,7 +16816,11 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16604
16816
|
};
|
|
16605
16817
|
Object.defineProperty(TextValidator.prototype, "minLength", {
|
|
16606
16818
|
/**
|
|
16607
|
-
* The
|
|
16819
|
+
* The minimum length of a text value measured in characters.
|
|
16820
|
+
*
|
|
16821
|
+
* Default value: 0
|
|
16822
|
+
*
|
|
16823
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16608
16824
|
*/
|
|
16609
16825
|
get: function () {
|
|
16610
16826
|
return this.getPropertyValue("minLength");
|
|
@@ -16617,7 +16833,11 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16617
16833
|
});
|
|
16618
16834
|
Object.defineProperty(TextValidator.prototype, "maxLength", {
|
|
16619
16835
|
/**
|
|
16620
|
-
* The
|
|
16836
|
+
* The maximum length of a text value measured in characters.
|
|
16837
|
+
*
|
|
16838
|
+
* Default value: 0 (unlimited)
|
|
16839
|
+
*
|
|
16840
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16621
16841
|
*/
|
|
16622
16842
|
get: function () {
|
|
16623
16843
|
return this.getPropertyValue("maxLength");
|
|
@@ -16630,7 +16850,9 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16630
16850
|
});
|
|
16631
16851
|
Object.defineProperty(TextValidator.prototype, "allowDigits", {
|
|
16632
16852
|
/**
|
|
16633
|
-
*
|
|
16853
|
+
* Specifies whether a text value can include numerical digits.
|
|
16854
|
+
*
|
|
16855
|
+
* Default value: `true`
|
|
16634
16856
|
*/
|
|
16635
16857
|
get: function () {
|
|
16636
16858
|
return this.getPropertyValue("allowDigits");
|
|
@@ -16645,7 +16867,9 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16645
16867
|
}(validator_SurveyValidator));
|
|
16646
16868
|
|
|
16647
16869
|
/**
|
|
16648
|
-
*
|
|
16870
|
+
* A class that implements answer count validation in the question types that can have multiple values (for instance, [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model)).
|
|
16871
|
+
*
|
|
16872
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16649
16873
|
*/
|
|
16650
16874
|
var AnswerCountValidator = /** @class */ (function (_super) {
|
|
16651
16875
|
validator_extends(AnswerCountValidator, _super);
|
|
@@ -16682,7 +16906,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
|
|
|
16682
16906
|
};
|
|
16683
16907
|
Object.defineProperty(AnswerCountValidator.prototype, "minCount", {
|
|
16684
16908
|
/**
|
|
16685
|
-
*
|
|
16909
|
+
* A minimum number of selected answers.
|
|
16910
|
+
*
|
|
16911
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16686
16912
|
*/
|
|
16687
16913
|
get: function () {
|
|
16688
16914
|
return this.getPropertyValue("minCount");
|
|
@@ -16695,7 +16921,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
|
|
|
16695
16921
|
});
|
|
16696
16922
|
Object.defineProperty(AnswerCountValidator.prototype, "maxCount", {
|
|
16697
16923
|
/**
|
|
16698
|
-
*
|
|
16924
|
+
* A maximum number of selected answers.
|
|
16925
|
+
*
|
|
16926
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16699
16927
|
*/
|
|
16700
16928
|
get: function () {
|
|
16701
16929
|
return this.getPropertyValue("maxCount");
|
|
@@ -16710,7 +16938,7 @@ var AnswerCountValidator = /** @class */ (function (_super) {
|
|
|
16710
16938
|
}(validator_SurveyValidator));
|
|
16711
16939
|
|
|
16712
16940
|
/**
|
|
16713
|
-
*
|
|
16941
|
+
* A class that implements validation using regular expressions.
|
|
16714
16942
|
*
|
|
16715
16943
|
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16716
16944
|
*/
|
|
@@ -16748,7 +16976,9 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
16748
16976
|
};
|
|
16749
16977
|
Object.defineProperty(RegexValidator.prototype, "regex", {
|
|
16750
16978
|
/**
|
|
16751
|
-
*
|
|
16979
|
+
* A regular expression used to validate values.
|
|
16980
|
+
*
|
|
16981
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16752
16982
|
*/
|
|
16753
16983
|
get: function () {
|
|
16754
16984
|
return this.getPropertyValue("regex");
|
|
@@ -16759,24 +16989,39 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
16759
16989
|
enumerable: false,
|
|
16760
16990
|
configurable: true
|
|
16761
16991
|
});
|
|
16762
|
-
Object.defineProperty(RegexValidator.prototype, "
|
|
16992
|
+
Object.defineProperty(RegexValidator.prototype, "caseInsensitive", {
|
|
16993
|
+
/**
|
|
16994
|
+
* Specifies whether uppercase and lowercase letters must be treated as distinct or equivalent when validating values.
|
|
16995
|
+
*
|
|
16996
|
+
* Default value: `false` (uppercase and lowercase letters are treated as distinct)
|
|
16997
|
+
*/
|
|
16763
16998
|
get: function () {
|
|
16764
|
-
return this.getPropertyValue("
|
|
16999
|
+
return this.getPropertyValue("caseInsensitive");
|
|
17000
|
+
},
|
|
17001
|
+
set: function (val) {
|
|
17002
|
+
this.setPropertyValue("caseInsensitive", val);
|
|
16765
17003
|
},
|
|
17004
|
+
enumerable: false,
|
|
17005
|
+
configurable: true
|
|
17006
|
+
});
|
|
17007
|
+
Object.defineProperty(RegexValidator.prototype, "insensitive", {
|
|
17008
|
+
get: function () { return this.caseInsensitive; },
|
|
16766
17009
|
set: function (val) {
|
|
16767
|
-
this.
|
|
17010
|
+
this.caseInsensitive = val;
|
|
16768
17011
|
},
|
|
16769
17012
|
enumerable: false,
|
|
16770
17013
|
configurable: true
|
|
16771
17014
|
});
|
|
16772
17015
|
RegexValidator.prototype.createRegExp = function () {
|
|
16773
|
-
return new RegExp(this.regex, this.
|
|
17016
|
+
return new RegExp(this.regex, this.caseInsensitive ? "i" : "");
|
|
16774
17017
|
};
|
|
16775
17018
|
return RegexValidator;
|
|
16776
17019
|
}(validator_SurveyValidator));
|
|
16777
17020
|
|
|
16778
17021
|
/**
|
|
16779
|
-
*
|
|
17022
|
+
* A class that implements a validator for e-mail addresses.
|
|
17023
|
+
*
|
|
17024
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16780
17025
|
*/
|
|
16781
17026
|
var EmailValidator = /** @class */ (function (_super) {
|
|
16782
17027
|
validator_extends(EmailValidator, _super);
|
|
@@ -16805,7 +17050,9 @@ var EmailValidator = /** @class */ (function (_super) {
|
|
|
16805
17050
|
}(validator_SurveyValidator));
|
|
16806
17051
|
|
|
16807
17052
|
/**
|
|
16808
|
-
*
|
|
17053
|
+
* A class that implements validation using [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
|
|
17054
|
+
*
|
|
17055
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16809
17056
|
*/
|
|
16810
17057
|
var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
16811
17058
|
validator_extends(ExpressionValidator, _super);
|
|
@@ -16884,7 +17131,9 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
|
16884
17131
|
};
|
|
16885
17132
|
Object.defineProperty(ExpressionValidator.prototype, "expression", {
|
|
16886
17133
|
/**
|
|
16887
|
-
*
|
|
17134
|
+
* A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `false`, validation fails.
|
|
17135
|
+
*
|
|
17136
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16888
17137
|
*/
|
|
16889
17138
|
get: function () {
|
|
16890
17139
|
return this.getPropertyValue("expression");
|
|
@@ -16912,7 +17161,7 @@ Serializer.addClass("textvalidator", [{ name: "minLength:number", default: 0 },
|
|
|
16912
17161
|
Serializer.addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
|
|
16913
17162
|
return new AnswerCountValidator();
|
|
16914
17163
|
}, "surveyvalidator");
|
|
16915
|
-
Serializer.addClass("regexvalidator", ["regex", { name: "
|
|
17164
|
+
Serializer.addClass("regexvalidator", ["regex", { name: "caseInsensitive:boolean", alternativeName: "insensitive" }], function () {
|
|
16916
17165
|
return new RegexValidator();
|
|
16917
17166
|
}, "surveyvalidator");
|
|
16918
17167
|
Serializer.addClass("emailvalidator", [], function () {
|
|
@@ -17142,6 +17391,188 @@ var RendererFactory = /** @class */ (function () {
|
|
|
17142
17391
|
}());
|
|
17143
17392
|
|
|
17144
17393
|
|
|
17394
|
+
// CONCATENATED MODULE: ./packages/survey-core/src/utils/text-area.ts
|
|
17395
|
+
|
|
17396
|
+
var text_area_TextAreaModel = /** @class */ (function () {
|
|
17397
|
+
function TextAreaModel(options) {
|
|
17398
|
+
var _this = this;
|
|
17399
|
+
this.options = options;
|
|
17400
|
+
this.onPropertyChangedCallback = function () {
|
|
17401
|
+
if (_this.element) {
|
|
17402
|
+
_this.element.value = _this.getTextValue();
|
|
17403
|
+
if (_this.autoGrow) {
|
|
17404
|
+
increaseHeightByContent(_this.element);
|
|
17405
|
+
}
|
|
17406
|
+
}
|
|
17407
|
+
};
|
|
17408
|
+
this.question.registerFunctionOnPropertyValueChanged(this.options.propertyName, this.onPropertyChangedCallback, "__textarea");
|
|
17409
|
+
}
|
|
17410
|
+
TextAreaModel.prototype.setElement = function (element) {
|
|
17411
|
+
if (!!element) {
|
|
17412
|
+
this.element = element;
|
|
17413
|
+
}
|
|
17414
|
+
};
|
|
17415
|
+
TextAreaModel.prototype.getTextValue = function () {
|
|
17416
|
+
if (!!this.options.getTextValue)
|
|
17417
|
+
return this.options.getTextValue();
|
|
17418
|
+
return "";
|
|
17419
|
+
};
|
|
17420
|
+
TextAreaModel.prototype.onTextAreaChange = function (event) {
|
|
17421
|
+
if (!!this.options.onTextAreaChange)
|
|
17422
|
+
this.options.onTextAreaChange(event);
|
|
17423
|
+
};
|
|
17424
|
+
TextAreaModel.prototype.onTextAreaInput = function (event) {
|
|
17425
|
+
if (!!this.options.onTextAreaInput)
|
|
17426
|
+
this.options.onTextAreaInput(event);
|
|
17427
|
+
if (this.element && this.autoGrow) {
|
|
17428
|
+
increaseHeightByContent(this.element);
|
|
17429
|
+
}
|
|
17430
|
+
};
|
|
17431
|
+
TextAreaModel.prototype.onTextAreaKeyDown = function (event) {
|
|
17432
|
+
if (!!this.options.onTextAreaKeyDown)
|
|
17433
|
+
this.options.onTextAreaKeyDown(event);
|
|
17434
|
+
};
|
|
17435
|
+
TextAreaModel.prototype.onTextAreaBlur = function (event) {
|
|
17436
|
+
this.onTextAreaChange(event);
|
|
17437
|
+
if (!!this.options.onTextAreaBlur)
|
|
17438
|
+
this.options.onTextAreaBlur(event);
|
|
17439
|
+
};
|
|
17440
|
+
TextAreaModel.prototype.onTextAreaFocus = function (event) {
|
|
17441
|
+
if (!!this.options.onTextAreaFocus)
|
|
17442
|
+
this.options.onTextAreaFocus(event);
|
|
17443
|
+
};
|
|
17444
|
+
Object.defineProperty(TextAreaModel.prototype, "question", {
|
|
17445
|
+
get: function () {
|
|
17446
|
+
return this.options.question;
|
|
17447
|
+
},
|
|
17448
|
+
enumerable: false,
|
|
17449
|
+
configurable: true
|
|
17450
|
+
});
|
|
17451
|
+
Object.defineProperty(TextAreaModel.prototype, "id", {
|
|
17452
|
+
get: function () {
|
|
17453
|
+
return this.options.id();
|
|
17454
|
+
},
|
|
17455
|
+
enumerable: false,
|
|
17456
|
+
configurable: true
|
|
17457
|
+
});
|
|
17458
|
+
Object.defineProperty(TextAreaModel.prototype, "placeholder", {
|
|
17459
|
+
get: function () {
|
|
17460
|
+
return this.options.placeholder();
|
|
17461
|
+
},
|
|
17462
|
+
enumerable: false,
|
|
17463
|
+
configurable: true
|
|
17464
|
+
});
|
|
17465
|
+
Object.defineProperty(TextAreaModel.prototype, "className", {
|
|
17466
|
+
get: function () {
|
|
17467
|
+
return this.options.className();
|
|
17468
|
+
},
|
|
17469
|
+
enumerable: false,
|
|
17470
|
+
configurable: true
|
|
17471
|
+
});
|
|
17472
|
+
Object.defineProperty(TextAreaModel.prototype, "maxLength", {
|
|
17473
|
+
get: function () {
|
|
17474
|
+
if (this.options.maxLength)
|
|
17475
|
+
return this.options.maxLength();
|
|
17476
|
+
},
|
|
17477
|
+
enumerable: false,
|
|
17478
|
+
configurable: true
|
|
17479
|
+
});
|
|
17480
|
+
Object.defineProperty(TextAreaModel.prototype, "autoGrow", {
|
|
17481
|
+
get: function () {
|
|
17482
|
+
if (this.options.autoGrow)
|
|
17483
|
+
return this.options.autoGrow();
|
|
17484
|
+
},
|
|
17485
|
+
enumerable: false,
|
|
17486
|
+
configurable: true
|
|
17487
|
+
});
|
|
17488
|
+
Object.defineProperty(TextAreaModel.prototype, "rows", {
|
|
17489
|
+
get: function () {
|
|
17490
|
+
if (this.options.rows)
|
|
17491
|
+
return this.options.rows();
|
|
17492
|
+
},
|
|
17493
|
+
enumerable: false,
|
|
17494
|
+
configurable: true
|
|
17495
|
+
});
|
|
17496
|
+
Object.defineProperty(TextAreaModel.prototype, "cols", {
|
|
17497
|
+
get: function () {
|
|
17498
|
+
if (this.options.cols)
|
|
17499
|
+
return this.options.cols();
|
|
17500
|
+
},
|
|
17501
|
+
enumerable: false,
|
|
17502
|
+
configurable: true
|
|
17503
|
+
});
|
|
17504
|
+
Object.defineProperty(TextAreaModel.prototype, "isDisabledAttr", {
|
|
17505
|
+
get: function () {
|
|
17506
|
+
return this.options.isDisabledAttr();
|
|
17507
|
+
},
|
|
17508
|
+
enumerable: false,
|
|
17509
|
+
configurable: true
|
|
17510
|
+
});
|
|
17511
|
+
Object.defineProperty(TextAreaModel.prototype, "isReadOnlyAttr", {
|
|
17512
|
+
get: function () {
|
|
17513
|
+
if (this.options.isReadOnlyAttr)
|
|
17514
|
+
return this.options.isReadOnlyAttr();
|
|
17515
|
+
},
|
|
17516
|
+
enumerable: false,
|
|
17517
|
+
configurable: true
|
|
17518
|
+
});
|
|
17519
|
+
Object.defineProperty(TextAreaModel.prototype, "ariaRequired", {
|
|
17520
|
+
get: function () {
|
|
17521
|
+
if (this.options.ariaRequired)
|
|
17522
|
+
return this.options.ariaRequired();
|
|
17523
|
+
},
|
|
17524
|
+
enumerable: false,
|
|
17525
|
+
configurable: true
|
|
17526
|
+
});
|
|
17527
|
+
Object.defineProperty(TextAreaModel.prototype, "ariaLabel", {
|
|
17528
|
+
get: function () {
|
|
17529
|
+
if (this.options.ariaLabel)
|
|
17530
|
+
return this.options.ariaLabel();
|
|
17531
|
+
},
|
|
17532
|
+
enumerable: false,
|
|
17533
|
+
configurable: true
|
|
17534
|
+
});
|
|
17535
|
+
Object.defineProperty(TextAreaModel.prototype, "ariaInvalid", {
|
|
17536
|
+
get: function () {
|
|
17537
|
+
if (this.options.ariaInvalid)
|
|
17538
|
+
return this.options.ariaInvalid();
|
|
17539
|
+
},
|
|
17540
|
+
enumerable: false,
|
|
17541
|
+
configurable: true
|
|
17542
|
+
});
|
|
17543
|
+
Object.defineProperty(TextAreaModel.prototype, "ariaLabelledBy", {
|
|
17544
|
+
get: function () {
|
|
17545
|
+
if (this.options.ariaLabelledBy)
|
|
17546
|
+
return this.options.ariaLabelledBy();
|
|
17547
|
+
},
|
|
17548
|
+
enumerable: false,
|
|
17549
|
+
configurable: true
|
|
17550
|
+
});
|
|
17551
|
+
Object.defineProperty(TextAreaModel.prototype, "ariaDescribedBy", {
|
|
17552
|
+
get: function () {
|
|
17553
|
+
if (this.options.ariaDescribedBy)
|
|
17554
|
+
return this.options.ariaDescribedBy();
|
|
17555
|
+
},
|
|
17556
|
+
enumerable: false,
|
|
17557
|
+
configurable: true
|
|
17558
|
+
});
|
|
17559
|
+
Object.defineProperty(TextAreaModel.prototype, "ariaErrormessage", {
|
|
17560
|
+
get: function () {
|
|
17561
|
+
if (this.options.ariaErrormessage)
|
|
17562
|
+
return this.options.ariaErrormessage();
|
|
17563
|
+
},
|
|
17564
|
+
enumerable: false,
|
|
17565
|
+
configurable: true
|
|
17566
|
+
});
|
|
17567
|
+
TextAreaModel.prototype.dispose = function () {
|
|
17568
|
+
if (this.question) {
|
|
17569
|
+
this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName, "__textarea");
|
|
17570
|
+
}
|
|
17571
|
+
};
|
|
17572
|
+
return TextAreaModel;
|
|
17573
|
+
}());
|
|
17574
|
+
|
|
17575
|
+
|
|
17145
17576
|
// CONCATENATED MODULE: ./packages/survey-core/src/question.ts
|
|
17146
17577
|
var question_extends = (undefined && undefined.__extends) || (function () {
|
|
17147
17578
|
var extendStatics = function (d, b) {
|
|
@@ -17179,6 +17610,7 @@ var question_decorate = (undefined && undefined.__decorate) || function (decorat
|
|
|
17179
17610
|
|
|
17180
17611
|
|
|
17181
17612
|
|
|
17613
|
+
|
|
17182
17614
|
var TriggerExpressionInfo = /** @class */ (function () {
|
|
17183
17615
|
function TriggerExpressionInfo(name, canRun, doComplete) {
|
|
17184
17616
|
this.name = name;
|
|
@@ -17221,6 +17653,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17221
17653
|
_this.createNewArray("validators", function (validator) {
|
|
17222
17654
|
validator.errorOwner = _this;
|
|
17223
17655
|
});
|
|
17656
|
+
_this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
|
|
17224
17657
|
_this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
|
|
17225
17658
|
_this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
|
|
17226
17659
|
_this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
|
|
@@ -17261,6 +17694,26 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17261
17694
|
Question.getQuestionId = function () {
|
|
17262
17695
|
return "sq_" + Question.questionCounter++;
|
|
17263
17696
|
};
|
|
17697
|
+
Question.prototype.getCommentTextAreaOptions = function () {
|
|
17698
|
+
var _this = this;
|
|
17699
|
+
var options = {
|
|
17700
|
+
question: this,
|
|
17701
|
+
id: function () { return _this.commentId; },
|
|
17702
|
+
propertyName: "comment",
|
|
17703
|
+
className: function () { return _this.cssClasses.comment; },
|
|
17704
|
+
placeholder: function () { return _this.renderedCommentPlaceholder; },
|
|
17705
|
+
isDisabledAttr: function () { return _this.isInputReadOnly || false; },
|
|
17706
|
+
rows: function () { return _this.commentAreaRows; },
|
|
17707
|
+
autoGrow: function () { return _this.autoGrowComment; },
|
|
17708
|
+
maxLength: function () { return _this.getOthersMaxLength(); },
|
|
17709
|
+
ariaRequired: function () { return _this.a11y_input_ariaRequired; },
|
|
17710
|
+
ariaLabel: function () { return _this.a11y_input_ariaLabel; },
|
|
17711
|
+
getTextValue: function () { return _this.comment; },
|
|
17712
|
+
onTextAreaChange: function (e) { _this.onCommentChange(e); },
|
|
17713
|
+
onTextAreaInput: function (e) { _this.onCommentInput(e); },
|
|
17714
|
+
};
|
|
17715
|
+
return options;
|
|
17716
|
+
};
|
|
17264
17717
|
Question.prototype.isReadOnlyRenderDiv = function () {
|
|
17265
17718
|
return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
|
|
17266
17719
|
};
|
|
@@ -18183,13 +18636,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18183
18636
|
configurable: true
|
|
18184
18637
|
});
|
|
18185
18638
|
Question.prototype.updateCommentElements = function () {
|
|
18186
|
-
if (!this.autoGrowComment || !Array.isArray(this.commentElements))
|
|
18187
|
-
return;
|
|
18188
|
-
for (var i = 0; i < this.commentElements.length; i++) {
|
|
18189
|
-
var el = this.commentElements[i];
|
|
18190
|
-
if (el)
|
|
18191
|
-
increaseHeightByContent(el);
|
|
18192
|
-
}
|
|
18193
18639
|
};
|
|
18194
18640
|
Question.prototype.onCommentInput = function (event) {
|
|
18195
18641
|
if (this.isInputTextUpdate) {
|
|
@@ -19286,11 +19732,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19286
19732
|
});
|
|
19287
19733
|
Object.defineProperty(Question.prototype, "resetValueIf", {
|
|
19288
19734
|
/**
|
|
19289
|
-
* A Boolean expression. If it evaluates to `true`, the question value is reset to [default](#defaultValue).
|
|
19735
|
+
* A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `true`, the question value is reset to [default](#defaultValue).
|
|
19290
19736
|
*
|
|
19291
19737
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
|
19292
19738
|
*
|
|
19293
|
-
* [
|
|
19739
|
+
* [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
|
|
19294
19740
|
* @see setValueIf
|
|
19295
19741
|
*/
|
|
19296
19742
|
get: function () {
|
|
@@ -19304,11 +19750,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19304
19750
|
});
|
|
19305
19751
|
Object.defineProperty(Question.prototype, "setValueIf", {
|
|
19306
19752
|
/**
|
|
19307
|
-
* A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
|
|
19753
|
+
* A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
|
|
19308
19754
|
*
|
|
19309
19755
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
|
19310
19756
|
*
|
|
19311
|
-
* [
|
|
19757
|
+
* [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
|
|
19312
19758
|
* @see resetValueIf
|
|
19313
19759
|
*/
|
|
19314
19760
|
get: function () {
|
|
@@ -19322,11 +19768,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19322
19768
|
});
|
|
19323
19769
|
Object.defineProperty(Question.prototype, "setValueExpression", {
|
|
19324
19770
|
/**
|
|
19325
|
-
* An expression used to calculate the question value.
|
|
19771
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the question value.
|
|
19326
19772
|
*
|
|
19327
19773
|
* You can use `setValueExpression` as a standalone property or in conjunction with the [`setValueIf`](#setValueIf) expression, in which case the calculated question value applies only when `setValueIf` evaluates to `true`.
|
|
19328
19774
|
*
|
|
19329
|
-
* [
|
|
19775
|
+
* [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
|
|
19330
19776
|
* @see defaultValueExpression
|
|
19331
19777
|
* @see resetValueIf
|
|
19332
19778
|
*/
|
|
@@ -19722,7 +20168,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19722
20168
|
Question.prototype.hasErrors = function (fireCallback, rec) {
|
|
19723
20169
|
if (fireCallback === void 0) { fireCallback = true; }
|
|
19724
20170
|
if (rec === void 0) { rec = null; }
|
|
19725
|
-
var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true);
|
|
20171
|
+
var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true, fireCallback);
|
|
19726
20172
|
if (fireCallback) {
|
|
19727
20173
|
if (!!this.survey) {
|
|
19728
20174
|
this.survey.beforeSettingQuestionErrors(this, errors);
|
|
@@ -19797,18 +20243,18 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19797
20243
|
if (index !== -1)
|
|
19798
20244
|
errors.splice(index, 1);
|
|
19799
20245
|
};
|
|
19800
|
-
Question.prototype.checkForErrors = function (isOnValueChanged) {
|
|
20246
|
+
Question.prototype.checkForErrors = function (isOnValueChanged, fireCallback) {
|
|
19801
20247
|
var qErrors = new Array();
|
|
19802
20248
|
if (this.isVisible && this.canCollectErrors()) {
|
|
19803
|
-
this.collectErrors(qErrors, isOnValueChanged);
|
|
20249
|
+
this.collectErrors(qErrors, isOnValueChanged, fireCallback);
|
|
19804
20250
|
}
|
|
19805
20251
|
return qErrors;
|
|
19806
20252
|
};
|
|
19807
20253
|
Question.prototype.canCollectErrors = function () {
|
|
19808
20254
|
return !this.isReadOnly || settings.readOnly.enableValidation;
|
|
19809
20255
|
};
|
|
19810
|
-
Question.prototype.collectErrors = function (qErrors, isOnValueChanged) {
|
|
19811
|
-
this.onCheckForErrors(qErrors, isOnValueChanged);
|
|
20256
|
+
Question.prototype.collectErrors = function (qErrors, isOnValueChanged, fireCallback) {
|
|
20257
|
+
this.onCheckForErrors(qErrors, isOnValueChanged, fireCallback);
|
|
19812
20258
|
if (qErrors.length > 0 || !this.canRunValidators(isOnValueChanged))
|
|
19813
20259
|
return;
|
|
19814
20260
|
var errors = this.runValidators();
|
|
@@ -19834,7 +20280,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19834
20280
|
return this.validateValueCallback();
|
|
19835
20281
|
return this.survey ? this.survey.validateQuestion(this) : null;
|
|
19836
20282
|
};
|
|
19837
|
-
Question.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
20283
|
+
Question.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
19838
20284
|
var _this = this;
|
|
19839
20285
|
if ((!isOnValueChanged || this.isOldAnswered) && this.hasRequiredError()) {
|
|
19840
20286
|
var err = new AnswerRequiredError(this.requiredErrorText, this);
|
|
@@ -21060,6 +21506,12 @@ var itemvalue_ItemValue = /** @class */ (function (_super) {
|
|
|
21060
21506
|
ItemValue.prototype.setComponent = function (val) {
|
|
21061
21507
|
this.componentValue = val;
|
|
21062
21508
|
};
|
|
21509
|
+
ItemValue.prototype.setRootElement = function (val) {
|
|
21510
|
+
this._htmlElement = val;
|
|
21511
|
+
};
|
|
21512
|
+
ItemValue.prototype.getRootElement = function () {
|
|
21513
|
+
return this._htmlElement;
|
|
21514
|
+
};
|
|
21063
21515
|
ItemValue.prototype.getEnabled = function () {
|
|
21064
21516
|
return this.isEnabled;
|
|
21065
21517
|
};
|
|
@@ -21831,52 +22283,32 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
|
|
|
21831
22283
|
}
|
|
21832
22284
|
return res;
|
|
21833
22285
|
};
|
|
22286
|
+
ChoicesRestful.prototype.getAllPropertiesNames = function () {
|
|
22287
|
+
var res = new Array();
|
|
22288
|
+
Serializer.getPropertiesByObj(this).forEach(function (prop) { return res.push(prop.name); });
|
|
22289
|
+
this.getCustomPropertiesNames().forEach(function (prop) { return res.push(prop); });
|
|
22290
|
+
return res;
|
|
22291
|
+
};
|
|
21834
22292
|
ChoicesRestful.prototype.setData = function (json) {
|
|
21835
|
-
this
|
|
21836
|
-
if (json
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
this.valueName = json.valueName;
|
|
21842
|
-
if (json.titleName)
|
|
21843
|
-
this.titleName = json.titleName;
|
|
21844
|
-
if (json.imageLinkName)
|
|
21845
|
-
this.imageLinkName = json.imageLinkName;
|
|
21846
|
-
if (json.allowEmptyResponse !== undefined)
|
|
21847
|
-
this.allowEmptyResponse = json.allowEmptyResponse;
|
|
21848
|
-
if (json.attachOriginalItems !== undefined)
|
|
21849
|
-
this.attachOriginalItems = json.attachOriginalItems;
|
|
21850
|
-
var properties = this.getCustomPropertiesNames();
|
|
21851
|
-
for (var i = 0; i < properties.length; i++) {
|
|
21852
|
-
if (json[properties[i]])
|
|
21853
|
-
this[properties[i]] = json[properties[i]];
|
|
21854
|
-
}
|
|
22293
|
+
var _this = this;
|
|
22294
|
+
if (!json)
|
|
22295
|
+
json = {};
|
|
22296
|
+
this.getAllPropertiesNames().forEach(function (name) {
|
|
22297
|
+
_this[name] = json[name];
|
|
22298
|
+
});
|
|
21855
22299
|
};
|
|
21856
22300
|
ChoicesRestful.prototype.getData = function () {
|
|
21857
|
-
|
|
21858
|
-
return null;
|
|
22301
|
+
var _this = this;
|
|
21859
22302
|
var res = {};
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
res["imageLinkName"] = this.imageLinkName;
|
|
21870
|
-
if (this.allowEmptyResponse)
|
|
21871
|
-
res["allowEmptyResponse"] = this.allowEmptyResponse;
|
|
21872
|
-
if (this.attachOriginalItems)
|
|
21873
|
-
res["attachOriginalItems"] = this.attachOriginalItems;
|
|
21874
|
-
var properties = this.getCustomPropertiesNames();
|
|
21875
|
-
for (var i = 0; i < properties.length; i++) {
|
|
21876
|
-
if (this[properties[i]])
|
|
21877
|
-
res[properties[i]] = this[properties[i]];
|
|
21878
|
-
}
|
|
21879
|
-
return res;
|
|
22303
|
+
var hasValue = false;
|
|
22304
|
+
this.getAllPropertiesNames().forEach(function (name) {
|
|
22305
|
+
var val = _this[name];
|
|
22306
|
+
if (!_this.isValueEmpty(val) && val !== _this.getDefaultPropertyValue(name)) {
|
|
22307
|
+
res[name] = val;
|
|
22308
|
+
hasValue = true;
|
|
22309
|
+
}
|
|
22310
|
+
});
|
|
22311
|
+
return hasValue ? res : null;
|
|
21880
22312
|
};
|
|
21881
22313
|
Object.defineProperty(ChoicesRestful.prototype, "url", {
|
|
21882
22314
|
/**
|
|
@@ -22033,16 +22465,7 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
|
|
|
22033
22465
|
configurable: true
|
|
22034
22466
|
});
|
|
22035
22467
|
ChoicesRestful.prototype.clear = function () {
|
|
22036
|
-
this.
|
|
22037
|
-
this.path = undefined;
|
|
22038
|
-
this.valueName = undefined;
|
|
22039
|
-
this.titleName = undefined;
|
|
22040
|
-
this.imageLinkName = undefined;
|
|
22041
|
-
var properties = this.getCustomPropertiesNames();
|
|
22042
|
-
for (var i = 0; i < properties.length; i++) {
|
|
22043
|
-
if (this[properties[i]])
|
|
22044
|
-
this[properties[i]] = "";
|
|
22045
|
-
}
|
|
22468
|
+
this.setData(undefined);
|
|
22046
22469
|
};
|
|
22047
22470
|
ChoicesRestful.prototype.beforeSendRequest = function () {
|
|
22048
22471
|
this.isRunningValue = true;
|
|
@@ -22288,7 +22711,6 @@ var martixBase_decorate = (undefined && undefined.__decorate) || function (decor
|
|
|
22288
22711
|
|
|
22289
22712
|
|
|
22290
22713
|
|
|
22291
|
-
|
|
22292
22714
|
/**
|
|
22293
22715
|
* A base class for all matrix question types.
|
|
22294
22716
|
*/
|
|
@@ -22299,7 +22721,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22299
22721
|
_this.generatedVisibleRows = null;
|
|
22300
22722
|
_this.generatedTotalRow = null;
|
|
22301
22723
|
_this.filteredRows = null;
|
|
22302
|
-
_this.filteredColumns = null;
|
|
22303
22724
|
_this.columns = _this.createColumnValues();
|
|
22304
22725
|
_this.rows = _this.createItemValues("rows");
|
|
22305
22726
|
return _this;
|
|
@@ -22359,11 +22780,19 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22359
22780
|
});
|
|
22360
22781
|
Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleColumns", {
|
|
22361
22782
|
get: function () {
|
|
22362
|
-
|
|
22783
|
+
var _this = this;
|
|
22784
|
+
var res = [];
|
|
22785
|
+
this.columns.forEach(function (col) { if (_this.isColumnVisible(col)) {
|
|
22786
|
+
res.push(col);
|
|
22787
|
+
} });
|
|
22788
|
+
return res;
|
|
22363
22789
|
},
|
|
22364
22790
|
enumerable: false,
|
|
22365
22791
|
configurable: true
|
|
22366
22792
|
});
|
|
22793
|
+
QuestionMatrixBaseModel.prototype.isColumnVisible = function (column) {
|
|
22794
|
+
return column.isVisible;
|
|
22795
|
+
};
|
|
22367
22796
|
Object.defineProperty(QuestionMatrixBaseModel.prototype, "rows", {
|
|
22368
22797
|
/**
|
|
22369
22798
|
* An array of matrix rows.
|
|
@@ -22378,7 +22807,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22378
22807
|
set: function (newValue) {
|
|
22379
22808
|
var newRows = this.processRowsOnSet(newValue);
|
|
22380
22809
|
this.setPropertyValue("rows", newRows);
|
|
22381
|
-
this.filterItems();
|
|
22382
22810
|
},
|
|
22383
22811
|
enumerable: false,
|
|
22384
22812
|
configurable: true
|
|
@@ -22417,7 +22845,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22417
22845
|
},
|
|
22418
22846
|
set: function (val) {
|
|
22419
22847
|
this.setPropertyValue("rowsVisibleIf", val);
|
|
22420
|
-
this.
|
|
22848
|
+
if (!this.isLoadingFromJsonValue) {
|
|
22849
|
+
this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
22850
|
+
}
|
|
22421
22851
|
},
|
|
22422
22852
|
enumerable: false,
|
|
22423
22853
|
configurable: true
|
|
@@ -22438,7 +22868,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22438
22868
|
},
|
|
22439
22869
|
set: function (val) {
|
|
22440
22870
|
this.setPropertyValue("columnsVisibleIf", val);
|
|
22441
|
-
this.
|
|
22871
|
+
if (!this.isLoadingFromJson) {
|
|
22872
|
+
this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
22873
|
+
}
|
|
22442
22874
|
},
|
|
22443
22875
|
enumerable: false,
|
|
22444
22876
|
configurable: true
|
|
@@ -22447,15 +22879,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22447
22879
|
_super.prototype.runCondition.call(this, values, properties);
|
|
22448
22880
|
this.runItemsCondition(values, properties);
|
|
22449
22881
|
};
|
|
22450
|
-
QuestionMatrixBaseModel.prototype.filterItems = function () {
|
|
22451
|
-
if (this.areInvisibleElementsShowing) {
|
|
22452
|
-
this.onRowsChanged();
|
|
22453
|
-
return false;
|
|
22454
|
-
}
|
|
22455
|
-
if (this.isLoadingFromJson || !this.data)
|
|
22456
|
-
return false;
|
|
22457
|
-
return this.runItemsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
22458
|
-
};
|
|
22459
22882
|
QuestionMatrixBaseModel.prototype.onColumnsChanged = function () { };
|
|
22460
22883
|
QuestionMatrixBaseModel.prototype.onRowsChanged = function () {
|
|
22461
22884
|
this.updateVisibilityBasedOnRows();
|
|
@@ -22470,7 +22893,7 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22470
22893
|
var res = _super.prototype.isVisibleCore.call(this);
|
|
22471
22894
|
if (!res || !this.hideIfRowsEmpty)
|
|
22472
22895
|
return res;
|
|
22473
|
-
return this.
|
|
22896
|
+
return this.visibleRows.length > 0;
|
|
22474
22897
|
};
|
|
22475
22898
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
|
22476
22899
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
|
@@ -22479,22 +22902,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22479
22902
|
return true;
|
|
22480
22903
|
};
|
|
22481
22904
|
QuestionMatrixBaseModel.prototype.runItemsCondition = function (values, properties) {
|
|
22482
|
-
var oldVisibleRows = null;
|
|
22483
|
-
if (!!this.filteredRows && !helpers_Helpers.isValueEmpty(this.defaultValue)) {
|
|
22484
|
-
oldVisibleRows = [];
|
|
22485
|
-
for (var i = 0; i < this.filteredRows.length; i++) {
|
|
22486
|
-
oldVisibleRows.push(this.filteredRows[i]);
|
|
22487
|
-
}
|
|
22488
|
-
}
|
|
22489
22905
|
var hasChanges = this.hasRowsAsItems() && this.runConditionsForRows(values, properties);
|
|
22490
22906
|
var hasColumnsChanged = this.runConditionsForColumns(values, properties);
|
|
22491
22907
|
hasChanges = hasColumnsChanged || hasChanges;
|
|
22492
22908
|
if (hasChanges) {
|
|
22493
|
-
if (this.isClearValueOnHidden &&
|
|
22494
|
-
this.
|
|
22495
|
-
}
|
|
22496
|
-
if (!!oldVisibleRows) {
|
|
22497
|
-
this.restoreNewVisibleRowsValues(oldVisibleRows);
|
|
22909
|
+
if (this.isClearValueOnHidden && hasColumnsChanged) {
|
|
22910
|
+
this.clearInvisibleColumnValues();
|
|
22498
22911
|
}
|
|
22499
22912
|
this.clearGeneratedRows();
|
|
22500
22913
|
if (hasColumnsChanged) {
|
|
@@ -22502,16 +22915,15 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22502
22915
|
}
|
|
22503
22916
|
this.onRowsChanged();
|
|
22504
22917
|
}
|
|
22505
|
-
return hasChanges;
|
|
22506
22918
|
};
|
|
22919
|
+
QuestionMatrixBaseModel.prototype.isRowsFiltered = function () { return !!this.filteredRows; };
|
|
22507
22920
|
QuestionMatrixBaseModel.prototype.clearGeneratedRows = function () {
|
|
22508
22921
|
this.generatedVisibleRows = null;
|
|
22509
22922
|
};
|
|
22923
|
+
QuestionMatrixBaseModel.prototype.createRowsVisibleIfRunner = function () { return null; };
|
|
22510
22924
|
QuestionMatrixBaseModel.prototype.runConditionsForRows = function (values, properties) {
|
|
22511
22925
|
var showInvisibile = !!this.survey && this.survey.areInvisibleElementsShowing;
|
|
22512
|
-
var runner = !showInvisibile
|
|
22513
|
-
? new ConditionRunner(this.rowsVisibleIf)
|
|
22514
|
-
: null;
|
|
22926
|
+
var runner = !showInvisibile ? this.createRowsVisibleIfRunner() : null;
|
|
22515
22927
|
this.filteredRows = [];
|
|
22516
22928
|
var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
|
|
22517
22929
|
itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
|
@@ -22522,73 +22934,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22522
22934
|
};
|
|
22523
22935
|
QuestionMatrixBaseModel.prototype.runConditionsForColumns = function (values, properties) {
|
|
22524
22936
|
var useColumnsExpression = !!this.survey && !this.survey.areInvisibleElementsShowing;
|
|
22525
|
-
var runner = useColumnsExpression && !!this.columnsVisibleIf
|
|
22526
|
-
|
|
22527
|
-
: null;
|
|
22528
|
-
this.filteredColumns = [];
|
|
22529
|
-
var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.columns, this.filteredColumns, runner, values, properties, this.shouldRunColumnExpression());
|
|
22530
|
-
if (this.filteredColumns.length === this.columns.length) {
|
|
22531
|
-
this.filteredColumns = null;
|
|
22532
|
-
}
|
|
22533
|
-
return hasChanged;
|
|
22534
|
-
};
|
|
22535
|
-
QuestionMatrixBaseModel.prototype.clearIncorrectValues = function () {
|
|
22536
|
-
var val = this.value;
|
|
22537
|
-
if (!val)
|
|
22538
|
-
return;
|
|
22539
|
-
var newVal = null;
|
|
22540
|
-
var isChanged = false;
|
|
22541
|
-
var rows = !!this.filteredRows ? this.filteredRows : this.rows;
|
|
22542
|
-
var columns = !!this.filteredColumns ? this.filteredColumns : this.columns;
|
|
22543
|
-
for (var key in val) {
|
|
22544
|
-
if (itemvalue_ItemValue.getItemByValue(rows, key) &&
|
|
22545
|
-
itemvalue_ItemValue.getItemByValue(columns, val[key])) {
|
|
22546
|
-
if (newVal == null)
|
|
22547
|
-
newVal = {};
|
|
22548
|
-
newVal[key] = val[key];
|
|
22549
|
-
}
|
|
22550
|
-
else {
|
|
22551
|
-
isChanged = true;
|
|
22552
|
-
}
|
|
22553
|
-
}
|
|
22554
|
-
if (isChanged) {
|
|
22555
|
-
this.value = newVal;
|
|
22556
|
-
}
|
|
22557
|
-
_super.prototype.clearIncorrectValues.call(this);
|
|
22558
|
-
};
|
|
22559
|
-
QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () {
|
|
22560
|
-
if (this.isEmpty())
|
|
22561
|
-
return;
|
|
22562
|
-
var newData = this.getUnbindValue(this.value);
|
|
22563
|
-
var rows = this.rows;
|
|
22564
|
-
for (var i = 0; i < rows.length; i++) {
|
|
22565
|
-
var key = rows[i].value;
|
|
22566
|
-
if (!!newData[key] && !rows[i].isVisible) {
|
|
22567
|
-
delete newData[key];
|
|
22568
|
-
}
|
|
22569
|
-
}
|
|
22570
|
-
if (this.isTwoValueEquals(newData, this.value))
|
|
22571
|
-
return;
|
|
22572
|
-
this.value = newData;
|
|
22573
|
-
};
|
|
22574
|
-
QuestionMatrixBaseModel.prototype.restoreNewVisibleRowsValues = function (oldVisibleRows) {
|
|
22575
|
-
var rows = !!this.filteredRows ? this.filteredRows : this.rows;
|
|
22576
|
-
var val = this.defaultValue;
|
|
22577
|
-
var newValue = this.getUnbindValue(this.value);
|
|
22578
|
-
var isChanged = false;
|
|
22579
|
-
for (var key in val) {
|
|
22580
|
-
if (itemvalue_ItemValue.getItemByValue(rows, key) &&
|
|
22581
|
-
!itemvalue_ItemValue.getItemByValue(oldVisibleRows, key)) {
|
|
22582
|
-
if (newValue == null)
|
|
22583
|
-
newValue = {};
|
|
22584
|
-
newValue[key] = val[key];
|
|
22585
|
-
isChanged = true;
|
|
22586
|
-
}
|
|
22587
|
-
}
|
|
22588
|
-
if (isChanged) {
|
|
22589
|
-
this.value = newValue;
|
|
22590
|
-
}
|
|
22937
|
+
var runner = useColumnsExpression && !!this.columnsVisibleIf ? new ConditionRunner(this.columnsVisibleIf) : null;
|
|
22938
|
+
return itemvalue_ItemValue.runConditionsForItems(this.columns, undefined, runner, values, properties, this.shouldRunColumnExpression());
|
|
22591
22939
|
};
|
|
22940
|
+
QuestionMatrixBaseModel.prototype.clearInvisibleColumnValues = function () { };
|
|
22941
|
+
QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () { };
|
|
22592
22942
|
QuestionMatrixBaseModel.prototype.needResponsiveWidth = function () {
|
|
22593
22943
|
//TODO: make it mor intelligent
|
|
22594
22944
|
return true;
|
|
@@ -23290,8 +23640,8 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
23290
23640
|
_super.prototype.setNewValue.call(this, newValue);
|
|
23291
23641
|
this.updateElementCss();
|
|
23292
23642
|
};
|
|
23293
|
-
QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
23294
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
23643
|
+
QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
23644
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
23295
23645
|
if (!!this.customQuestion) {
|
|
23296
23646
|
var text = this.customQuestion.onGetErrorText(this);
|
|
23297
23647
|
if (!!text) {
|
|
@@ -24797,6 +25147,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
24797
25147
|
_this.colOwnerValue = null;
|
|
24798
25148
|
_this.indexValue = -1;
|
|
24799
25149
|
_this._hasVisibleCell = true;
|
|
25150
|
+
_this.isColumnsVisibleIf = true;
|
|
24800
25151
|
_this.previousChoicesId = undefined;
|
|
24801
25152
|
_this.createLocalizableString("totalFormat", _this);
|
|
24802
25153
|
_this.createLocalizableString("cellHint", _this);
|
|
@@ -25626,7 +25977,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
25626
25977
|
this.templateQuestion.locOwner = this;
|
|
25627
25978
|
this.addProperties(curCellType);
|
|
25628
25979
|
this.templateQuestion.onPropertyChanged.add(function (sender, options) {
|
|
25629
|
-
_this.propertyValueChanged(options.name, options.oldValue, options.newValue);
|
|
25980
|
+
_this.propertyValueChanged(options.name, options.oldValue, options.newValue, options.arrayChanges, options.target);
|
|
25630
25981
|
});
|
|
25631
25982
|
this.templateQuestion.onItemValuePropertyChanged.add(function (sender, options) {
|
|
25632
25983
|
_this.doItemValuePropertyChanged(options.propertyName, options.obj, options.name, options.newValue, options.oldValue);
|
|
@@ -25669,7 +26020,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
25669
26020
|
delete json["choices"];
|
|
25670
26021
|
}
|
|
25671
26022
|
delete json["itemComponent"];
|
|
25672
|
-
if (this.jsonObj) {
|
|
26023
|
+
if (this.jsonObj && json.type === "rating") {
|
|
25673
26024
|
Object.keys(this.jsonObj).forEach(function (prop) {
|
|
25674
26025
|
json[prop] = _this.jsonObj[prop];
|
|
25675
26026
|
});
|
|
@@ -25696,8 +26047,8 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
25696
26047
|
};
|
|
25697
26048
|
}
|
|
25698
26049
|
};
|
|
25699
|
-
MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue) {
|
|
25700
|
-
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
|
|
26050
|
+
MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
|
|
26051
|
+
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue, arrayChanges, target);
|
|
25701
26052
|
if (name === "isRequired") {
|
|
25702
26053
|
this.updateIsRenderedRequired(newValue);
|
|
25703
26054
|
}
|
|
@@ -25881,6 +26232,7 @@ var question_matrixdropdownrendered_spreadArray = (undefined && undefined.__spre
|
|
|
25881
26232
|
|
|
25882
26233
|
|
|
25883
26234
|
|
|
26235
|
+
|
|
25884
26236
|
var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
25885
26237
|
function QuestionMatrixDropdownRenderedCell() {
|
|
25886
26238
|
this.minWidth = "";
|
|
@@ -26211,9 +26563,14 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26211
26563
|
};
|
|
26212
26564
|
QuestionMatrixDropdownRenderedTable.prototype.getRenderedRowsAnimationOptions = function () {
|
|
26213
26565
|
var _this = this;
|
|
26214
|
-
var
|
|
26566
|
+
var onBeforeRunAnimation = function (el) {
|
|
26567
|
+
el.querySelectorAll(":scope > td > *").forEach(function (el) {
|
|
26568
|
+
prepareElementForVerticalAnimation(el);
|
|
26569
|
+
});
|
|
26570
|
+
};
|
|
26571
|
+
var onAfterRunAnimation = function (el) {
|
|
26215
26572
|
el.querySelectorAll(":scope > td > *").forEach(function (el) {
|
|
26216
|
-
|
|
26573
|
+
cleanHtmlElementAfterAnimation(el);
|
|
26217
26574
|
});
|
|
26218
26575
|
};
|
|
26219
26576
|
return {
|
|
@@ -26225,10 +26582,10 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26225
26582
|
return el.getRootElement();
|
|
26226
26583
|
},
|
|
26227
26584
|
getLeaveOptions: function () {
|
|
26228
|
-
return { cssClass: _this.cssClasses.
|
|
26585
|
+
return { cssClass: _this.cssClasses.rowLeave, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
|
|
26229
26586
|
},
|
|
26230
|
-
getEnterOptions: function () {
|
|
26231
|
-
return { cssClass: _this.cssClasses.
|
|
26587
|
+
getEnterOptions: function (_, info) {
|
|
26588
|
+
return { cssClass: _this.cssClasses.rowEnter, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
|
|
26232
26589
|
}
|
|
26233
26590
|
};
|
|
26234
26591
|
};
|
|
@@ -26490,8 +26847,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26490
26847
|
this.headerRow.cells.push(this.createHeaderCell(null));
|
|
26491
26848
|
}
|
|
26492
26849
|
if (this.matrix.isColumnLayoutHorizontal) {
|
|
26493
|
-
for (var i = 0; i < this.matrix.
|
|
26494
|
-
var column = this.matrix.
|
|
26850
|
+
for (var i = 0; i < this.matrix.columns.length; i++) {
|
|
26851
|
+
var column = this.matrix.columns[i];
|
|
26495
26852
|
if (!column.isColumnVisible)
|
|
26496
26853
|
continue;
|
|
26497
26854
|
if (this.matrix.IsMultiplyColumn(column)) {
|
|
@@ -27123,6 +27480,7 @@ var question_matrixdropdownbase_extends = (undefined && undefined.__extends) ||
|
|
|
27123
27480
|
|
|
27124
27481
|
|
|
27125
27482
|
|
|
27483
|
+
|
|
27126
27484
|
var question_matrixdropdownbase_MatrixDropdownCell = /** @class */ (function () {
|
|
27127
27485
|
function MatrixDropdownCell(column, row, data) {
|
|
27128
27486
|
this.column = column;
|
|
@@ -27292,6 +27650,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27292
27650
|
var _this = this;
|
|
27293
27651
|
this.isSettingValue = false;
|
|
27294
27652
|
this.detailPanelValue = null;
|
|
27653
|
+
this.visibleValue = true;
|
|
27295
27654
|
this.cells = [];
|
|
27296
27655
|
this.isCreatingDetailPanel = false;
|
|
27297
27656
|
this.data = data;
|
|
@@ -27337,6 +27696,24 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27337
27696
|
});
|
|
27338
27697
|
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
|
27339
27698
|
MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
|
|
27699
|
+
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "isVisible", {
|
|
27700
|
+
get: function () { return this.visible && this.isItemVisible(); },
|
|
27701
|
+
enumerable: false,
|
|
27702
|
+
configurable: true
|
|
27703
|
+
});
|
|
27704
|
+
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "visible", {
|
|
27705
|
+
get: function () { return this.visibleValue; },
|
|
27706
|
+
set: function (val) {
|
|
27707
|
+
var _a;
|
|
27708
|
+
if (this.visible !== val) {
|
|
27709
|
+
this.visibleValue = val;
|
|
27710
|
+
(_a = this.data) === null || _a === void 0 ? void 0 : _a.onRowVisibilityChanged(this);
|
|
27711
|
+
}
|
|
27712
|
+
},
|
|
27713
|
+
enumerable: false,
|
|
27714
|
+
configurable: true
|
|
27715
|
+
});
|
|
27716
|
+
MatrixDropdownRowModelBase.prototype.isItemVisible = function () { return true; };
|
|
27340
27717
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
|
27341
27718
|
get: function () {
|
|
27342
27719
|
var result = {};
|
|
@@ -27494,15 +27871,23 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27494
27871
|
res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
|
27495
27872
|
res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
|
27496
27873
|
};
|
|
27497
|
-
MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
|
|
27874
|
+
MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties, rowsVisibleIf) {
|
|
27498
27875
|
if (!!this.data) {
|
|
27499
|
-
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.
|
|
27876
|
+
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.getFilteredData();
|
|
27500
27877
|
}
|
|
27501
27878
|
var rowIndex = this.rowIndex;
|
|
27502
27879
|
this.applyRowVariablesToValues(values, rowIndex);
|
|
27503
27880
|
var newProps = helpers_Helpers.createCopy(properties);
|
|
27504
27881
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
|
27505
27882
|
var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
|
|
27883
|
+
if (!!rowsVisibleIf) {
|
|
27884
|
+
values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
|
|
27885
|
+
this.setRowsVisibleIfValues(values);
|
|
27886
|
+
this.visible = new ConditionRunner(rowsVisibleIf).run(values, properties);
|
|
27887
|
+
}
|
|
27888
|
+
else {
|
|
27889
|
+
this.visible = true;
|
|
27890
|
+
}
|
|
27506
27891
|
for (var i = 0; i < this.cells.length; i++) {
|
|
27507
27892
|
if (i > 0) {
|
|
27508
27893
|
mergeValues(this.value, rowValues);
|
|
@@ -27517,6 +27902,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27517
27902
|
this.onQuestionReadOnlyChanged();
|
|
27518
27903
|
}
|
|
27519
27904
|
};
|
|
27905
|
+
MatrixDropdownRowModelBase.prototype.setRowsVisibleIfValues = function (values) { };
|
|
27520
27906
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
|
27521
27907
|
var res = [];
|
|
27522
27908
|
this.questions.forEach(function (q) {
|
|
@@ -27960,12 +28346,12 @@ var question_matrixdropdownbase_MatrixDropdownTotalRowModel = /** @class */ (fun
|
|
|
27960
28346
|
this.data.onTotalValueChanged();
|
|
27961
28347
|
}
|
|
27962
28348
|
};
|
|
27963
|
-
MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties) {
|
|
28349
|
+
MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties, rowsVisibleIf) {
|
|
27964
28350
|
var counter = 0;
|
|
27965
28351
|
var prevValue;
|
|
27966
28352
|
do {
|
|
27967
28353
|
prevValue = helpers_Helpers.getUnbindValue(this.value);
|
|
27968
|
-
_super.prototype.runCondition.call(this, values, properties);
|
|
28354
|
+
_super.prototype.runCondition.call(this, values, properties, "");
|
|
27969
28355
|
counter++;
|
|
27970
28356
|
} while (!helpers_Helpers.isTwoValueEquals(prevValue, this.value) && counter < 3);
|
|
27971
28357
|
};
|
|
@@ -28296,6 +28682,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28296
28682
|
};
|
|
28297
28683
|
QuestionMatrixDropdownModelBase.prototype.onPointerDown = function (pointerDownEvent, row) { };
|
|
28298
28684
|
QuestionMatrixDropdownModelBase.prototype.onRowsChanged = function () {
|
|
28685
|
+
this.clearVisibleRows();
|
|
28299
28686
|
this.resetRenderedTable();
|
|
28300
28687
|
_super.prototype.onRowsChanged.call(this);
|
|
28301
28688
|
};
|
|
@@ -28349,6 +28736,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28349
28736
|
this.fireCallback(this.onRenderedTableResetCallback);
|
|
28350
28737
|
};
|
|
28351
28738
|
QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
|
|
28739
|
+
this.clearVisibleRows();
|
|
28352
28740
|
if (!this.generatedVisibleRows)
|
|
28353
28741
|
return;
|
|
28354
28742
|
for (var i = 0; i < this.generatedVisibleRows.length; i++) {
|
|
@@ -28391,8 +28779,8 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28391
28779
|
cellQuestion: null,
|
|
28392
28780
|
value: null,
|
|
28393
28781
|
};
|
|
28394
|
-
for (var i = 0; i < this.
|
|
28395
|
-
options.column = this.
|
|
28782
|
+
for (var i = 0; i < this.columns.length; i++) {
|
|
28783
|
+
options.column = this.columns[i];
|
|
28396
28784
|
options.columnName = options.column.name;
|
|
28397
28785
|
var cell = row.cells[i];
|
|
28398
28786
|
options.cell = cell;
|
|
@@ -28647,25 +29035,40 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28647
29035
|
return false;
|
|
28648
29036
|
};
|
|
28649
29037
|
QuestionMatrixDropdownModelBase.prototype.runCellsCondition = function (values, properties) {
|
|
28650
|
-
if (!this.generatedVisibleRows)
|
|
28651
|
-
return;
|
|
28652
|
-
var newValues = this.getRowConditionValues(values);
|
|
28653
29038
|
var rows = this.generatedVisibleRows;
|
|
28654
|
-
|
|
28655
|
-
|
|
29039
|
+
if (!!rows) {
|
|
29040
|
+
var newValues = this.getRowConditionValues(values);
|
|
29041
|
+
for (var i = 0; i < rows.length; i++) {
|
|
29042
|
+
rows[i].runCondition(newValues, properties, this.rowsVisibleIf);
|
|
29043
|
+
}
|
|
28656
29044
|
}
|
|
28657
29045
|
this.checkColumnsVisibility();
|
|
28658
29046
|
this.checkColumnsRenderedRequired();
|
|
28659
29047
|
};
|
|
29048
|
+
QuestionMatrixDropdownModelBase.prototype.runConditionsForColumns = function (values, properties) {
|
|
29049
|
+
var _this = this;
|
|
29050
|
+
this.columns.forEach(function (column) {
|
|
29051
|
+
if (!_this.columnsVisibleIf) {
|
|
29052
|
+
column.isColumnsVisibleIf = true;
|
|
29053
|
+
}
|
|
29054
|
+
else {
|
|
29055
|
+
var condition = new ConditionRunner(_this.columnsVisibleIf);
|
|
29056
|
+
values["item"] = column.name;
|
|
29057
|
+
column.isColumnsVisibleIf = condition.run(values, properties) === true;
|
|
29058
|
+
}
|
|
29059
|
+
});
|
|
29060
|
+
return false;
|
|
29061
|
+
};
|
|
28660
29062
|
QuestionMatrixDropdownModelBase.prototype.checkColumnsVisibility = function () {
|
|
28661
29063
|
if (this.isDesignMode)
|
|
28662
29064
|
return;
|
|
28663
29065
|
var hasChanged = false;
|
|
28664
|
-
for (var i = 0; i < this.
|
|
28665
|
-
var column = this.
|
|
28666
|
-
|
|
29066
|
+
for (var i = 0; i < this.columns.length; i++) {
|
|
29067
|
+
var column = this.columns[i];
|
|
29068
|
+
var isCellsVisibilty = !!column.visibleIf || column.isFilteredMultipleColumns;
|
|
29069
|
+
if (!isCellsVisibilty && !this.columnsVisibleIf && column.isColumnVisible)
|
|
28667
29070
|
continue;
|
|
28668
|
-
hasChanged = this.isColumnVisibilityChanged(column) || hasChanged;
|
|
29071
|
+
hasChanged = this.isColumnVisibilityChanged(column, isCellsVisibilty) || hasChanged;
|
|
28669
29072
|
}
|
|
28670
29073
|
if (hasChanged) {
|
|
28671
29074
|
this.resetRenderedTable();
|
|
@@ -28673,9 +29076,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28673
29076
|
};
|
|
28674
29077
|
QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
|
|
28675
29078
|
var rows = this.generatedVisibleRows;
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
29079
|
+
if (!rows)
|
|
29080
|
+
return;
|
|
29081
|
+
for (var i = 0; i < this.columns.length; i++) {
|
|
29082
|
+
var column = this.columns[i];
|
|
29083
|
+
if (!column.requiredIf || !column.isColumnVisible)
|
|
28679
29084
|
continue;
|
|
28680
29085
|
var required = rows.length > 0;
|
|
28681
29086
|
for (var j = 0; j < rows.length; j++) {
|
|
@@ -28687,26 +29092,29 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28687
29092
|
column.updateIsRenderedRequired(required);
|
|
28688
29093
|
}
|
|
28689
29094
|
};
|
|
28690
|
-
QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column) {
|
|
29095
|
+
QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column, checkCellsVisiblity) {
|
|
28691
29096
|
var curVis = column.isColumnVisible;
|
|
28692
|
-
var
|
|
29097
|
+
var hasVisCell = !checkCellsVisiblity;
|
|
29098
|
+
var rows = this.generatedVisibleRows;
|
|
29099
|
+
var checkRows = checkCellsVisiblity && rows;
|
|
29100
|
+
var isMultipleColumnsVisibility = checkRows && column.isFilteredMultipleColumns;
|
|
28693
29101
|
var curVisibleChoices = isMultipleColumnsVisibility ? column.getVisibleChoicesInCell : [];
|
|
28694
29102
|
var newVisibleChoices = new Array();
|
|
28695
|
-
|
|
28696
|
-
|
|
28697
|
-
|
|
28698
|
-
|
|
28699
|
-
|
|
28700
|
-
|
|
28701
|
-
|
|
28702
|
-
|
|
28703
|
-
|
|
29103
|
+
if (checkRows) {
|
|
29104
|
+
for (var i = 0; i < rows.length; i++) {
|
|
29105
|
+
var cell = rows[i].cells[column.index];
|
|
29106
|
+
var q = cell === null || cell === void 0 ? void 0 : cell.question;
|
|
29107
|
+
if (!!q && q.isVisible) {
|
|
29108
|
+
hasVisCell = true;
|
|
29109
|
+
if (isMultipleColumnsVisibility) {
|
|
29110
|
+
this.updateNewVisibleChoices(q, newVisibleChoices);
|
|
29111
|
+
}
|
|
29112
|
+
else
|
|
29113
|
+
break;
|
|
28704
29114
|
}
|
|
28705
|
-
else
|
|
28706
|
-
break;
|
|
28707
29115
|
}
|
|
28708
29116
|
}
|
|
28709
|
-
column.hasVisibleCell = hasVisCell;
|
|
29117
|
+
column.hasVisibleCell = hasVisCell && column.isColumnsVisibleIf;
|
|
28710
29118
|
if (isMultipleColumnsVisibility) {
|
|
28711
29119
|
column.setVisibleChoicesInCell(newVisibleChoices);
|
|
28712
29120
|
if (!helpers_Helpers.isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
|
|
@@ -28881,20 +29289,46 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28881
29289
|
this.columns.push(column);
|
|
28882
29290
|
return column;
|
|
28883
29291
|
};
|
|
29292
|
+
QuestionMatrixDropdownModelBase.prototype.clearVisibleRows = function () {
|
|
29293
|
+
this.visibleRowsArray = null;
|
|
29294
|
+
};
|
|
29295
|
+
QuestionMatrixDropdownModelBase.prototype.isColumnVisible = function (column) {
|
|
29296
|
+
return column.isColumnVisible;
|
|
29297
|
+
};
|
|
28884
29298
|
QuestionMatrixDropdownModelBase.prototype.getVisibleRows = function () {
|
|
28885
|
-
var _this = this;
|
|
28886
29299
|
if (this.isUpdateLocked)
|
|
28887
29300
|
return null;
|
|
28888
|
-
if (
|
|
29301
|
+
if (this.isGenereatingRows)
|
|
29302
|
+
return [];
|
|
29303
|
+
if (!!this.visibleRowsArray)
|
|
29304
|
+
return this.visibleRowsArray;
|
|
29305
|
+
this.generateVisibleRowsIfNeeded();
|
|
29306
|
+
this.visibleRowsArray = this.getVisibleFromGenerated(this.generatedVisibleRows);
|
|
29307
|
+
return this.visibleRowsArray;
|
|
29308
|
+
};
|
|
29309
|
+
QuestionMatrixDropdownModelBase.prototype.generateVisibleRowsIfNeeded = function () {
|
|
29310
|
+
var _this = this;
|
|
29311
|
+
if (!this.isUpdateLocked && !this.generatedVisibleRows && !this.generatedVisibleRows) {
|
|
29312
|
+
this.isGenereatingRows = true;
|
|
28889
29313
|
this.generatedVisibleRows = this.generateRows();
|
|
29314
|
+
this.isGenereatingRows = false;
|
|
28890
29315
|
this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
|
|
28891
29316
|
if (this.data) {
|
|
28892
29317
|
this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
|
|
28893
29318
|
}
|
|
28894
|
-
|
|
28895
|
-
|
|
29319
|
+
if (!!this.generatedVisibleRows) {
|
|
29320
|
+
this.updateValueOnRowsGeneration(this.generatedVisibleRows);
|
|
29321
|
+
this.updateIsAnswered();
|
|
29322
|
+
}
|
|
28896
29323
|
}
|
|
28897
|
-
|
|
29324
|
+
};
|
|
29325
|
+
QuestionMatrixDropdownModelBase.prototype.getVisibleFromGenerated = function (rows) {
|
|
29326
|
+
var res = [];
|
|
29327
|
+
if (!rows)
|
|
29328
|
+
return res;
|
|
29329
|
+
rows.forEach(function (row) { if (row.isVisible)
|
|
29330
|
+
res.push(row); });
|
|
29331
|
+
return res.length === rows.length ? rows : res;
|
|
28898
29332
|
};
|
|
28899
29333
|
QuestionMatrixDropdownModelBase.prototype.updateValueOnRowsGeneration = function (rows) {
|
|
28900
29334
|
var oldValue = this.createNewValue(true);
|
|
@@ -29482,7 +29916,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29482
29916
|
!this.generatedVisibleRows)
|
|
29483
29917
|
return;
|
|
29484
29918
|
this.isDoingonAnyValueChanged = true;
|
|
29485
|
-
var rows = this.
|
|
29919
|
+
var rows = this.generatedVisibleRows;
|
|
29486
29920
|
for (var i = 0; i < rows.length; i++) {
|
|
29487
29921
|
rows[i].onAnyValueChanged(name, questionName);
|
|
29488
29922
|
}
|
|
@@ -29531,6 +29965,19 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29531
29965
|
enumerable: false,
|
|
29532
29966
|
configurable: true
|
|
29533
29967
|
});
|
|
29968
|
+
Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasInvisibleRows", {
|
|
29969
|
+
get: function () {
|
|
29970
|
+
return !!this.visibleRowsArray && this.visibleRowsArray.length !== this.generatedVisibleRows.length;
|
|
29971
|
+
},
|
|
29972
|
+
enumerable: false,
|
|
29973
|
+
configurable: true
|
|
29974
|
+
});
|
|
29975
|
+
QuestionMatrixDropdownModelBase.prototype.getFilteredData = function () {
|
|
29976
|
+
if (this.isEmpty() || !this.generatedVisibleRows || !this.hasInvisibleRows)
|
|
29977
|
+
return this.value;
|
|
29978
|
+
return this.getFilteredDataCore();
|
|
29979
|
+
};
|
|
29980
|
+
QuestionMatrixDropdownModelBase.prototype.getFilteredDataCore = function () { return this.value; };
|
|
29534
29981
|
QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
|
|
29535
29982
|
if (!this.survey && !this.cellValueChangingCallback)
|
|
29536
29983
|
return !!rowValue ? rowValue[columnName] : null;
|
|
@@ -29721,6 +30168,26 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29721
30168
|
return null;
|
|
29722
30169
|
};
|
|
29723
30170
|
QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
|
|
30171
|
+
QuestionMatrixDropdownModelBase.prototype.onRowVisibilityChanged = function (row) {
|
|
30172
|
+
this.clearVisibleRows();
|
|
30173
|
+
this.resetRenderedTable();
|
|
30174
|
+
};
|
|
30175
|
+
QuestionMatrixDropdownModelBase.prototype.clearValueIfInvisibleCore = function (reason) {
|
|
30176
|
+
_super.prototype.clearValueIfInvisibleCore.call(this, reason);
|
|
30177
|
+
this.clearInvisibleValuesInRows();
|
|
30178
|
+
};
|
|
30179
|
+
QuestionMatrixDropdownModelBase.prototype.clearInvisibleValuesInRows = function () {
|
|
30180
|
+
var _a;
|
|
30181
|
+
if (this.isEmpty() || !this.isRowsFiltered)
|
|
30182
|
+
return;
|
|
30183
|
+
var sharedQuestions = ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.questionsByValueName(this.getValueName())) || [];
|
|
30184
|
+
if (sharedQuestions.length < 2) {
|
|
30185
|
+
this.value = this.getFilteredData();
|
|
30186
|
+
}
|
|
30187
|
+
};
|
|
30188
|
+
QuestionMatrixDropdownModelBase.prototype.isRowsFiltered = function () {
|
|
30189
|
+
return _super.prototype.isRowsFiltered.call(this) || (this.visibleRows !== this.generatedVisibleRows);
|
|
30190
|
+
};
|
|
29724
30191
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
|
29725
30192
|
if (index >= this.visibleRows.length)
|
|
29726
30193
|
return null;
|
|
@@ -29804,7 +30271,6 @@ Serializer.addClass("matrixdropdownbase", [
|
|
|
29804
30271
|
visible: false,
|
|
29805
30272
|
isLightSerializable: false,
|
|
29806
30273
|
},
|
|
29807
|
-
{ name: "columnsVisibleIf", visible: false },
|
|
29808
30274
|
{
|
|
29809
30275
|
name: "detailPanelMode",
|
|
29810
30276
|
choices: ["none", "underRow", "underRowSingle"],
|
|
@@ -29890,8 +30356,13 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
|
29890
30356
|
enumerable: false,
|
|
29891
30357
|
configurable: true
|
|
29892
30358
|
});
|
|
30359
|
+
MatrixDropdownRowModel.prototype.isItemVisible = function () { return this.item.isVisible; };
|
|
29893
30360
|
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
|
29894
30361
|
MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
|
|
30362
|
+
MatrixDropdownRowModel.prototype.setRowsVisibleIfValues = function (values) {
|
|
30363
|
+
values["item"] = this.item.value;
|
|
30364
|
+
values["choice"] = this.item.value;
|
|
30365
|
+
};
|
|
29895
30366
|
return MatrixDropdownRowModel;
|
|
29896
30367
|
}(question_matrixdropdownbase_MatrixDropdownRowModelBase));
|
|
29897
30368
|
|
|
@@ -29907,11 +30378,11 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
29907
30378
|
_this.defaultValuesInRows = {};
|
|
29908
30379
|
_this.createLocalizableString("totalText", _this, true);
|
|
29909
30380
|
_this.registerPropertyChangedHandlers(["rows"], function () {
|
|
30381
|
+
if (!_this.generatedVisibleRows)
|
|
30382
|
+
return;
|
|
29910
30383
|
_this.clearGeneratedRows();
|
|
29911
30384
|
_this.resetRenderedTable();
|
|
29912
|
-
|
|
29913
|
-
_this.onRowsChanged();
|
|
29914
|
-
}
|
|
30385
|
+
_this.getVisibleRows();
|
|
29915
30386
|
_this.clearIncorrectValues();
|
|
29916
30387
|
});
|
|
29917
30388
|
_this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
|
|
@@ -30002,30 +30473,29 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
30002
30473
|
return helpers_Helpers.isValueObject(val, true);
|
|
30003
30474
|
};
|
|
30004
30475
|
QuestionMatrixDropdownModel.prototype.clearIncorrectValues = function () {
|
|
30005
|
-
|
|
30006
|
-
|
|
30007
|
-
|
|
30008
|
-
|
|
30009
|
-
|
|
30010
|
-
|
|
30011
|
-
|
|
30012
|
-
|
|
30013
|
-
|
|
30014
|
-
newVal = {};
|
|
30015
|
-
newVal[key] = val[key];
|
|
30016
|
-
}
|
|
30017
|
-
else {
|
|
30018
|
-
isChanged = true;
|
|
30476
|
+
if (!this.isEmpty()) {
|
|
30477
|
+
this.getVisibleRows();
|
|
30478
|
+
var newVal = {};
|
|
30479
|
+
var val = this.value;
|
|
30480
|
+
for (var key in val) {
|
|
30481
|
+
var row = this.getRowByKey(key);
|
|
30482
|
+
if (!!row && row.isVisible) {
|
|
30483
|
+
newVal[key] = val[key];
|
|
30484
|
+
}
|
|
30019
30485
|
}
|
|
30020
|
-
}
|
|
30021
|
-
if (isChanged) {
|
|
30022
30486
|
this.value = newVal;
|
|
30023
30487
|
}
|
|
30024
30488
|
_super.prototype.clearIncorrectValues.call(this);
|
|
30025
30489
|
};
|
|
30026
|
-
QuestionMatrixDropdownModel.prototype.
|
|
30027
|
-
|
|
30028
|
-
|
|
30490
|
+
QuestionMatrixDropdownModel.prototype.getRowByKey = function (val) {
|
|
30491
|
+
var rows = this.generatedVisibleRows;
|
|
30492
|
+
if (!rows)
|
|
30493
|
+
return null;
|
|
30494
|
+
for (var i = 0; i < rows.length; i++) {
|
|
30495
|
+
if (rows[i].rowName === val)
|
|
30496
|
+
return rows[i];
|
|
30497
|
+
}
|
|
30498
|
+
return null;
|
|
30029
30499
|
};
|
|
30030
30500
|
QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
|
|
30031
30501
|
var _this = this;
|
|
@@ -30052,7 +30522,7 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
30052
30522
|
};
|
|
30053
30523
|
QuestionMatrixDropdownModel.prototype.generateRows = function () {
|
|
30054
30524
|
var result = new Array();
|
|
30055
|
-
var rows =
|
|
30525
|
+
var rows = this.rows;
|
|
30056
30526
|
if (!rows || rows.length === 0)
|
|
30057
30527
|
return result;
|
|
30058
30528
|
var val = this.value;
|
|
@@ -30069,6 +30539,17 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
30069
30539
|
QuestionMatrixDropdownModel.prototype.createMatrixRow = function (item, value) {
|
|
30070
30540
|
return new MatrixDropdownRowModel(item.value, item, this, value);
|
|
30071
30541
|
};
|
|
30542
|
+
QuestionMatrixDropdownModel.prototype.getFilteredDataCore = function () {
|
|
30543
|
+
var res = {};
|
|
30544
|
+
var val = this.createValueCopy();
|
|
30545
|
+
this.generatedVisibleRows.forEach(function (row) {
|
|
30546
|
+
var rowVal = val[row.rowName];
|
|
30547
|
+
if (row.isVisible && !helpers_Helpers.isValueEmpty(rowVal)) {
|
|
30548
|
+
res[row.rowName] = rowVal;
|
|
30549
|
+
}
|
|
30550
|
+
});
|
|
30551
|
+
return res;
|
|
30552
|
+
};
|
|
30072
30553
|
QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
|
|
30073
30554
|
keys.push("rows");
|
|
30074
30555
|
};
|
|
@@ -30571,13 +31052,17 @@ var core_DragDropCore = /** @class */ (function () {
|
|
|
30571
31052
|
DragDropCore.prototype.afterDragOver = function (dropTargetNode) { };
|
|
30572
31053
|
DragDropCore.prototype.findDropTargetNodeFromPoint = function (clientX, clientY) {
|
|
30573
31054
|
var displayProp = this.domAdapter.draggedElementShortcut.style.display;
|
|
30574
|
-
//this.domAdapter.draggedElementShortcut.hidden = true;
|
|
30575
31055
|
this.domAdapter.draggedElementShortcut.style.display = "none";
|
|
30576
31056
|
if (!DomDocumentHelper.isAvailable())
|
|
30577
31057
|
return null;
|
|
30578
|
-
var
|
|
30579
|
-
// this.domAdapter.draggedElementShortcut.hidden = false;
|
|
31058
|
+
var dragOverNodes = this.domAdapter.documentOrShadowRoot.elementsFromPoint(clientX, clientY);
|
|
30580
31059
|
this.domAdapter.draggedElementShortcut.style.display = displayProp || "block";
|
|
31060
|
+
var index = 0;
|
|
31061
|
+
var dragOverNode = dragOverNodes[index];
|
|
31062
|
+
while (dragOverNode && dragOverNode.className && typeof dragOverNode.className.indexOf == "function" && dragOverNode.className.indexOf("sv-drag-target-skipped") != -1) {
|
|
31063
|
+
index++;
|
|
31064
|
+
dragOverNode = dragOverNodes[index];
|
|
31065
|
+
}
|
|
30581
31066
|
if (!dragOverNode)
|
|
30582
31067
|
return null;
|
|
30583
31068
|
return this.findDropTargetNodeByDragOverNode(dragOverNode);
|
|
@@ -30900,6 +31385,7 @@ var question_matrixdynamic_extends = (undefined && undefined.__extends) || (func
|
|
|
30900
31385
|
|
|
30901
31386
|
|
|
30902
31387
|
|
|
31388
|
+
|
|
30903
31389
|
var MatrixDynamicRowModel = /** @class */ (function (_super) {
|
|
30904
31390
|
question_matrixdynamic_extends(MatrixDynamicRowModel, _super);
|
|
30905
31391
|
function MatrixDynamicRowModel(index, data, value) {
|
|
@@ -30975,7 +31461,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
30975
31461
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
|
30976
31462
|
_this.updateShowTableAndAddRow();
|
|
30977
31463
|
});
|
|
30978
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.
|
|
31464
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
|
|
30979
31465
|
_this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
|
|
30980
31466
|
return _this;
|
|
30981
31467
|
}
|
|
@@ -31124,7 +31610,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31124
31610
|
};
|
|
31125
31611
|
QuestionMatrixDynamicModel.prototype.initDataUI = function () {
|
|
31126
31612
|
if (!this.generatedVisibleRows) {
|
|
31127
|
-
this.
|
|
31613
|
+
this.getVisibleRows();
|
|
31128
31614
|
}
|
|
31129
31615
|
};
|
|
31130
31616
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
|
|
@@ -31153,6 +31639,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31153
31639
|
}
|
|
31154
31640
|
if (this.generatedVisibleRows || prevValue == 0) {
|
|
31155
31641
|
if (!this.generatedVisibleRows) {
|
|
31642
|
+
this.clearGeneratedRows();
|
|
31156
31643
|
this.generatedVisibleRows = [];
|
|
31157
31644
|
}
|
|
31158
31645
|
this.generatedVisibleRows.splice(val);
|
|
@@ -31753,8 +32240,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31753
32240
|
enumerable: false,
|
|
31754
32241
|
configurable: true
|
|
31755
32242
|
});
|
|
31756
|
-
QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
31757
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
32243
|
+
QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
32244
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
31758
32245
|
if (!isOnValueChanged && this.hasErrorInMinRows()) {
|
|
31759
32246
|
errors.push(new error_MinRowCountError(this.minRowCount, this));
|
|
31760
32247
|
}
|
|
@@ -31845,6 +32332,20 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31845
32332
|
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
|
31846
32333
|
this.setRowCountValueFromData = false;
|
|
31847
32334
|
};
|
|
32335
|
+
QuestionMatrixDynamicModel.prototype.getFilteredDataCore = function () {
|
|
32336
|
+
var res = [];
|
|
32337
|
+
var val = this.createValueCopy();
|
|
32338
|
+
if (!Array.isArray(val))
|
|
32339
|
+
return res;
|
|
32340
|
+
var rows = this.generatedVisibleRows;
|
|
32341
|
+
for (var i = 0; i < rows.length && i < val.length; i++) {
|
|
32342
|
+
var rowVal = val[i];
|
|
32343
|
+
if (rows[i].isVisible && !helpers_Helpers.isValueEmpty(rowVal)) {
|
|
32344
|
+
res.push(rowVal);
|
|
32345
|
+
}
|
|
32346
|
+
}
|
|
32347
|
+
return res;
|
|
32348
|
+
};
|
|
31848
32349
|
QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
|
|
31849
32350
|
if (!val || !Array.isArray(val))
|
|
31850
32351
|
return;
|
|
@@ -31869,7 +32370,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31869
32370
|
}
|
|
31870
32371
|
else {
|
|
31871
32372
|
this.clearGeneratedRows();
|
|
31872
|
-
this.
|
|
32373
|
+
this.getVisibleRows();
|
|
31873
32374
|
this.onRowsChanged();
|
|
31874
32375
|
}
|
|
31875
32376
|
this.setRowCountValueFromData = false;
|
|
@@ -31945,7 +32446,6 @@ var QuestionMatrixDynamicRenderedTable = /** @class */ (function (_super) {
|
|
|
31945
32446
|
return QuestionMatrixDynamicRenderedTable;
|
|
31946
32447
|
}(question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable));
|
|
31947
32448
|
Serializer.addClass("matrixdynamic", [
|
|
31948
|
-
{ name: "rowsVisibleIf:condition", visible: false },
|
|
31949
32449
|
{ name: "allowAddRows:boolean", default: true },
|
|
31950
32450
|
{ name: "allowRemoveRows:boolean", default: true },
|
|
31951
32451
|
{ name: "rowCount:number", default: 2, minValue: 0, isBindable: true },
|
|
@@ -32061,10 +32561,10 @@ var defaultV2Css = {
|
|
|
32061
32561
|
edit: "sd-btn sd-btn--small",
|
|
32062
32562
|
},
|
|
32063
32563
|
panel: {
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32564
|
+
contentEnter: "sd-element__content--enter",
|
|
32565
|
+
contentLeave: "sd-element__content--leave",
|
|
32566
|
+
enter: "sd-element-wrapper--enter",
|
|
32567
|
+
leave: "sd-element-wrapper--leave",
|
|
32068
32568
|
asPage: "sd-panel--as-page",
|
|
32069
32569
|
number: "sd-element__num",
|
|
32070
32570
|
title: "sd-title sd-element__title sd-panel__title",
|
|
@@ -32125,8 +32625,8 @@ var defaultV2Css = {
|
|
|
32125
32625
|
footerButtonsContainer: "sd-paneldynamic__buttons-container",
|
|
32126
32626
|
panelsContainer: "sd-paneldynamic__panels-container",
|
|
32127
32627
|
panelWrapperInRow: "sd-paneldynamic__panel-wrapper--in-row",
|
|
32128
|
-
|
|
32129
|
-
|
|
32628
|
+
panelWrapperEnter: "sd-paneldynamic__panel-wrapper--enter",
|
|
32629
|
+
panelWrapperLeave: "sd-paneldynamic__panel-wrapper--leave",
|
|
32130
32630
|
panelWrapperList: "sd-paneldynamic__panel-wrapper--list",
|
|
32131
32631
|
progressBtnIcon: "icon-progressbuttonv2",
|
|
32132
32632
|
noEntriesPlaceholder: "sd-paneldynamic__placeholder sd-question__placeholder",
|
|
@@ -32175,6 +32675,7 @@ var defaultV2Css = {
|
|
|
32175
32675
|
emptyHeaderRoot: "sd-page__empty-header",
|
|
32176
32676
|
title: "sd-title sd-page__title",
|
|
32177
32677
|
description: "sd-description sd-page__description",
|
|
32678
|
+
number: "sd-page__num",
|
|
32178
32679
|
errorsContainer: "sd-page__errbox"
|
|
32179
32680
|
},
|
|
32180
32681
|
pageTitle: "sd-title sd-page__title",
|
|
@@ -32182,16 +32683,17 @@ var defaultV2Css = {
|
|
|
32182
32683
|
row: "sd-row sd-clearfix",
|
|
32183
32684
|
rowMultiple: "sd-row--multiple",
|
|
32184
32685
|
rowCompact: "sd-row--compact",
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32686
|
+
rowEnter: "sd-row--enter",
|
|
32687
|
+
rowDelayedEnter: "sd-row--delayed-enter",
|
|
32688
|
+
rowLeave: "sd-row--leave",
|
|
32689
|
+
rowReplace: "sd-row--replace",
|
|
32188
32690
|
pageRow: "sd-page__row",
|
|
32189
32691
|
question: {
|
|
32190
|
-
|
|
32191
|
-
|
|
32692
|
+
contentEnter: "sd-element__content--enter",
|
|
32693
|
+
contentLeave: "sd-element__content--leave",
|
|
32694
|
+
enter: "sd-element-wrapper--enter",
|
|
32695
|
+
leave: "sd-element-wrapper--leave",
|
|
32192
32696
|
mobile: "sd-question--mobile",
|
|
32193
|
-
fadeIn: "sd-element-wrapper--fade-in",
|
|
32194
|
-
fadeOut: "sd-element-wrapper--fade-out",
|
|
32195
32697
|
mainRoot: "sd-element sd-question sd-row__question",
|
|
32196
32698
|
flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
|
|
32197
32699
|
withFrame: "sd-element--with-frame",
|
|
@@ -32277,6 +32779,8 @@ var defaultV2Css = {
|
|
|
32277
32779
|
rootRow: "sd-selectbase--row",
|
|
32278
32780
|
rootMultiColumn: "sd-selectbase--multi-column",
|
|
32279
32781
|
item: "sd-item sd-checkbox sd-selectbase__item",
|
|
32782
|
+
itemEnter: "sd-item--enter",
|
|
32783
|
+
itemLeave: "sd-item--leave",
|
|
32280
32784
|
itemOnError: "sd-item--error",
|
|
32281
32785
|
itemSelectAll: "sd-checkbox--selectall",
|
|
32282
32786
|
itemNone: "sd-checkbox--none",
|
|
@@ -32307,6 +32811,8 @@ var defaultV2Css = {
|
|
|
32307
32811
|
itemInline: "sd-selectbase__item--inline",
|
|
32308
32812
|
label: "sd-selectbase__label",
|
|
32309
32813
|
labelChecked: "",
|
|
32814
|
+
itemEnter: "sd-item--enter",
|
|
32815
|
+
itemLeave: "sd-item--leave",
|
|
32310
32816
|
itemDisabled: "sd-item--disabled sd-radio--disabled",
|
|
32311
32817
|
itemReadOnly: "sd-item--readonly sd-radio--readonly",
|
|
32312
32818
|
itemPreview: "sd-item--preview sd-radio--preview",
|
|
@@ -32415,6 +32921,8 @@ var defaultV2Css = {
|
|
|
32415
32921
|
other: "sd-input sd-comment sd-selectbase__other",
|
|
32416
32922
|
onError: "sd-input--error",
|
|
32417
32923
|
label: "sd-selectbase__label",
|
|
32924
|
+
itemEnter: "sd-item--enter",
|
|
32925
|
+
itemLeave: "sd-item--leave",
|
|
32418
32926
|
item: "sd-item sd-radio sd-selectbase__item",
|
|
32419
32927
|
itemDisabled: "sd-item--disabled sd-radio--disabled",
|
|
32420
32928
|
itemChecked: "sd-item--checked sd-radio--checked",
|
|
@@ -32518,8 +33026,9 @@ var defaultV2Css = {
|
|
|
32518
33026
|
errorsCellBottom: "sd-table__cell--error-bottom",
|
|
32519
33027
|
itemCell: "sd-table__cell--item",
|
|
32520
33028
|
row: "sd-table__row",
|
|
32521
|
-
|
|
32522
|
-
|
|
33029
|
+
rowDelayedEnter: "sd-table__row--delayed-enter",
|
|
33030
|
+
rowEnter: "sd-table__row--enter",
|
|
33031
|
+
rowLeave: "sd-table__row--leave",
|
|
32523
33032
|
expandedRow: "sd-table__row--expanded",
|
|
32524
33033
|
rowHasPanel: "sd-table__row--has-panel",
|
|
32525
33034
|
rowHasEndActions: "sd-table__row--has-end-actions",
|
|
@@ -32559,8 +33068,9 @@ var defaultV2Css = {
|
|
|
32559
33068
|
cell: "sd-table__cell",
|
|
32560
33069
|
cellResponsiveTitle: "sd-table__responsive-title",
|
|
32561
33070
|
row: "sd-table__row",
|
|
32562
|
-
|
|
32563
|
-
|
|
33071
|
+
rowDelayedEnter: "sd-table__row--delayed-enter",
|
|
33072
|
+
rowEnter: "sd-table__row--enter",
|
|
33073
|
+
rowLeave: "sd-table__row--leave",
|
|
32564
33074
|
rowHasPanel: "sd-table__row--has-panel",
|
|
32565
33075
|
rowHasEndActions: "sd-table__row--has-end-actions",
|
|
32566
33076
|
expandedRow: "sd-table__row--expanded",
|
|
@@ -32846,6 +33356,8 @@ var defaultV2Css = {
|
|
|
32846
33356
|
itemHover: "sd-item--allowhover sd-checkbox--allowhover",
|
|
32847
33357
|
itemControl: "sd-visuallyhidden sd-item__control sd-checkbox__control",
|
|
32848
33358
|
itemDecorator: "sd-item__svg sd-checkbox__svg",
|
|
33359
|
+
itemEnter: "sd-item--enter",
|
|
33360
|
+
itemLeave: "sd-item--leave",
|
|
32849
33361
|
cleanButton: "sd-tagbox_clean-button sd-dropdown_clean-button",
|
|
32850
33362
|
cleanButtonSvg: "sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",
|
|
32851
33363
|
cleanButtonIconId: "icon-clear",
|
|
@@ -33634,7 +34146,7 @@ var header_Cover = /** @class */ (function (_super) {
|
|
|
33634
34146
|
enumerable: false,
|
|
33635
34147
|
configurable: true
|
|
33636
34148
|
});
|
|
33637
|
-
Cover.prototype.propertyValueChanged = function (name, oldValue, newValue) {
|
|
34149
|
+
Cover.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
|
|
33638
34150
|
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
|
|
33639
34151
|
if (name === "backgroundColor" || name === "backgroundImage" || name === "overlapEnabled") {
|
|
33640
34152
|
this.updateHeaderClasses();
|
|
@@ -34245,8 +34757,8 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
|
34245
34757
|
QuestionRowModel.prototype.getVisibleElementsAnimationOptions = function () {
|
|
34246
34758
|
var _this = this;
|
|
34247
34759
|
var beforeRunAnimation = function (el) {
|
|
34248
|
-
|
|
34249
|
-
el
|
|
34760
|
+
prepareElementForVerticalAnimation(el);
|
|
34761
|
+
setPropertiesOnElementForAnimation(el, { width: getElementWidth(el) + "px" });
|
|
34250
34762
|
};
|
|
34251
34763
|
return {
|
|
34252
34764
|
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
@@ -34257,16 +34769,18 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
|
34257
34769
|
var surveyElement = element;
|
|
34258
34770
|
var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
|
|
34259
34771
|
return {
|
|
34260
|
-
cssClass: cssClasses.
|
|
34261
|
-
onBeforeRunAnimation: beforeRunAnimation
|
|
34772
|
+
cssClass: cssClasses.leave,
|
|
34773
|
+
onBeforeRunAnimation: beforeRunAnimation,
|
|
34774
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
|
34262
34775
|
};
|
|
34263
34776
|
},
|
|
34264
34777
|
getEnterOptions: function (element) {
|
|
34265
34778
|
var surveyElement = element;
|
|
34266
34779
|
var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
|
|
34267
34780
|
return {
|
|
34268
|
-
cssClass: cssClasses.
|
|
34269
|
-
onBeforeRunAnimation: beforeRunAnimation
|
|
34781
|
+
cssClass: cssClasses.enter,
|
|
34782
|
+
onBeforeRunAnimation: beforeRunAnimation,
|
|
34783
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
|
34270
34784
|
};
|
|
34271
34785
|
}
|
|
34272
34786
|
};
|
|
@@ -34471,24 +34985,22 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
34471
34985
|
};
|
|
34472
34986
|
PanelModelBase.prototype.getRowsAnimationOptions = function () {
|
|
34473
34987
|
var _this = this;
|
|
34474
|
-
var beforeRunAnimation = function (el) {
|
|
34475
|
-
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
|
34476
|
-
};
|
|
34477
34988
|
return {
|
|
34478
34989
|
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
34479
34990
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
|
34480
34991
|
getAnimatedElement: function (row) { return row.getRootElement(); },
|
|
34481
|
-
getLeaveOptions: function (
|
|
34482
|
-
return {
|
|
34483
|
-
|
|
34484
|
-
|
|
34992
|
+
getLeaveOptions: function (row, info) {
|
|
34993
|
+
return { cssClass: _this.cssClasses.rowLeave,
|
|
34994
|
+
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
|
34995
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation,
|
|
34485
34996
|
};
|
|
34486
34997
|
},
|
|
34487
34998
|
getEnterOptions: function (_, animationInfo) {
|
|
34488
34999
|
var cssClasses = _this.cssClasses;
|
|
34489
35000
|
return {
|
|
34490
|
-
cssClass: new CssClassBuilder().append(cssClasses.
|
|
34491
|
-
onBeforeRunAnimation:
|
|
35001
|
+
cssClass: new CssClassBuilder().append(cssClasses.rowEnter).append(cssClasses.rowDelayedEnter, animationInfo.isDeletingRunning).toString(),
|
|
35002
|
+
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
|
35003
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
|
34492
35004
|
};
|
|
34493
35005
|
}
|
|
34494
35006
|
};
|
|
@@ -34766,7 +35278,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
34766
35278
|
configurable: true
|
|
34767
35279
|
});
|
|
34768
35280
|
PanelModelBase.prototype.calcCssClasses = function (css) {
|
|
34769
|
-
var classes = { panel: {}, error: {}, row: "",
|
|
35281
|
+
var classes = { panel: {}, error: {}, row: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
34770
35282
|
this.copyCssClasses(classes.panel, css.panel);
|
|
34771
35283
|
this.copyCssClasses(classes.error, css.error);
|
|
34772
35284
|
if (!!css.pageRow) {
|
|
@@ -34778,14 +35290,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
34778
35290
|
if (!!css.row) {
|
|
34779
35291
|
classes.row = css.row;
|
|
34780
35292
|
}
|
|
34781
|
-
if (!!css.
|
|
34782
|
-
classes.
|
|
35293
|
+
if (!!css.rowEnter) {
|
|
35294
|
+
classes.rowEnter = css.rowEnter;
|
|
34783
35295
|
}
|
|
34784
|
-
if (!!css.
|
|
34785
|
-
classes.
|
|
35296
|
+
if (!!css.rowLeave) {
|
|
35297
|
+
classes.rowLeave = css.rowLeave;
|
|
34786
35298
|
}
|
|
34787
|
-
if (!!css.
|
|
34788
|
-
classes.
|
|
35299
|
+
if (!!css.rowDelayedEnter) {
|
|
35300
|
+
classes.rowDelayedEnter = css.rowDelayedEnter;
|
|
34789
35301
|
}
|
|
34790
35302
|
if (!!css.rowMultiple) {
|
|
34791
35303
|
classes.rowMultiple = css.rowMultiple;
|
|
@@ -35793,6 +36305,20 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35793
36305
|
}
|
|
35794
36306
|
}
|
|
35795
36307
|
};
|
|
36308
|
+
PanelModelBase.prototype.disableLazyRenderingBeforeElement = function (el) {
|
|
36309
|
+
var row = el ? this.findRowByElement(el) : undefined;
|
|
36310
|
+
var index = el ? this.rows.indexOf(row) : this.rows.length - 1;
|
|
36311
|
+
for (var i = index; i >= 0; i--) {
|
|
36312
|
+
var currentRow = this.rows[i];
|
|
36313
|
+
if (currentRow.isNeedRender) {
|
|
36314
|
+
break;
|
|
36315
|
+
}
|
|
36316
|
+
else {
|
|
36317
|
+
currentRow.isNeedRender = true;
|
|
36318
|
+
currentRow.stopLazyRendering();
|
|
36319
|
+
}
|
|
36320
|
+
}
|
|
36321
|
+
};
|
|
35796
36322
|
PanelModelBase.prototype.findRowByElement = function (el) {
|
|
35797
36323
|
var rows = this.rows;
|
|
35798
36324
|
for (var i = 0; i < rows.length; i++) {
|
|
@@ -36214,12 +36740,27 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36214
36740
|
return this.parent.getQuestionErrorLocation();
|
|
36215
36741
|
return this.survey ? this.survey.questionErrorLocation : "top";
|
|
36216
36742
|
};
|
|
36743
|
+
//ITitleOwner
|
|
36744
|
+
PanelModelBase.prototype.getTitleOwner = function () { return this; };
|
|
36217
36745
|
Object.defineProperty(PanelModelBase.prototype, "no", {
|
|
36218
|
-
//ITitleOwner
|
|
36219
36746
|
get: function () { return ""; },
|
|
36220
36747
|
enumerable: false,
|
|
36221
36748
|
configurable: true
|
|
36222
36749
|
});
|
|
36750
|
+
Object.defineProperty(PanelModelBase.prototype, "cssTitleNumber", {
|
|
36751
|
+
get: function () {
|
|
36752
|
+
return this.cssClasses.panel.number;
|
|
36753
|
+
},
|
|
36754
|
+
enumerable: false,
|
|
36755
|
+
configurable: true
|
|
36756
|
+
});
|
|
36757
|
+
Object.defineProperty(PanelModelBase.prototype, "cssRequiredText", {
|
|
36758
|
+
get: function () {
|
|
36759
|
+
return this.cssClasses.panel.requiredText;
|
|
36760
|
+
},
|
|
36761
|
+
enumerable: false,
|
|
36762
|
+
configurable: true
|
|
36763
|
+
});
|
|
36223
36764
|
Object.defineProperty(PanelModelBase.prototype, "cssError", {
|
|
36224
36765
|
get: function () {
|
|
36225
36766
|
return this.getCssError(this.cssClasses);
|
|
@@ -36281,6 +36822,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36281
36822
|
function PanelModel(name) {
|
|
36282
36823
|
if (name === void 0) { name = ""; }
|
|
36283
36824
|
var _this = _super.call(this, name) || this;
|
|
36825
|
+
_this.forcusFirstQuestionOnExpand = true;
|
|
36284
36826
|
_this.createNewArray("footerActions");
|
|
36285
36827
|
_this.registerPropertyChangedHandlers(["width"], function () {
|
|
36286
36828
|
if (!!_this.parent) {
|
|
@@ -36384,7 +36926,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36384
36926
|
enumerable: false,
|
|
36385
36927
|
configurable: true
|
|
36386
36928
|
});
|
|
36387
|
-
PanelModel.prototype.getTitleOwner = function () { return this; };
|
|
36388
36929
|
Object.defineProperty(PanelModel.prototype, "showNumber", {
|
|
36389
36930
|
/**
|
|
36390
36931
|
* Specifies whether to show the panel number in the title.
|
|
@@ -36698,8 +37239,16 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36698
37239
|
enumerable: false,
|
|
36699
37240
|
configurable: true
|
|
36700
37241
|
});
|
|
37242
|
+
PanelModel.prototype.expand = function (focusFirstQuestion) {
|
|
37243
|
+
if (focusFirstQuestion === void 0) { focusFirstQuestion = true; }
|
|
37244
|
+
this.forcusFirstQuestionOnExpand = focusFirstQuestion;
|
|
37245
|
+
_super.prototype.expand.call(this);
|
|
37246
|
+
};
|
|
36701
37247
|
PanelModel.prototype.onElementExpanded = function (elementIsRendered) {
|
|
36702
37248
|
var _this = this;
|
|
37249
|
+
if (!this.forcusFirstQuestionOnExpand) {
|
|
37250
|
+
return;
|
|
37251
|
+
}
|
|
36703
37252
|
if (this.survey != null && !this.isLoadingFromJson) {
|
|
36704
37253
|
var q_1 = this.getFirstQuestionToFocus(false);
|
|
36705
37254
|
if (!!q_1) {
|
|
@@ -37078,11 +37627,6 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37078
37627
|
* @see maxTimeToFinish
|
|
37079
37628
|
*/
|
|
37080
37629
|
_this.timeSpent = 0;
|
|
37081
|
-
_this.locTitle.onGetTextCallback = function (text) {
|
|
37082
|
-
if (_this.canShowPageNumber() && text)
|
|
37083
|
-
return _this.num + ". " + text;
|
|
37084
|
-
return text;
|
|
37085
|
-
};
|
|
37086
37630
|
_this.createLocalizableString("navigationDescription", _this, true);
|
|
37087
37631
|
_this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
|
|
37088
37632
|
return _this;
|
|
@@ -37100,6 +37644,27 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37100
37644
|
enumerable: false,
|
|
37101
37645
|
configurable: true
|
|
37102
37646
|
});
|
|
37647
|
+
Object.defineProperty(PageModel.prototype, "no", {
|
|
37648
|
+
get: function () {
|
|
37649
|
+
return this.canShowPageNumber() ? this.num + ". " : "";
|
|
37650
|
+
},
|
|
37651
|
+
enumerable: false,
|
|
37652
|
+
configurable: true
|
|
37653
|
+
});
|
|
37654
|
+
Object.defineProperty(PageModel.prototype, "cssTitleNumber", {
|
|
37655
|
+
get: function () {
|
|
37656
|
+
return this.cssClasses.page.number;
|
|
37657
|
+
},
|
|
37658
|
+
enumerable: false,
|
|
37659
|
+
configurable: true
|
|
37660
|
+
});
|
|
37661
|
+
Object.defineProperty(PageModel.prototype, "cssRequiredText", {
|
|
37662
|
+
get: function () {
|
|
37663
|
+
return "";
|
|
37664
|
+
},
|
|
37665
|
+
enumerable: false,
|
|
37666
|
+
configurable: true
|
|
37667
|
+
});
|
|
37103
37668
|
PageModel.prototype.canShowPageNumber = function () {
|
|
37104
37669
|
return this.survey && this.survey.showPageNumbers;
|
|
37105
37670
|
};
|
|
@@ -37204,7 +37769,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37204
37769
|
configurable: true
|
|
37205
37770
|
});
|
|
37206
37771
|
PageModel.prototype.calcCssClasses = function (css) {
|
|
37207
|
-
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "",
|
|
37772
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowReplace: "" };
|
|
37208
37773
|
this.copyCssClasses(classes.page, css.page);
|
|
37209
37774
|
this.copyCssClasses(classes.error, css.error);
|
|
37210
37775
|
if (!!css.pageTitle) {
|
|
@@ -37225,14 +37790,17 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37225
37790
|
if (!!css.rowCompact) {
|
|
37226
37791
|
classes.rowCompact = css.rowCompact;
|
|
37227
37792
|
}
|
|
37228
|
-
if (!!css.
|
|
37229
|
-
classes.
|
|
37793
|
+
if (!!css.rowEnter) {
|
|
37794
|
+
classes.rowEnter = css.rowEnter;
|
|
37230
37795
|
}
|
|
37231
|
-
if (!!css.
|
|
37232
|
-
classes.
|
|
37796
|
+
if (!!css.rowDelayedEnter) {
|
|
37797
|
+
classes.rowDelayedEnter = css.rowDelayedEnter;
|
|
37233
37798
|
}
|
|
37234
|
-
if (!!css.
|
|
37235
|
-
classes.
|
|
37799
|
+
if (!!css.rowLeave) {
|
|
37800
|
+
classes.rowLeave = css.rowLeave;
|
|
37801
|
+
}
|
|
37802
|
+
if (!!css.rowReplace) {
|
|
37803
|
+
classes.rowReplace = css.rowReplace;
|
|
37236
37804
|
}
|
|
37237
37805
|
if (this.survey) {
|
|
37238
37806
|
this.survey.updatePageCssClasses(this, classes);
|
|
@@ -37871,7 +38439,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
37871
38439
|
*
|
|
37872
38440
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
37873
38441
|
*
|
|
37874
|
-
* [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
|
|
38442
|
+
* [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
|
|
37875
38443
|
* @see triggers
|
|
37876
38444
|
* @see runTriggers
|
|
37877
38445
|
*/
|
|
@@ -39058,6 +39626,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39058
39626
|
enumerable: false,
|
|
39059
39627
|
configurable: true
|
|
39060
39628
|
});
|
|
39629
|
+
SurveyModel.prototype.disableLazyRenderingBeforeElement = function (el) {
|
|
39630
|
+
if (this.isDesignMode) {
|
|
39631
|
+
var page = this.getPageByElement(el);
|
|
39632
|
+
var index = this.pages.indexOf(page);
|
|
39633
|
+
for (var i = index; i >= 0; i--) {
|
|
39634
|
+
var currentPage = this.pages[i];
|
|
39635
|
+
currentPage.disableLazyRenderingBeforeElement(currentPage == page ? el : undefined);
|
|
39636
|
+
}
|
|
39637
|
+
}
|
|
39638
|
+
};
|
|
39061
39639
|
SurveyModel.prototype.updateLazyRenderingRowsOnRemovingElements = function () {
|
|
39062
39640
|
if (!this.isLazyRendering)
|
|
39063
39641
|
return;
|
|
@@ -46598,6 +47176,8 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
|
|
|
46598
47176
|
|
|
46599
47177
|
|
|
46600
47178
|
|
|
47179
|
+
|
|
47180
|
+
|
|
46601
47181
|
/**
|
|
46602
47182
|
* A base class for multiple-choice question types ([Checkboxes](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Radio Button Group](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), etc.).
|
|
46603
47183
|
*/
|
|
@@ -46611,6 +47191,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
46611
47191
|
_this.isRunningChoices = false;
|
|
46612
47192
|
_this.isFirstLoadChoicesFromUrl = true;
|
|
46613
47193
|
_this.isUpdatingChoicesDependedQuestions = false;
|
|
47194
|
+
_this._renderedChoices = [];
|
|
47195
|
+
_this.renderedChoicesAnimation = new animation_AnimationGroup(_this.getRenderedChoicesAnimationOptions(), function (val) {
|
|
47196
|
+
_this._renderedChoices = val;
|
|
47197
|
+
_this.renderedChoicesChangedCallback && _this.renderedChoicesChangedCallback();
|
|
47198
|
+
}, function () { return _this._renderedChoices; });
|
|
46614
47199
|
_this.headItemsCount = 0;
|
|
46615
47200
|
_this.footItemsCount = 0;
|
|
46616
47201
|
_this.prevIsOtherSelected = false;
|
|
@@ -46630,7 +47215,8 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
46630
47215
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
|
46631
47216
|
_this.onVisibleChanged();
|
|
46632
47217
|
});
|
|
46633
|
-
_this.
|
|
47218
|
+
_this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
|
|
47219
|
+
_this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
|
|
46634
47220
|
_this.setNewRestfulProperty();
|
|
46635
47221
|
var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
|
|
46636
47222
|
_this.createLocalizableString("otherErrorText", _this, true, "otherRequiredError");
|
|
@@ -46660,6 +47246,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
46660
47246
|
enumerable: false,
|
|
46661
47247
|
configurable: true
|
|
46662
47248
|
});
|
|
47249
|
+
QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
|
|
47250
|
+
var _this = this;
|
|
47251
|
+
var options = {
|
|
47252
|
+
question: this,
|
|
47253
|
+
id: function () { return _this.otherId; },
|
|
47254
|
+
propertyName: "otherValue",
|
|
47255
|
+
className: function () { return _this.cssClasses.other; },
|
|
47256
|
+
placeholder: function () { return _this.otherPlaceholder; },
|
|
47257
|
+
isDisabledAttr: function () { return _this.isInputReadOnly || false; },
|
|
47258
|
+
rows: function () { return _this.commentAreaRows; },
|
|
47259
|
+
maxLength: function () { return _this.getOthersMaxLength(); },
|
|
47260
|
+
autoGrow: function () { return _this.survey && _this.survey.autoGrowComment; },
|
|
47261
|
+
ariaRequired: function () { return _this.ariaRequired || _this.a11y_input_ariaRequired; },
|
|
47262
|
+
ariaLabel: function () { return _this.ariaLabel || _this.a11y_input_ariaLabel; },
|
|
47263
|
+
getTextValue: function () { return _this.otherValue; },
|
|
47264
|
+
onTextAreaChange: function (e) { _this.onOtherValueChange(e); },
|
|
47265
|
+
onTextAreaInput: function (e) { _this.onOtherValueInput(e); },
|
|
47266
|
+
};
|
|
47267
|
+
return options;
|
|
47268
|
+
};
|
|
46663
47269
|
QuestionSelectBase.prototype.getType = function () {
|
|
46664
47270
|
return "selectbase";
|
|
46665
47271
|
};
|
|
@@ -47437,6 +48043,10 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
47437
48043
|
var itemValue = itemvalue_ItemValue.getItemByValue(this.getFilteredChoices(), val);
|
|
47438
48044
|
return !!itemValue && !itemValue.isEnabled;
|
|
47439
48045
|
};
|
|
48046
|
+
QuestionSelectBase.prototype.endLoadingFromJson = function () {
|
|
48047
|
+
_super.prototype.endLoadingFromJson.call(this);
|
|
48048
|
+
this.updateVisibleChoices();
|
|
48049
|
+
};
|
|
47440
48050
|
Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
|
|
47441
48051
|
/**
|
|
47442
48052
|
* Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
|
@@ -47740,6 +48350,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
47740
48350
|
var oldValue = this.visibleChoices;
|
|
47741
48351
|
if (!this.isTwoValueEquals(oldValue, newValue) || this.choicesLazyLoadEnabled) {
|
|
47742
48352
|
this.setArrayPropertyDirectly("visibleChoices", newValue);
|
|
48353
|
+
this.updateRenderedChoices();
|
|
47743
48354
|
}
|
|
47744
48355
|
};
|
|
47745
48356
|
QuestionSelectBase.prototype.calcVisibleChoices = function () {
|
|
@@ -48121,9 +48732,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48121
48732
|
return (!this.isDesignMode ||
|
|
48122
48733
|
this.getPropertyByName(propName).visible);
|
|
48123
48734
|
};
|
|
48124
|
-
QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
48735
|
+
QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
48125
48736
|
var _this = this;
|
|
48126
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
48737
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
48127
48738
|
if (!this.hasOther || !this.isOtherSelected || this.otherValue
|
|
48128
48739
|
|| isOnValueChanged && !this.prevOtherErrorValue)
|
|
48129
48740
|
return;
|
|
@@ -48546,12 +49157,79 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48546
49157
|
.append(this.cssClasses.controlLabelChecked, this.isItemSelected(item))
|
|
48547
49158
|
.toString() || undefined;
|
|
48548
49159
|
};
|
|
49160
|
+
QuestionSelectBase.prototype.updateRenderedChoices = function () {
|
|
49161
|
+
this.renderedChoices = this.onGetRenderedChoicesCallback ? this.onGetRenderedChoicesCallback(this.visibleChoices) : this.visibleChoices;
|
|
49162
|
+
};
|
|
49163
|
+
QuestionSelectBase.prototype.getRenderedChoicesAnimationOptions = function () {
|
|
49164
|
+
var _this = this;
|
|
49165
|
+
return {
|
|
49166
|
+
isAnimationEnabled: function () {
|
|
49167
|
+
return _this.animationAllowed;
|
|
49168
|
+
},
|
|
49169
|
+
getRerenderEvent: function () {
|
|
49170
|
+
return _this.onElementRerendered;
|
|
49171
|
+
},
|
|
49172
|
+
getKey: function (item) { return item != _this.newItemValue ? item.value : _this.newItemValue; },
|
|
49173
|
+
getLeaveOptions: function (item) {
|
|
49174
|
+
var cssClass = _this.cssClasses.itemLeave;
|
|
49175
|
+
if (_this.hasColumns) {
|
|
49176
|
+
var index = _this.bodyItems.indexOf(item);
|
|
49177
|
+
if (index !== -1 && index !== _this.bodyItems.length - 1) {
|
|
49178
|
+
cssClass = "";
|
|
49179
|
+
}
|
|
49180
|
+
}
|
|
49181
|
+
return {
|
|
49182
|
+
cssClass: cssClass,
|
|
49183
|
+
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
|
49184
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
|
49185
|
+
};
|
|
49186
|
+
},
|
|
49187
|
+
getAnimatedElement: function (item) {
|
|
49188
|
+
return item.getRootElement();
|
|
49189
|
+
},
|
|
49190
|
+
getEnterOptions: function (item) {
|
|
49191
|
+
var cssClass = _this.cssClasses.itemEnter;
|
|
49192
|
+
if (_this.hasColumns) {
|
|
49193
|
+
var index = _this.bodyItems.indexOf(item);
|
|
49194
|
+
if (index !== -1 && index !== _this.bodyItems.length - 1) {
|
|
49195
|
+
cssClass = "";
|
|
49196
|
+
}
|
|
49197
|
+
}
|
|
49198
|
+
return {
|
|
49199
|
+
cssClass: cssClass,
|
|
49200
|
+
onBeforeRunAnimation: function (el) {
|
|
49201
|
+
if (_this.getCurrentColCount() == 0 && _this.bodyItems.indexOf(item) >= 0) {
|
|
49202
|
+
var leftPosition = el.parentElement.firstElementChild.offsetLeft;
|
|
49203
|
+
if (el.offsetLeft > leftPosition) {
|
|
49204
|
+
setPropertiesOnElementForAnimation(el, { moveAnimationDuration: "0s", fadeAnimationDelay: "0s" }, "--");
|
|
49205
|
+
}
|
|
49206
|
+
}
|
|
49207
|
+
prepareElementForVerticalAnimation(el);
|
|
49208
|
+
},
|
|
49209
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
|
49210
|
+
};
|
|
49211
|
+
}
|
|
49212
|
+
};
|
|
49213
|
+
};
|
|
49214
|
+
Object.defineProperty(QuestionSelectBase.prototype, "renderedChoices", {
|
|
49215
|
+
get: function () {
|
|
49216
|
+
return this._renderedChoices;
|
|
49217
|
+
},
|
|
49218
|
+
set: function (val) {
|
|
49219
|
+
this.renderedChoicesAnimation.sync(val);
|
|
49220
|
+
},
|
|
49221
|
+
enumerable: false,
|
|
49222
|
+
configurable: true
|
|
49223
|
+
});
|
|
48549
49224
|
Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
|
|
48550
49225
|
get: function () {
|
|
48551
49226
|
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
|
|
48552
49227
|
var res = [];
|
|
48553
|
-
for (var i = 0; i < count; i++)
|
|
48554
|
-
|
|
49228
|
+
for (var i = 0; i < count; i++) {
|
|
49229
|
+
if (this.renderedChoices[i]) {
|
|
49230
|
+
res.push(this.renderedChoices[i]);
|
|
49231
|
+
}
|
|
49232
|
+
}
|
|
48555
49233
|
return res;
|
|
48556
49234
|
},
|
|
48557
49235
|
enumerable: false,
|
|
@@ -48561,9 +49239,12 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48561
49239
|
get: function () {
|
|
48562
49240
|
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
|
|
48563
49241
|
var res = [];
|
|
48564
|
-
var items = this.
|
|
48565
|
-
for (var i = 0; i < count; i++)
|
|
48566
|
-
|
|
49242
|
+
var items = this.renderedChoices;
|
|
49243
|
+
for (var i = 0; i < count; i++) {
|
|
49244
|
+
if (this.renderedChoices[items.length - count + i]) {
|
|
49245
|
+
res.push(this.renderedChoices[items.length - count + i]);
|
|
49246
|
+
}
|
|
49247
|
+
}
|
|
48567
49248
|
return res;
|
|
48568
49249
|
},
|
|
48569
49250
|
enumerable: false,
|
|
@@ -48572,14 +49253,14 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48572
49253
|
Object.defineProperty(QuestionSelectBase.prototype, "dataChoices", {
|
|
48573
49254
|
get: function () {
|
|
48574
49255
|
var _this = this;
|
|
48575
|
-
return this.
|
|
49256
|
+
return this.renderedChoices.filter(function (item) { return !_this.isBuiltInChoice(item); });
|
|
48576
49257
|
},
|
|
48577
49258
|
enumerable: false,
|
|
48578
49259
|
configurable: true
|
|
48579
49260
|
});
|
|
48580
49261
|
Object.defineProperty(QuestionSelectBase.prototype, "bodyItems", {
|
|
48581
49262
|
get: function () {
|
|
48582
|
-
return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.
|
|
49263
|
+
return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.renderedChoices;
|
|
48583
49264
|
},
|
|
48584
49265
|
enumerable: false,
|
|
48585
49266
|
configurable: true
|
|
@@ -48602,9 +49283,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48602
49283
|
get: function () {
|
|
48603
49284
|
var columns = [];
|
|
48604
49285
|
var colCount = this.getCurrentColCount();
|
|
48605
|
-
if (this.hasColumns && this.
|
|
49286
|
+
if (this.hasColumns && this.renderedChoices.length > 0) {
|
|
48606
49287
|
var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isDesignMode) ?
|
|
48607
|
-
this.
|
|
49288
|
+
this.renderedChoices : this.dataChoices;
|
|
48608
49289
|
if (settings.showItemsInOrder == "column") {
|
|
48609
49290
|
var prevIndex = 0;
|
|
48610
49291
|
var leftElementsCount = choicesToBuildColumns.length % colCount;
|
|
@@ -48790,9 +49471,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48790
49471
|
return classes;
|
|
48791
49472
|
};
|
|
48792
49473
|
question_baseselect_decorate([
|
|
48793
|
-
jsonobject_property({
|
|
49474
|
+
jsonobject_property({
|
|
49475
|
+
onSet: function (newVal, target) {
|
|
48794
49476
|
target.onSelectedItemValuesChangedHandler(newVal);
|
|
48795
|
-
}
|
|
49477
|
+
}
|
|
49478
|
+
})
|
|
48796
49479
|
], QuestionSelectBase.prototype, "selectedItemValues", void 0);
|
|
48797
49480
|
question_baseselect_decorate([
|
|
48798
49481
|
jsonobject_property()
|
|
@@ -48800,6 +49483,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48800
49483
|
question_baseselect_decorate([
|
|
48801
49484
|
jsonobject_property({ localizable: true })
|
|
48802
49485
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
|
49486
|
+
question_baseselect_decorate([
|
|
49487
|
+
propertyArray()
|
|
49488
|
+
], QuestionSelectBase.prototype, "_renderedChoices", void 0);
|
|
48803
49489
|
return QuestionSelectBase;
|
|
48804
49490
|
}(question_Question));
|
|
48805
49491
|
|
|
@@ -49263,14 +49949,14 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
49263
49949
|
this.model.onHiding();
|
|
49264
49950
|
};
|
|
49265
49951
|
PopupBaseViewModel.prototype.getLeaveOptions = function () {
|
|
49266
|
-
return { cssClass: "sv-popup--
|
|
49952
|
+
return { cssClass: "sv-popup--leave", onBeforeRunAnimation: function (el) {
|
|
49267
49953
|
el.setAttribute("inert", "");
|
|
49268
49954
|
},
|
|
49269
49955
|
onAfterRunAnimation: function (el) { return el.removeAttribute("inert"); }
|
|
49270
49956
|
};
|
|
49271
49957
|
};
|
|
49272
49958
|
PopupBaseViewModel.prototype.getEnterOptions = function () {
|
|
49273
|
-
return { cssClass: "sv-popup--
|
|
49959
|
+
return { cssClass: "sv-popup--enter" };
|
|
49274
49960
|
};
|
|
49275
49961
|
PopupBaseViewModel.prototype.getAnimatedElement = function () {
|
|
49276
49962
|
return this.getAnimationContainer();
|
|
@@ -49513,7 +50199,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
49513
50199
|
};
|
|
49514
50200
|
PopupBaseViewModel.prototype.updateOnHiding = function () {
|
|
49515
50201
|
if (this.isFocusedContent && this.prevActiveElement) {
|
|
49516
|
-
this.prevActiveElement.focus();
|
|
50202
|
+
this.prevActiveElement.focus({ preventScroll: true });
|
|
49517
50203
|
}
|
|
49518
50204
|
};
|
|
49519
50205
|
PopupBaseViewModel.prototype.focusContainer = function () {
|
|
@@ -51130,6 +51816,7 @@ var question_matrix_extends = (undefined && undefined.__extends) || (function ()
|
|
|
51130
51816
|
|
|
51131
51817
|
|
|
51132
51818
|
|
|
51819
|
+
|
|
51133
51820
|
var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
|
|
51134
51821
|
question_matrix_extends(MatrixRowModel, _super);
|
|
51135
51822
|
function MatrixRowModel(item, fullName, data, value) {
|
|
@@ -51417,9 +52104,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51417
52104
|
_this.onColumnsChanged();
|
|
51418
52105
|
});
|
|
51419
52106
|
_this.registerPropertyChangedHandlers(["rows"], function () {
|
|
51420
|
-
|
|
51421
|
-
|
|
51422
|
-
}
|
|
52107
|
+
_this.runCondition(_this.getDataFilteredValues(), _this.getDataFilteredProperties());
|
|
52108
|
+
_this.onRowsChanged();
|
|
51423
52109
|
});
|
|
51424
52110
|
_this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
|
|
51425
52111
|
_this.updateVisibilityBasedOnRows();
|
|
@@ -51589,21 +52275,31 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51589
52275
|
}
|
|
51590
52276
|
return res;
|
|
51591
52277
|
};
|
|
51592
|
-
QuestionMatrixModel.prototype.
|
|
52278
|
+
QuestionMatrixModel.prototype.runCondition = function (values, properties) {
|
|
51593
52279
|
itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
|
51594
|
-
|
|
52280
|
+
_super.prototype.runCondition.call(this, values, properties);
|
|
52281
|
+
};
|
|
52282
|
+
QuestionMatrixModel.prototype.createRowsVisibleIfRunner = function () {
|
|
52283
|
+
return !!this.rowsVisibleIf ? new ConditionRunner(this.rowsVisibleIf) : null;
|
|
52284
|
+
};
|
|
52285
|
+
QuestionMatrixModel.prototype.onRowsChanged = function () {
|
|
52286
|
+
this.clearGeneratedRows();
|
|
52287
|
+
_super.prototype.onRowsChanged.call(this);
|
|
51595
52288
|
};
|
|
51596
52289
|
QuestionMatrixModel.prototype.getVisibleRows = function () {
|
|
52290
|
+
if (!!this.generatedVisibleRows)
|
|
52291
|
+
return this.generatedVisibleRows;
|
|
51597
52292
|
var result = new Array();
|
|
51598
52293
|
var val = this.value;
|
|
51599
52294
|
if (!val)
|
|
51600
52295
|
val = {};
|
|
51601
|
-
var rows =
|
|
52296
|
+
var rows = this.filteredRows || this.rows;
|
|
51602
52297
|
for (var i = 0; i < rows.length; i++) {
|
|
51603
52298
|
var row = rows[i];
|
|
51604
52299
|
if (this.isValueEmpty(row.value))
|
|
51605
52300
|
continue;
|
|
51606
|
-
|
|
52301
|
+
var rowId = this.id + "_" + row.value.toString().replace(/\s/g, "_");
|
|
52302
|
+
result.push(this.createMatrixRow(row, rowId, val[row.value]));
|
|
51607
52303
|
}
|
|
51608
52304
|
this.generatedVisibleRows = result;
|
|
51609
52305
|
return result;
|
|
@@ -51619,6 +52315,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51619
52315
|
QuestionMatrixModel.prototype.endLoadingFromJson = function () {
|
|
51620
52316
|
_super.prototype.endLoadingFromJson.call(this);
|
|
51621
52317
|
this.rows = this.sortVisibleRows(this.rows);
|
|
52318
|
+
this.onRowsChanged();
|
|
52319
|
+
this.onColumnsChanged();
|
|
51622
52320
|
};
|
|
51623
52321
|
QuestionMatrixModel.prototype.isNewValueCorrect = function (val) {
|
|
51624
52322
|
return helpers_Helpers.isValueObject(val, true);
|
|
@@ -51680,11 +52378,11 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51680
52378
|
QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
|
|
51681
52379
|
return this.isMouseDown === true && this.hasValuesInAllRows();
|
|
51682
52380
|
};
|
|
51683
|
-
QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
51684
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
52381
|
+
QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
52382
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
51685
52383
|
if (!isOnValueChanged || this.hasCssError()) {
|
|
51686
52384
|
var rowsErrors = { noValue: false, isNotUnique: false };
|
|
51687
|
-
this.checkErrorsAllRows(
|
|
52385
|
+
this.checkErrorsAllRows(fireCallback, rowsErrors);
|
|
51688
52386
|
if (rowsErrors.noValue) {
|
|
51689
52387
|
errors.push(new RequiredInAllRowsError(null, this));
|
|
51690
52388
|
}
|
|
@@ -51851,11 +52549,47 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51851
52549
|
json["type"] = question.getType();
|
|
51852
52550
|
return json;
|
|
51853
52551
|
};
|
|
52552
|
+
QuestionMatrixModel.prototype.clearIncorrectValues = function () {
|
|
52553
|
+
this.clearInvisibleValuesInRowsAndColumns(true, true, true);
|
|
52554
|
+
_super.prototype.clearIncorrectValues.call(this);
|
|
52555
|
+
};
|
|
51854
52556
|
QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function (reason) {
|
|
51855
52557
|
_super.prototype.clearValueIfInvisibleCore.call(this, reason);
|
|
51856
|
-
|
|
51857
|
-
|
|
52558
|
+
this.clearInvisibleValuesInRowsAndColumns(true, true, false);
|
|
52559
|
+
};
|
|
52560
|
+
QuestionMatrixModel.prototype.clearInvisibleColumnValues = function () {
|
|
52561
|
+
this.clearInvisibleValuesInRowsAndColumns(false, true, false);
|
|
52562
|
+
};
|
|
52563
|
+
QuestionMatrixModel.prototype.clearInvisibleValuesInRows = function () {
|
|
52564
|
+
this.clearInvisibleValuesInRowsAndColumns(true, false, false);
|
|
52565
|
+
};
|
|
52566
|
+
QuestionMatrixModel.prototype.clearInvisibleValuesInRowsAndColumns = function (inRows, inColumns, inCorrectRows) {
|
|
52567
|
+
if (this.isEmpty())
|
|
52568
|
+
return;
|
|
52569
|
+
var updatedData = this.getUnbindValue(this.value);
|
|
52570
|
+
var newData = {};
|
|
52571
|
+
var rows = this.rows;
|
|
52572
|
+
for (var i = 0; i < rows.length; i++) {
|
|
52573
|
+
var key = rows[i].value;
|
|
52574
|
+
if (!!updatedData[key]) {
|
|
52575
|
+
if (inRows && !rows[i].isVisible || inColumns && !this.getVisibleColumnByValue(updatedData[key])) {
|
|
52576
|
+
delete updatedData[key];
|
|
52577
|
+
}
|
|
52578
|
+
else {
|
|
52579
|
+
newData[key] = updatedData[key];
|
|
52580
|
+
}
|
|
52581
|
+
}
|
|
51858
52582
|
}
|
|
52583
|
+
if (inCorrectRows) {
|
|
52584
|
+
updatedData = newData;
|
|
52585
|
+
}
|
|
52586
|
+
if (this.isTwoValueEquals(updatedData, this.value))
|
|
52587
|
+
return;
|
|
52588
|
+
this.value = updatedData;
|
|
52589
|
+
};
|
|
52590
|
+
QuestionMatrixModel.prototype.getVisibleColumnByValue = function (val) {
|
|
52591
|
+
var col = itemvalue_ItemValue.getItemByValue(this.columns, val);
|
|
52592
|
+
return !!col && col.isVisible ? col : null;
|
|
51859
52593
|
};
|
|
51860
52594
|
QuestionMatrixModel.prototype.getFirstInputElementId = function () {
|
|
51861
52595
|
var rows = this.generatedVisibleRows;
|
|
@@ -52737,9 +53471,9 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52737
53471
|
}
|
|
52738
53472
|
return _super.prototype.valueFromDataCore.call(this, val);
|
|
52739
53473
|
};
|
|
52740
|
-
QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
53474
|
+
QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
52741
53475
|
var _this = this;
|
|
52742
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
53476
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
52743
53477
|
if (isOnValueChanged)
|
|
52744
53478
|
return;
|
|
52745
53479
|
if (this.isValueLessMin) {
|
|
@@ -52761,6 +53495,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52761
53495
|
}
|
|
52762
53496
|
var valName = this.getValidatorTitle();
|
|
52763
53497
|
var emailValidator = new EmailValidator();
|
|
53498
|
+
emailValidator.errorOwner = this;
|
|
52764
53499
|
if (this.inputType === "email" &&
|
|
52765
53500
|
!this.validators.some(function (v) { return v.getType() === "emailvalidator"; })) {
|
|
52766
53501
|
var validateResult = emailValidator.validate(this.value, valName);
|
|
@@ -52780,7 +53515,8 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52780
53515
|
return isValid;
|
|
52781
53516
|
};
|
|
52782
53517
|
QuestionTextModel.prototype.convertFuncValuetoQuestionValue = function (val) {
|
|
52783
|
-
|
|
53518
|
+
var type = this.maskTypeIsEmpty ? this.inputType : this.maskSettings.getTypeForExpressions();
|
|
53519
|
+
return helpers_Helpers.convertValToQuestionVal(val, type);
|
|
52784
53520
|
};
|
|
52785
53521
|
QuestionTextModel.prototype.getMinMaxErrorText = function (errorText, value) {
|
|
52786
53522
|
if (helpers_Helpers.isValueEmpty(value))
|
|
@@ -55145,8 +55881,8 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
55145
55881
|
return val.map(function (item) { return _this.createItemValue(item); });
|
|
55146
55882
|
};
|
|
55147
55883
|
QuestionCheckboxModel.prototype.getAnswerCorrectIgnoreOrder = function () { return true; };
|
|
55148
|
-
QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
55149
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
55884
|
+
QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
55885
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
55150
55886
|
if (isOnValueChanged)
|
|
55151
55887
|
return;
|
|
55152
55888
|
if (this.minSelectedChoices > 0 && this.checkMinSelectedChoicesUnreached()) {
|
|
@@ -57549,6 +58285,8 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
|
57549
58285
|
|
|
57550
58286
|
|
|
57551
58287
|
|
|
58288
|
+
|
|
58289
|
+
|
|
57552
58290
|
/**
|
|
57553
58291
|
* A class that describes the Long Text question type.
|
|
57554
58292
|
*
|
|
@@ -57556,9 +58294,46 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
|
57556
58294
|
*/
|
|
57557
58295
|
var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
57558
58296
|
question_comment_extends(QuestionCommentModel, _super);
|
|
57559
|
-
function QuestionCommentModel() {
|
|
57560
|
-
|
|
58297
|
+
function QuestionCommentModel(name) {
|
|
58298
|
+
var _this_1 = _super.call(this, name) || this;
|
|
58299
|
+
_this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
|
|
58300
|
+
return _this_1;
|
|
57561
58301
|
}
|
|
58302
|
+
QuestionCommentModel.prototype.getTextAreaOptions = function () {
|
|
58303
|
+
var _this_1 = this;
|
|
58304
|
+
var _this = this;
|
|
58305
|
+
var updateQuestionValue = function (newValue) {
|
|
58306
|
+
if (!helpers_Helpers.isTwoValueEquals(_this.value, newValue, false, true, false)) {
|
|
58307
|
+
_this.value = newValue;
|
|
58308
|
+
}
|
|
58309
|
+
};
|
|
58310
|
+
var options = {
|
|
58311
|
+
question: this,
|
|
58312
|
+
id: function () { return _this_1.inputId; },
|
|
58313
|
+
propertyName: "value",
|
|
58314
|
+
className: function () { return _this_1.className; },
|
|
58315
|
+
placeholder: function () { return _this_1.renderedPlaceholder; },
|
|
58316
|
+
isDisabledAttr: function () { return _this_1.isDisabledAttr; },
|
|
58317
|
+
isReadOnlyAttr: function () { return _this_1.isReadOnlyAttr; },
|
|
58318
|
+
autoGrow: function () { return _this_1.renderedAutoGrow; },
|
|
58319
|
+
maxLength: function () { return _this_1.getMaxLength(); },
|
|
58320
|
+
rows: function () { return _this_1.rows; },
|
|
58321
|
+
cols: function () { return _this_1.cols; },
|
|
58322
|
+
ariaRequired: function () { return _this_1.a11y_input_ariaRequired; },
|
|
58323
|
+
ariaLabel: function () { return _this_1.a11y_input_ariaLabel; },
|
|
58324
|
+
ariaLabelledBy: function () { return _this_1.a11y_input_ariaLabelledBy; },
|
|
58325
|
+
ariaDescribedBy: function () { return _this_1.a11y_input_ariaDescribedBy; },
|
|
58326
|
+
ariaInvalid: function () { return _this_1.a11y_input_ariaInvalid; },
|
|
58327
|
+
ariaErrormessage: function () { return _this_1.a11y_input_ariaErrormessage; },
|
|
58328
|
+
getTextValue: function () { return _this_1.value; },
|
|
58329
|
+
onTextAreaChange: function (e) { updateQuestionValue(e.target.value); },
|
|
58330
|
+
onTextAreaInput: function (event) { _this_1.onInput(event); },
|
|
58331
|
+
onTextAreaKeyDown: function (event) { _this_1.onKeyDown(event); },
|
|
58332
|
+
onTextAreaFocus: function (event) { _this_1.onFocus(event); },
|
|
58333
|
+
onTextAreaBlur: function (event) { _this_1.onBlur(event); }
|
|
58334
|
+
};
|
|
58335
|
+
return options;
|
|
58336
|
+
};
|
|
57562
58337
|
Object.defineProperty(QuestionCommentModel.prototype, "rows", {
|
|
57563
58338
|
/**
|
|
57564
58339
|
* Specifies the visible height of the comment area, measured in lines.
|
|
@@ -57664,9 +58439,9 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
57664
58439
|
_super.prototype.afterRenderQuestionElement.call(this, el);
|
|
57665
58440
|
};
|
|
57666
58441
|
QuestionCommentModel.prototype.updateElement = function () {
|
|
57667
|
-
var
|
|
58442
|
+
var _this_1 = this;
|
|
57668
58443
|
if (this.element && this.renderedAutoGrow) {
|
|
57669
|
-
setTimeout(function () { return increaseHeightByContent(
|
|
58444
|
+
setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
|
|
57670
58445
|
}
|
|
57671
58446
|
};
|
|
57672
58447
|
QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
@@ -58066,8 +58841,8 @@ var question_file_QuestionFileModelBase = /** @class */ (function (_super) {
|
|
|
58066
58841
|
return;
|
|
58067
58842
|
this.survey.clearFiles(this, this.name, this.value, null, function () { });
|
|
58068
58843
|
};
|
|
58069
|
-
QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
58070
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
58844
|
+
QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
|
58845
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
|
58071
58846
|
if (this.isUploading && this.waitForUpload) {
|
|
58072
58847
|
errors.push(new UploadingFileError(this.getLocalizationString("uploadingFile"), this));
|
|
58073
58848
|
}
|
|
@@ -61776,21 +62551,10 @@ var question_image_decorate = (undefined && undefined.__decorate) || function (d
|
|
|
61776
62551
|
|
|
61777
62552
|
|
|
61778
62553
|
|
|
61779
|
-
|
|
62554
|
+
|
|
61780
62555
|
var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
|
|
61781
62556
|
var youtubeUrl = "https://www.youtube.com/";
|
|
61782
62557
|
var youtubeEmbed = "embed";
|
|
61783
|
-
function isUrlYoutubeVideo(url) {
|
|
61784
|
-
if (!url)
|
|
61785
|
-
return false;
|
|
61786
|
-
url = url.toLowerCase();
|
|
61787
|
-
url = url.replace(/^https?:\/\//, "");
|
|
61788
|
-
for (var i = 0; i < youtubeDomains.length; i++) {
|
|
61789
|
-
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
|
61790
|
-
return true;
|
|
61791
|
-
}
|
|
61792
|
-
return false;
|
|
61793
|
-
}
|
|
61794
62558
|
/**
|
|
61795
62559
|
* A class that describes the Image question type. Unlike other question types, Image cannot have a title or value.
|
|
61796
62560
|
*
|
|
@@ -62015,7 +62779,7 @@ var question_image_QuestionImageModel = /** @class */ (function (_super) {
|
|
|
62015
62779
|
}
|
|
62016
62780
|
};
|
|
62017
62781
|
QuestionImageModel.prototype.isYoutubeVideo = function () {
|
|
62018
|
-
return isUrlYoutubeVideo(this.imageLink);
|
|
62782
|
+
return helpers_Helpers.isUrlYoutubeVideo(this.imageLink);
|
|
62019
62783
|
};
|
|
62020
62784
|
QuestionImageModel.prototype.isVideo = function () {
|
|
62021
62785
|
var link = this.imageLink;
|
|
@@ -62035,9 +62799,8 @@ var question_image_QuestionImageModel = /** @class */ (function (_super) {
|
|
|
62035
62799
|
}(QuestionNonValue));
|
|
62036
62800
|
|
|
62037
62801
|
function getCorrectImageLink(val, isYouTube) {
|
|
62038
|
-
if (!val || !isUrlYoutubeVideo(val))
|
|
62802
|
+
if (!val || !helpers_Helpers.isUrlYoutubeVideo(val))
|
|
62039
62803
|
return isYouTube ? "" : val;
|
|
62040
|
-
//if(!val || !isUrlYoutubeVideo(val)) return val;
|
|
62041
62804
|
var res = val.toLocaleLowerCase();
|
|
62042
62805
|
if (res.indexOf(youtubeEmbed) > -1)
|
|
62043
62806
|
return val;
|
|
@@ -63530,8 +64293,15 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63530
64293
|
if (!!res)
|
|
63531
64294
|
return res;
|
|
63532
64295
|
}
|
|
64296
|
+
if (this.showAddPanelButton && (!withError || this.currentErrorCount > 0))
|
|
64297
|
+
return this;
|
|
63533
64298
|
return null;
|
|
63534
64299
|
};
|
|
64300
|
+
QuestionPanelDynamicModel.prototype.getFirstInputElementId = function () {
|
|
64301
|
+
if (this.showAddPanelButton)
|
|
64302
|
+
return this.addButtonId;
|
|
64303
|
+
return _super.prototype.getFirstInputElementId.call(this);
|
|
64304
|
+
};
|
|
63535
64305
|
QuestionPanelDynamicModel.prototype.setSurveyImpl = function (value, isLight) {
|
|
63536
64306
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
|
63537
64307
|
this.setTemplatePanelSurveyImpl();
|
|
@@ -63981,34 +64751,44 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
63981
64751
|
}
|
|
63982
64752
|
},
|
|
63983
64753
|
getEnterOptions: function () {
|
|
63984
|
-
var cssClass = new CssClassBuilder().append(_this.cssClasses.
|
|
64754
|
+
var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperEnter).append(getDirectionCssClass()).toString();
|
|
63985
64755
|
return {
|
|
63986
64756
|
onBeforeRunAnimation: function (el) {
|
|
63987
|
-
var _a;
|
|
63988
64757
|
if (_this.focusNewPanelCallback) {
|
|
63989
64758
|
var scolledElement = _this.isRenderModeList ? el : el.parentElement;
|
|
63990
64759
|
survey_element_SurveyElement.ScrollElementToViewCore(scolledElement, false, false, { behavior: "smooth" });
|
|
63991
64760
|
}
|
|
63992
|
-
if (!_this.isRenderModeList) {
|
|
63993
|
-
(
|
|
64761
|
+
if (!_this.isRenderModeList && el.parentElement) {
|
|
64762
|
+
setPropertiesOnElementForAnimation(el.parentElement, { heightTo: el.offsetHeight + "px" });
|
|
63994
64763
|
}
|
|
63995
64764
|
else {
|
|
63996
|
-
|
|
64765
|
+
prepareElementForVerticalAnimation(el);
|
|
64766
|
+
}
|
|
64767
|
+
},
|
|
64768
|
+
onAfterRunAnimation: function (el) {
|
|
64769
|
+
cleanHtmlElementAfterAnimation(el);
|
|
64770
|
+
if (el.parentElement) {
|
|
64771
|
+
cleanHtmlElementAfterAnimation(el.parentElement);
|
|
63997
64772
|
}
|
|
63998
64773
|
},
|
|
63999
64774
|
cssClass: cssClass
|
|
64000
64775
|
};
|
|
64001
64776
|
},
|
|
64002
64777
|
getLeaveOptions: function () {
|
|
64003
|
-
var cssClass = new CssClassBuilder().append(_this.cssClasses.
|
|
64778
|
+
var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperLeave).append(getDirectionCssClass()).toString();
|
|
64004
64779
|
return {
|
|
64005
64780
|
onBeforeRunAnimation: function (el) {
|
|
64006
|
-
|
|
64007
|
-
|
|
64008
|
-
(_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.style.setProperty("--animation-height-from", el.offsetHeight + "px");
|
|
64781
|
+
if (!_this.isRenderModeList && el.parentElement) {
|
|
64782
|
+
setPropertiesOnElementForAnimation(el.parentElement, { heightFrom: el.offsetHeight + "px" });
|
|
64009
64783
|
}
|
|
64010
64784
|
else {
|
|
64011
|
-
|
|
64785
|
+
prepareElementForVerticalAnimation(el);
|
|
64786
|
+
}
|
|
64787
|
+
},
|
|
64788
|
+
onAfterRunAnimation: function (el) {
|
|
64789
|
+
cleanHtmlElementAfterAnimation(el);
|
|
64790
|
+
if (el.parentElement) {
|
|
64791
|
+
cleanHtmlElementAfterAnimation(el.parentElement);
|
|
64012
64792
|
}
|
|
64013
64793
|
},
|
|
64014
64794
|
cssClass: cssClass
|
|
@@ -64508,6 +65288,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64508
65288
|
enumerable: false,
|
|
64509
65289
|
configurable: true
|
|
64510
65290
|
});
|
|
65291
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "addButtonId", {
|
|
65292
|
+
get: function () {
|
|
65293
|
+
return this.id + "addPanel";
|
|
65294
|
+
},
|
|
65295
|
+
enumerable: false,
|
|
65296
|
+
configurable: true
|
|
65297
|
+
});
|
|
64511
65298
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "newPanelPosition", {
|
|
64512
65299
|
/**
|
|
64513
65300
|
* Specifies the position of newly added panels.
|
|
@@ -64729,8 +65516,9 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
64729
65516
|
return 0;
|
|
64730
65517
|
var onSurveyNumbering = this.showQuestionNumbers === "onSurvey";
|
|
64731
65518
|
var startIndex = onSurveyNumbering ? value : 0;
|
|
64732
|
-
|
|
64733
|
-
|
|
65519
|
+
var panels = this.isDesignMode ? [this.template] : this.visiblePanelsCore;
|
|
65520
|
+
for (var i = 0; i < panels.length; i++) {
|
|
65521
|
+
var counter = this.setPanelVisibleIndex(panels[i], startIndex, this.showQuestionNumbers != "off");
|
|
64734
65522
|
if (onSurveyNumbering) {
|
|
64735
65523
|
startIndex += counter;
|
|
64736
65524
|
}
|
|
@@ -65255,13 +66043,18 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
65255
66043
|
}
|
|
65256
66044
|
}
|
|
65257
66045
|
this.updateIsReady();
|
|
65258
|
-
if (
|
|
66046
|
+
if (!this.showAddPanelButton) {
|
|
65259
66047
|
this.updateNoEntriesTextDefaultLoc();
|
|
65260
66048
|
}
|
|
65261
66049
|
this.updateFooterActions();
|
|
65262
66050
|
this.isBuildingPanelsFirstTime = false;
|
|
65263
66051
|
this.releaseAnimations();
|
|
65264
66052
|
};
|
|
66053
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "showAddPanelButton", {
|
|
66054
|
+
get: function () { return this.allowAddPanel && !this.isReadOnly; },
|
|
66055
|
+
enumerable: false,
|
|
66056
|
+
configurable: true
|
|
66057
|
+
});
|
|
65265
66058
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "wasNotRenderedInSurvey", {
|
|
65266
66059
|
get: function () {
|
|
65267
66060
|
return !this.hasPanelBuildFirstTime && !this.wasRendered && !!this.survey;
|
|
@@ -67764,6 +68557,9 @@ var mask_base_InputMaskBase = /** @class */ (function (_super) {
|
|
|
67764
68557
|
InputMaskBase.prototype.getUnmaskedValue = function (src) { return src; };
|
|
67765
68558
|
InputMaskBase.prototype.getMaskedValue = function (src) { return src; };
|
|
67766
68559
|
InputMaskBase.prototype.getTextAlignment = function () { return "auto"; };
|
|
68560
|
+
InputMaskBase.prototype.getTypeForExpressions = function () {
|
|
68561
|
+
return "text";
|
|
68562
|
+
};
|
|
67767
68563
|
mask_base_decorate([
|
|
67768
68564
|
jsonobject_property()
|
|
67769
68565
|
], InputMaskBase.prototype, "saveMaskedValue", void 0);
|
|
@@ -68487,6 +69283,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
68487
69283
|
InputMaskDateTime.prototype.getType = function () {
|
|
68488
69284
|
return "datetimemask";
|
|
68489
69285
|
};
|
|
69286
|
+
InputMaskDateTime.prototype.getTypeForExpressions = function () {
|
|
69287
|
+
return this.hasTimePart ? "datetime-local" : "datetime";
|
|
69288
|
+
};
|
|
68490
69289
|
InputMaskDateTime.prototype.updateLiterals = function () {
|
|
68491
69290
|
this.lexems = getDateTimeLexems(this.pattern || "");
|
|
68492
69291
|
};
|
|
@@ -69129,8 +69928,8 @@ Serializer.addClass("currencymask", [
|
|
|
69129
69928
|
|
|
69130
69929
|
var Version;
|
|
69131
69930
|
var ReleaseDate;
|
|
69132
|
-
Version = "" + "1.
|
|
69133
|
-
ReleaseDate = "" + "2024-09-
|
|
69931
|
+
Version = "" + "1.12.2";
|
|
69932
|
+
ReleaseDate = "" + "2024-09-16";
|
|
69134
69933
|
function checkLibraryVersion(ver, libraryName) {
|
|
69135
69934
|
if (Version != ver) {
|
|
69136
69935
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -69295,6 +70094,7 @@ function checkPrefix(prefix) {
|
|
|
69295
70094
|
|
|
69296
70095
|
|
|
69297
70096
|
|
|
70097
|
+
|
|
69298
70098
|
|
|
69299
70099
|
|
|
69300
70100
|
//Uncomment to include the "date" question type.
|
|
@@ -70189,6 +70989,7 @@ var modernCss = {
|
|
|
70189
70989
|
page: {
|
|
70190
70990
|
root: "sv-page sv-body__page",
|
|
70191
70991
|
title: "sv-title sv-page__title",
|
|
70992
|
+
number: "sv-page__num",
|
|
70192
70993
|
description: "sv-description sv-page__description",
|
|
70193
70994
|
},
|
|
70194
70995
|
pageTitle: "sv-title sv-page__title",
|