survey-core 1.12.1 → 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 +3 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +3 -1
- 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 +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +831 -235
- 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/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/martixBase.d.ts +7 -6
- package/ts3.4/typings/packages/survey-core/src/page.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -1
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +9 -6
- package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +3 -0
- package/ts3.4/typings/packages/survey-core/src/question_comment.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrix.d.ts +9 -1
- 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 +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrixdynamic.d.ts +1 -0
- 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 +1 -1
- package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +56 -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/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/packages/survey-core/src/martixBase.d.ts +7 -6
- package/typings/packages/survey-core/src/page.d.ts +3 -0
- package/typings/packages/survey-core/src/panel.d.ts +3 -1
- package/typings/packages/survey-core/src/question.d.ts +9 -6
- package/typings/packages/survey-core/src/question_baseselect.d.ts +3 -0
- package/typings/packages/survey-core/src/question_comment.d.ts +4 -0
- package/typings/packages/survey-core/src/question_matrix.d.ts +9 -1
- 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 +1 -0
- package/typings/packages/survey-core/src/question_matrixdynamic.d.ts +1 -0
- package/typings/packages/survey-core/src/survey-element.d.ts +1 -0
- package/typings/packages/survey-core/src/survey.d.ts +1 -1
- package/typings/packages/survey-core/src/utils/text-area.d.ts +56 -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.12.
|
|
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)
|
|
@@ -13376,6 +13377,14 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13376
13377
|
enumerable: false,
|
|
13377
13378
|
configurable: true
|
|
13378
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
|
+
});
|
|
13379
13388
|
SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
|
|
13380
13389
|
SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
|
|
13381
13390
|
Object.defineProperty(SurveyElement.prototype, "cssError", {
|
|
@@ -14808,9 +14817,131 @@ function navigateToUrl(url) {
|
|
|
14808
14817
|
function wrapUrlForBackgroundImage(url) {
|
|
14809
14818
|
return !!url ? ["url(", url, ")"].join("") : "";
|
|
14810
14819
|
}
|
|
14811
|
-
//new-name: old-name
|
|
14820
|
+
// new-name: old-name
|
|
14812
14821
|
var renamedIcons = {
|
|
14813
|
-
"
|
|
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"
|
|
14814
14945
|
};
|
|
14815
14946
|
function getIconNameFromProxy(iconName) {
|
|
14816
14947
|
if (!iconName)
|
|
@@ -16400,7 +16531,9 @@ var ValidatorResult = /** @class */ (function () {
|
|
|
16400
16531
|
}());
|
|
16401
16532
|
|
|
16402
16533
|
/**
|
|
16403
|
-
*
|
|
16534
|
+
* A base class for all classes that implement validators.
|
|
16535
|
+
*
|
|
16536
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16404
16537
|
*/
|
|
16405
16538
|
var validator_SurveyValidator = /** @class */ (function (_super) {
|
|
16406
16539
|
validator_extends(SurveyValidator, _super);
|
|
@@ -16416,6 +16549,9 @@ var validator_SurveyValidator = /** @class */ (function (_super) {
|
|
|
16416
16549
|
: null;
|
|
16417
16550
|
};
|
|
16418
16551
|
Object.defineProperty(SurveyValidator.prototype, "text", {
|
|
16552
|
+
/**
|
|
16553
|
+
* An error message to display when a value fails validation.
|
|
16554
|
+
*/
|
|
16419
16555
|
get: function () {
|
|
16420
16556
|
return this.getLocalizableStringText("text");
|
|
16421
16557
|
},
|
|
@@ -16556,7 +16692,9 @@ var ValidatorRunner = /** @class */ (function () {
|
|
|
16556
16692
|
}());
|
|
16557
16693
|
|
|
16558
16694
|
/**
|
|
16559
|
-
*
|
|
16695
|
+
* A class that implements a validator for numeric values.
|
|
16696
|
+
*
|
|
16697
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16560
16698
|
*/
|
|
16561
16699
|
var validator_NumericValidator = /** @class */ (function (_super) {
|
|
16562
16700
|
validator_extends(NumericValidator, _super);
|
|
@@ -16605,7 +16743,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
|
|
|
16605
16743
|
};
|
|
16606
16744
|
Object.defineProperty(NumericValidator.prototype, "minValue", {
|
|
16607
16745
|
/**
|
|
16608
|
-
*
|
|
16746
|
+
* A minimum allowed numeric value.
|
|
16747
|
+
*
|
|
16748
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16609
16749
|
*/
|
|
16610
16750
|
get: function () {
|
|
16611
16751
|
return this.getPropertyValue("minValue");
|
|
@@ -16618,7 +16758,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
|
|
|
16618
16758
|
});
|
|
16619
16759
|
Object.defineProperty(NumericValidator.prototype, "maxValue", {
|
|
16620
16760
|
/**
|
|
16621
|
-
*
|
|
16761
|
+
* A maximum allowed numeric value.
|
|
16762
|
+
*
|
|
16763
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16622
16764
|
*/
|
|
16623
16765
|
get: function () {
|
|
16624
16766
|
return this.getPropertyValue("maxValue");
|
|
@@ -16633,7 +16775,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
|
|
|
16633
16775
|
}(validator_SurveyValidator));
|
|
16634
16776
|
|
|
16635
16777
|
/**
|
|
16636
|
-
*
|
|
16778
|
+
* A class that implements a validator for text values.
|
|
16779
|
+
*
|
|
16780
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16637
16781
|
*/
|
|
16638
16782
|
var TextValidator = /** @class */ (function (_super) {
|
|
16639
16783
|
validator_extends(TextValidator, _super);
|
|
@@ -16672,7 +16816,11 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16672
16816
|
};
|
|
16673
16817
|
Object.defineProperty(TextValidator.prototype, "minLength", {
|
|
16674
16818
|
/**
|
|
16675
|
-
* 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))
|
|
16676
16824
|
*/
|
|
16677
16825
|
get: function () {
|
|
16678
16826
|
return this.getPropertyValue("minLength");
|
|
@@ -16685,7 +16833,11 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16685
16833
|
});
|
|
16686
16834
|
Object.defineProperty(TextValidator.prototype, "maxLength", {
|
|
16687
16835
|
/**
|
|
16688
|
-
* 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))
|
|
16689
16841
|
*/
|
|
16690
16842
|
get: function () {
|
|
16691
16843
|
return this.getPropertyValue("maxLength");
|
|
@@ -16698,7 +16850,9 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16698
16850
|
});
|
|
16699
16851
|
Object.defineProperty(TextValidator.prototype, "allowDigits", {
|
|
16700
16852
|
/**
|
|
16701
|
-
*
|
|
16853
|
+
* Specifies whether a text value can include numerical digits.
|
|
16854
|
+
*
|
|
16855
|
+
* Default value: `true`
|
|
16702
16856
|
*/
|
|
16703
16857
|
get: function () {
|
|
16704
16858
|
return this.getPropertyValue("allowDigits");
|
|
@@ -16713,7 +16867,9 @@ var TextValidator = /** @class */ (function (_super) {
|
|
|
16713
16867
|
}(validator_SurveyValidator));
|
|
16714
16868
|
|
|
16715
16869
|
/**
|
|
16716
|
-
*
|
|
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))
|
|
16717
16873
|
*/
|
|
16718
16874
|
var AnswerCountValidator = /** @class */ (function (_super) {
|
|
16719
16875
|
validator_extends(AnswerCountValidator, _super);
|
|
@@ -16750,7 +16906,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
|
|
|
16750
16906
|
};
|
|
16751
16907
|
Object.defineProperty(AnswerCountValidator.prototype, "minCount", {
|
|
16752
16908
|
/**
|
|
16753
|
-
*
|
|
16909
|
+
* A minimum number of selected answers.
|
|
16910
|
+
*
|
|
16911
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16754
16912
|
*/
|
|
16755
16913
|
get: function () {
|
|
16756
16914
|
return this.getPropertyValue("minCount");
|
|
@@ -16763,7 +16921,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
|
|
|
16763
16921
|
});
|
|
16764
16922
|
Object.defineProperty(AnswerCountValidator.prototype, "maxCount", {
|
|
16765
16923
|
/**
|
|
16766
|
-
*
|
|
16924
|
+
* A maximum number of selected answers.
|
|
16925
|
+
*
|
|
16926
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16767
16927
|
*/
|
|
16768
16928
|
get: function () {
|
|
16769
16929
|
return this.getPropertyValue("maxCount");
|
|
@@ -16778,7 +16938,7 @@ var AnswerCountValidator = /** @class */ (function (_super) {
|
|
|
16778
16938
|
}(validator_SurveyValidator));
|
|
16779
16939
|
|
|
16780
16940
|
/**
|
|
16781
|
-
*
|
|
16941
|
+
* A class that implements validation using regular expressions.
|
|
16782
16942
|
*
|
|
16783
16943
|
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16784
16944
|
*/
|
|
@@ -16816,7 +16976,9 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
16816
16976
|
};
|
|
16817
16977
|
Object.defineProperty(RegexValidator.prototype, "regex", {
|
|
16818
16978
|
/**
|
|
16819
|
-
*
|
|
16979
|
+
* A regular expression used to validate values.
|
|
16980
|
+
*
|
|
16981
|
+
* [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
|
|
16820
16982
|
*/
|
|
16821
16983
|
get: function () {
|
|
16822
16984
|
return this.getPropertyValue("regex");
|
|
@@ -16827,24 +16989,39 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
16827
16989
|
enumerable: false,
|
|
16828
16990
|
configurable: true
|
|
16829
16991
|
});
|
|
16830
|
-
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
|
+
*/
|
|
16831
16998
|
get: function () {
|
|
16832
|
-
return this.getPropertyValue("
|
|
16999
|
+
return this.getPropertyValue("caseInsensitive");
|
|
16833
17000
|
},
|
|
16834
17001
|
set: function (val) {
|
|
16835
|
-
this.setPropertyValue("
|
|
17002
|
+
this.setPropertyValue("caseInsensitive", val);
|
|
17003
|
+
},
|
|
17004
|
+
enumerable: false,
|
|
17005
|
+
configurable: true
|
|
17006
|
+
});
|
|
17007
|
+
Object.defineProperty(RegexValidator.prototype, "insensitive", {
|
|
17008
|
+
get: function () { return this.caseInsensitive; },
|
|
17009
|
+
set: function (val) {
|
|
17010
|
+
this.caseInsensitive = val;
|
|
16836
17011
|
},
|
|
16837
17012
|
enumerable: false,
|
|
16838
17013
|
configurable: true
|
|
16839
17014
|
});
|
|
16840
17015
|
RegexValidator.prototype.createRegExp = function () {
|
|
16841
|
-
return new RegExp(this.regex, this.
|
|
17016
|
+
return new RegExp(this.regex, this.caseInsensitive ? "i" : "");
|
|
16842
17017
|
};
|
|
16843
17018
|
return RegexValidator;
|
|
16844
17019
|
}(validator_SurveyValidator));
|
|
16845
17020
|
|
|
16846
17021
|
/**
|
|
16847
|
-
*
|
|
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))
|
|
16848
17025
|
*/
|
|
16849
17026
|
var EmailValidator = /** @class */ (function (_super) {
|
|
16850
17027
|
validator_extends(EmailValidator, _super);
|
|
@@ -16873,7 +17050,9 @@ var EmailValidator = /** @class */ (function (_super) {
|
|
|
16873
17050
|
}(validator_SurveyValidator));
|
|
16874
17051
|
|
|
16875
17052
|
/**
|
|
16876
|
-
*
|
|
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))
|
|
16877
17056
|
*/
|
|
16878
17057
|
var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
16879
17058
|
validator_extends(ExpressionValidator, _super);
|
|
@@ -16952,7 +17131,9 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
|
16952
17131
|
};
|
|
16953
17132
|
Object.defineProperty(ExpressionValidator.prototype, "expression", {
|
|
16954
17133
|
/**
|
|
16955
|
-
*
|
|
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))
|
|
16956
17137
|
*/
|
|
16957
17138
|
get: function () {
|
|
16958
17139
|
return this.getPropertyValue("expression");
|
|
@@ -16980,7 +17161,7 @@ Serializer.addClass("textvalidator", [{ name: "minLength:number", default: 0 },
|
|
|
16980
17161
|
Serializer.addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
|
|
16981
17162
|
return new AnswerCountValidator();
|
|
16982
17163
|
}, "surveyvalidator");
|
|
16983
|
-
Serializer.addClass("regexvalidator", ["regex", { name: "
|
|
17164
|
+
Serializer.addClass("regexvalidator", ["regex", { name: "caseInsensitive:boolean", alternativeName: "insensitive" }], function () {
|
|
16984
17165
|
return new RegexValidator();
|
|
16985
17166
|
}, "surveyvalidator");
|
|
16986
17167
|
Serializer.addClass("emailvalidator", [], function () {
|
|
@@ -17210,6 +17391,188 @@ var RendererFactory = /** @class */ (function () {
|
|
|
17210
17391
|
}());
|
|
17211
17392
|
|
|
17212
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
|
+
|
|
17213
17576
|
// CONCATENATED MODULE: ./packages/survey-core/src/question.ts
|
|
17214
17577
|
var question_extends = (undefined && undefined.__extends) || (function () {
|
|
17215
17578
|
var extendStatics = function (d, b) {
|
|
@@ -17247,6 +17610,7 @@ var question_decorate = (undefined && undefined.__decorate) || function (decorat
|
|
|
17247
17610
|
|
|
17248
17611
|
|
|
17249
17612
|
|
|
17613
|
+
|
|
17250
17614
|
var TriggerExpressionInfo = /** @class */ (function () {
|
|
17251
17615
|
function TriggerExpressionInfo(name, canRun, doComplete) {
|
|
17252
17616
|
this.name = name;
|
|
@@ -17289,6 +17653,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17289
17653
|
_this.createNewArray("validators", function (validator) {
|
|
17290
17654
|
validator.errorOwner = _this;
|
|
17291
17655
|
});
|
|
17656
|
+
_this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
|
|
17292
17657
|
_this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
|
|
17293
17658
|
_this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
|
|
17294
17659
|
_this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
|
|
@@ -17329,6 +17694,26 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17329
17694
|
Question.getQuestionId = function () {
|
|
17330
17695
|
return "sq_" + Question.questionCounter++;
|
|
17331
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
|
+
};
|
|
17332
17717
|
Question.prototype.isReadOnlyRenderDiv = function () {
|
|
17333
17718
|
return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
|
|
17334
17719
|
};
|
|
@@ -18251,13 +18636,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18251
18636
|
configurable: true
|
|
18252
18637
|
});
|
|
18253
18638
|
Question.prototype.updateCommentElements = function () {
|
|
18254
|
-
if (!this.autoGrowComment || !Array.isArray(this.commentElements))
|
|
18255
|
-
return;
|
|
18256
|
-
for (var i = 0; i < this.commentElements.length; i++) {
|
|
18257
|
-
var el = this.commentElements[i];
|
|
18258
|
-
if (el)
|
|
18259
|
-
increaseHeightByContent(el);
|
|
18260
|
-
}
|
|
18261
18639
|
};
|
|
18262
18640
|
Question.prototype.onCommentInput = function (event) {
|
|
18263
18641
|
if (this.isInputTextUpdate) {
|
|
@@ -19354,11 +19732,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19354
19732
|
});
|
|
19355
19733
|
Object.defineProperty(Question.prototype, "resetValueIf", {
|
|
19356
19734
|
/**
|
|
19357
|
-
* 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).
|
|
19358
19736
|
*
|
|
19359
19737
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
|
19360
19738
|
*
|
|
19361
|
-
* [
|
|
19739
|
+
* [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
|
|
19362
19740
|
* @see setValueIf
|
|
19363
19741
|
*/
|
|
19364
19742
|
get: function () {
|
|
@@ -19372,11 +19750,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19372
19750
|
});
|
|
19373
19751
|
Object.defineProperty(Question.prototype, "setValueIf", {
|
|
19374
19752
|
/**
|
|
19375
|
-
* 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).
|
|
19376
19754
|
*
|
|
19377
19755
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
|
19378
19756
|
*
|
|
19379
|
-
* [
|
|
19757
|
+
* [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
|
|
19380
19758
|
* @see resetValueIf
|
|
19381
19759
|
*/
|
|
19382
19760
|
get: function () {
|
|
@@ -19390,11 +19768,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19390
19768
|
});
|
|
19391
19769
|
Object.defineProperty(Question.prototype, "setValueExpression", {
|
|
19392
19770
|
/**
|
|
19393
|
-
* 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.
|
|
19394
19772
|
*
|
|
19395
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`.
|
|
19396
19774
|
*
|
|
19397
|
-
* [
|
|
19775
|
+
* [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
|
|
19398
19776
|
* @see defaultValueExpression
|
|
19399
19777
|
* @see resetValueIf
|
|
19400
19778
|
*/
|
|
@@ -22333,7 +22711,6 @@ var martixBase_decorate = (undefined && undefined.__decorate) || function (decor
|
|
|
22333
22711
|
|
|
22334
22712
|
|
|
22335
22713
|
|
|
22336
|
-
|
|
22337
22714
|
/**
|
|
22338
22715
|
* A base class for all matrix question types.
|
|
22339
22716
|
*/
|
|
@@ -22344,7 +22721,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22344
22721
|
_this.generatedVisibleRows = null;
|
|
22345
22722
|
_this.generatedTotalRow = null;
|
|
22346
22723
|
_this.filteredRows = null;
|
|
22347
|
-
_this.filteredColumns = null;
|
|
22348
22724
|
_this.columns = _this.createColumnValues();
|
|
22349
22725
|
_this.rows = _this.createItemValues("rows");
|
|
22350
22726
|
return _this;
|
|
@@ -22404,11 +22780,19 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22404
22780
|
});
|
|
22405
22781
|
Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleColumns", {
|
|
22406
22782
|
get: function () {
|
|
22407
|
-
|
|
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;
|
|
22408
22789
|
},
|
|
22409
22790
|
enumerable: false,
|
|
22410
22791
|
configurable: true
|
|
22411
22792
|
});
|
|
22793
|
+
QuestionMatrixBaseModel.prototype.isColumnVisible = function (column) {
|
|
22794
|
+
return column.isVisible;
|
|
22795
|
+
};
|
|
22412
22796
|
Object.defineProperty(QuestionMatrixBaseModel.prototype, "rows", {
|
|
22413
22797
|
/**
|
|
22414
22798
|
* An array of matrix rows.
|
|
@@ -22423,7 +22807,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22423
22807
|
set: function (newValue) {
|
|
22424
22808
|
var newRows = this.processRowsOnSet(newValue);
|
|
22425
22809
|
this.setPropertyValue("rows", newRows);
|
|
22426
|
-
this.filterItems();
|
|
22427
22810
|
},
|
|
22428
22811
|
enumerable: false,
|
|
22429
22812
|
configurable: true
|
|
@@ -22462,7 +22845,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22462
22845
|
},
|
|
22463
22846
|
set: function (val) {
|
|
22464
22847
|
this.setPropertyValue("rowsVisibleIf", val);
|
|
22465
|
-
this.
|
|
22848
|
+
if (!this.isLoadingFromJsonValue) {
|
|
22849
|
+
this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
22850
|
+
}
|
|
22466
22851
|
},
|
|
22467
22852
|
enumerable: false,
|
|
22468
22853
|
configurable: true
|
|
@@ -22483,7 +22868,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22483
22868
|
},
|
|
22484
22869
|
set: function (val) {
|
|
22485
22870
|
this.setPropertyValue("columnsVisibleIf", val);
|
|
22486
|
-
this.
|
|
22871
|
+
if (!this.isLoadingFromJson) {
|
|
22872
|
+
this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
22873
|
+
}
|
|
22487
22874
|
},
|
|
22488
22875
|
enumerable: false,
|
|
22489
22876
|
configurable: true
|
|
@@ -22492,15 +22879,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22492
22879
|
_super.prototype.runCondition.call(this, values, properties);
|
|
22493
22880
|
this.runItemsCondition(values, properties);
|
|
22494
22881
|
};
|
|
22495
|
-
QuestionMatrixBaseModel.prototype.filterItems = function () {
|
|
22496
|
-
if (this.areInvisibleElementsShowing) {
|
|
22497
|
-
this.onRowsChanged();
|
|
22498
|
-
return false;
|
|
22499
|
-
}
|
|
22500
|
-
if (this.isLoadingFromJson || !this.data)
|
|
22501
|
-
return false;
|
|
22502
|
-
return this.runItemsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
22503
|
-
};
|
|
22504
22882
|
QuestionMatrixBaseModel.prototype.onColumnsChanged = function () { };
|
|
22505
22883
|
QuestionMatrixBaseModel.prototype.onRowsChanged = function () {
|
|
22506
22884
|
this.updateVisibilityBasedOnRows();
|
|
@@ -22515,7 +22893,7 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22515
22893
|
var res = _super.prototype.isVisibleCore.call(this);
|
|
22516
22894
|
if (!res || !this.hideIfRowsEmpty)
|
|
22517
22895
|
return res;
|
|
22518
|
-
return this.
|
|
22896
|
+
return this.visibleRows.length > 0;
|
|
22519
22897
|
};
|
|
22520
22898
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
|
22521
22899
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
|
@@ -22524,22 +22902,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22524
22902
|
return true;
|
|
22525
22903
|
};
|
|
22526
22904
|
QuestionMatrixBaseModel.prototype.runItemsCondition = function (values, properties) {
|
|
22527
|
-
var oldVisibleRows = null;
|
|
22528
|
-
if (!!this.filteredRows && !helpers_Helpers.isValueEmpty(this.defaultValue)) {
|
|
22529
|
-
oldVisibleRows = [];
|
|
22530
|
-
for (var i = 0; i < this.filteredRows.length; i++) {
|
|
22531
|
-
oldVisibleRows.push(this.filteredRows[i]);
|
|
22532
|
-
}
|
|
22533
|
-
}
|
|
22534
22905
|
var hasChanges = this.hasRowsAsItems() && this.runConditionsForRows(values, properties);
|
|
22535
22906
|
var hasColumnsChanged = this.runConditionsForColumns(values, properties);
|
|
22536
22907
|
hasChanges = hasColumnsChanged || hasChanges;
|
|
22537
22908
|
if (hasChanges) {
|
|
22538
|
-
if (this.isClearValueOnHidden &&
|
|
22539
|
-
this.
|
|
22540
|
-
}
|
|
22541
|
-
if (!!oldVisibleRows) {
|
|
22542
|
-
this.restoreNewVisibleRowsValues(oldVisibleRows);
|
|
22909
|
+
if (this.isClearValueOnHidden && hasColumnsChanged) {
|
|
22910
|
+
this.clearInvisibleColumnValues();
|
|
22543
22911
|
}
|
|
22544
22912
|
this.clearGeneratedRows();
|
|
22545
22913
|
if (hasColumnsChanged) {
|
|
@@ -22547,16 +22915,15 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22547
22915
|
}
|
|
22548
22916
|
this.onRowsChanged();
|
|
22549
22917
|
}
|
|
22550
|
-
return hasChanges;
|
|
22551
22918
|
};
|
|
22919
|
+
QuestionMatrixBaseModel.prototype.isRowsFiltered = function () { return !!this.filteredRows; };
|
|
22552
22920
|
QuestionMatrixBaseModel.prototype.clearGeneratedRows = function () {
|
|
22553
22921
|
this.generatedVisibleRows = null;
|
|
22554
22922
|
};
|
|
22923
|
+
QuestionMatrixBaseModel.prototype.createRowsVisibleIfRunner = function () { return null; };
|
|
22555
22924
|
QuestionMatrixBaseModel.prototype.runConditionsForRows = function (values, properties) {
|
|
22556
22925
|
var showInvisibile = !!this.survey && this.survey.areInvisibleElementsShowing;
|
|
22557
|
-
var runner = !showInvisibile
|
|
22558
|
-
? new ConditionRunner(this.rowsVisibleIf)
|
|
22559
|
-
: null;
|
|
22926
|
+
var runner = !showInvisibile ? this.createRowsVisibleIfRunner() : null;
|
|
22560
22927
|
this.filteredRows = [];
|
|
22561
22928
|
var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
|
|
22562
22929
|
itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
|
@@ -22567,73 +22934,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
22567
22934
|
};
|
|
22568
22935
|
QuestionMatrixBaseModel.prototype.runConditionsForColumns = function (values, properties) {
|
|
22569
22936
|
var useColumnsExpression = !!this.survey && !this.survey.areInvisibleElementsShowing;
|
|
22570
|
-
var runner = useColumnsExpression && !!this.columnsVisibleIf
|
|
22571
|
-
|
|
22572
|
-
: null;
|
|
22573
|
-
this.filteredColumns = [];
|
|
22574
|
-
var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.columns, this.filteredColumns, runner, values, properties, this.shouldRunColumnExpression());
|
|
22575
|
-
if (this.filteredColumns.length === this.columns.length) {
|
|
22576
|
-
this.filteredColumns = null;
|
|
22577
|
-
}
|
|
22578
|
-
return hasChanged;
|
|
22579
|
-
};
|
|
22580
|
-
QuestionMatrixBaseModel.prototype.clearIncorrectValues = function () {
|
|
22581
|
-
var val = this.value;
|
|
22582
|
-
if (!val)
|
|
22583
|
-
return;
|
|
22584
|
-
var newVal = null;
|
|
22585
|
-
var isChanged = false;
|
|
22586
|
-
var rows = !!this.filteredRows ? this.filteredRows : this.rows;
|
|
22587
|
-
var columns = !!this.filteredColumns ? this.filteredColumns : this.columns;
|
|
22588
|
-
for (var key in val) {
|
|
22589
|
-
if (itemvalue_ItemValue.getItemByValue(rows, key) &&
|
|
22590
|
-
itemvalue_ItemValue.getItemByValue(columns, val[key])) {
|
|
22591
|
-
if (newVal == null)
|
|
22592
|
-
newVal = {};
|
|
22593
|
-
newVal[key] = val[key];
|
|
22594
|
-
}
|
|
22595
|
-
else {
|
|
22596
|
-
isChanged = true;
|
|
22597
|
-
}
|
|
22598
|
-
}
|
|
22599
|
-
if (isChanged) {
|
|
22600
|
-
this.value = newVal;
|
|
22601
|
-
}
|
|
22602
|
-
_super.prototype.clearIncorrectValues.call(this);
|
|
22603
|
-
};
|
|
22604
|
-
QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () {
|
|
22605
|
-
if (this.isEmpty())
|
|
22606
|
-
return;
|
|
22607
|
-
var newData = this.getUnbindValue(this.value);
|
|
22608
|
-
var rows = this.rows;
|
|
22609
|
-
for (var i = 0; i < rows.length; i++) {
|
|
22610
|
-
var key = rows[i].value;
|
|
22611
|
-
if (!!newData[key] && !rows[i].isVisible) {
|
|
22612
|
-
delete newData[key];
|
|
22613
|
-
}
|
|
22614
|
-
}
|
|
22615
|
-
if (this.isTwoValueEquals(newData, this.value))
|
|
22616
|
-
return;
|
|
22617
|
-
this.value = newData;
|
|
22618
|
-
};
|
|
22619
|
-
QuestionMatrixBaseModel.prototype.restoreNewVisibleRowsValues = function (oldVisibleRows) {
|
|
22620
|
-
var rows = !!this.filteredRows ? this.filteredRows : this.rows;
|
|
22621
|
-
var val = this.defaultValue;
|
|
22622
|
-
var newValue = this.getUnbindValue(this.value);
|
|
22623
|
-
var isChanged = false;
|
|
22624
|
-
for (var key in val) {
|
|
22625
|
-
if (itemvalue_ItemValue.getItemByValue(rows, key) &&
|
|
22626
|
-
!itemvalue_ItemValue.getItemByValue(oldVisibleRows, key)) {
|
|
22627
|
-
if (newValue == null)
|
|
22628
|
-
newValue = {};
|
|
22629
|
-
newValue[key] = val[key];
|
|
22630
|
-
isChanged = true;
|
|
22631
|
-
}
|
|
22632
|
-
}
|
|
22633
|
-
if (isChanged) {
|
|
22634
|
-
this.value = newValue;
|
|
22635
|
-
}
|
|
22937
|
+
var runner = useColumnsExpression && !!this.columnsVisibleIf ? new ConditionRunner(this.columnsVisibleIf) : null;
|
|
22938
|
+
return itemvalue_ItemValue.runConditionsForItems(this.columns, undefined, runner, values, properties, this.shouldRunColumnExpression());
|
|
22636
22939
|
};
|
|
22940
|
+
QuestionMatrixBaseModel.prototype.clearInvisibleColumnValues = function () { };
|
|
22941
|
+
QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () { };
|
|
22637
22942
|
QuestionMatrixBaseModel.prototype.needResponsiveWidth = function () {
|
|
22638
22943
|
//TODO: make it mor intelligent
|
|
22639
22944
|
return true;
|
|
@@ -24842,6 +25147,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
24842
25147
|
_this.colOwnerValue = null;
|
|
24843
25148
|
_this.indexValue = -1;
|
|
24844
25149
|
_this._hasVisibleCell = true;
|
|
25150
|
+
_this.isColumnsVisibleIf = true;
|
|
24845
25151
|
_this.previousChoicesId = undefined;
|
|
24846
25152
|
_this.createLocalizableString("totalFormat", _this);
|
|
24847
25153
|
_this.createLocalizableString("cellHint", _this);
|
|
@@ -26541,8 +26847,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26541
26847
|
this.headerRow.cells.push(this.createHeaderCell(null));
|
|
26542
26848
|
}
|
|
26543
26849
|
if (this.matrix.isColumnLayoutHorizontal) {
|
|
26544
|
-
for (var i = 0; i < this.matrix.
|
|
26545
|
-
var column = this.matrix.
|
|
26850
|
+
for (var i = 0; i < this.matrix.columns.length; i++) {
|
|
26851
|
+
var column = this.matrix.columns[i];
|
|
26546
26852
|
if (!column.isColumnVisible)
|
|
26547
26853
|
continue;
|
|
26548
26854
|
if (this.matrix.IsMultiplyColumn(column)) {
|
|
@@ -27174,6 +27480,7 @@ var question_matrixdropdownbase_extends = (undefined && undefined.__extends) ||
|
|
|
27174
27480
|
|
|
27175
27481
|
|
|
27176
27482
|
|
|
27483
|
+
|
|
27177
27484
|
var question_matrixdropdownbase_MatrixDropdownCell = /** @class */ (function () {
|
|
27178
27485
|
function MatrixDropdownCell(column, row, data) {
|
|
27179
27486
|
this.column = column;
|
|
@@ -27343,6 +27650,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27343
27650
|
var _this = this;
|
|
27344
27651
|
this.isSettingValue = false;
|
|
27345
27652
|
this.detailPanelValue = null;
|
|
27653
|
+
this.visibleValue = true;
|
|
27346
27654
|
this.cells = [];
|
|
27347
27655
|
this.isCreatingDetailPanel = false;
|
|
27348
27656
|
this.data = data;
|
|
@@ -27388,6 +27696,24 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27388
27696
|
});
|
|
27389
27697
|
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
|
27390
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; };
|
|
27391
27717
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
|
27392
27718
|
get: function () {
|
|
27393
27719
|
var result = {};
|
|
@@ -27545,15 +27871,23 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27545
27871
|
res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
|
27546
27872
|
res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
|
27547
27873
|
};
|
|
27548
|
-
MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
|
|
27874
|
+
MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties, rowsVisibleIf) {
|
|
27549
27875
|
if (!!this.data) {
|
|
27550
|
-
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.
|
|
27876
|
+
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.getFilteredData();
|
|
27551
27877
|
}
|
|
27552
27878
|
var rowIndex = this.rowIndex;
|
|
27553
27879
|
this.applyRowVariablesToValues(values, rowIndex);
|
|
27554
27880
|
var newProps = helpers_Helpers.createCopy(properties);
|
|
27555
27881
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
|
27556
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
|
+
}
|
|
27557
27891
|
for (var i = 0; i < this.cells.length; i++) {
|
|
27558
27892
|
if (i > 0) {
|
|
27559
27893
|
mergeValues(this.value, rowValues);
|
|
@@ -27568,6 +27902,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
|
|
|
27568
27902
|
this.onQuestionReadOnlyChanged();
|
|
27569
27903
|
}
|
|
27570
27904
|
};
|
|
27905
|
+
MatrixDropdownRowModelBase.prototype.setRowsVisibleIfValues = function (values) { };
|
|
27571
27906
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
|
27572
27907
|
var res = [];
|
|
27573
27908
|
this.questions.forEach(function (q) {
|
|
@@ -28011,12 +28346,12 @@ var question_matrixdropdownbase_MatrixDropdownTotalRowModel = /** @class */ (fun
|
|
|
28011
28346
|
this.data.onTotalValueChanged();
|
|
28012
28347
|
}
|
|
28013
28348
|
};
|
|
28014
|
-
MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties) {
|
|
28349
|
+
MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties, rowsVisibleIf) {
|
|
28015
28350
|
var counter = 0;
|
|
28016
28351
|
var prevValue;
|
|
28017
28352
|
do {
|
|
28018
28353
|
prevValue = helpers_Helpers.getUnbindValue(this.value);
|
|
28019
|
-
_super.prototype.runCondition.call(this, values, properties);
|
|
28354
|
+
_super.prototype.runCondition.call(this, values, properties, "");
|
|
28020
28355
|
counter++;
|
|
28021
28356
|
} while (!helpers_Helpers.isTwoValueEquals(prevValue, this.value) && counter < 3);
|
|
28022
28357
|
};
|
|
@@ -28347,6 +28682,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28347
28682
|
};
|
|
28348
28683
|
QuestionMatrixDropdownModelBase.prototype.onPointerDown = function (pointerDownEvent, row) { };
|
|
28349
28684
|
QuestionMatrixDropdownModelBase.prototype.onRowsChanged = function () {
|
|
28685
|
+
this.clearVisibleRows();
|
|
28350
28686
|
this.resetRenderedTable();
|
|
28351
28687
|
_super.prototype.onRowsChanged.call(this);
|
|
28352
28688
|
};
|
|
@@ -28400,6 +28736,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28400
28736
|
this.fireCallback(this.onRenderedTableResetCallback);
|
|
28401
28737
|
};
|
|
28402
28738
|
QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
|
|
28739
|
+
this.clearVisibleRows();
|
|
28403
28740
|
if (!this.generatedVisibleRows)
|
|
28404
28741
|
return;
|
|
28405
28742
|
for (var i = 0; i < this.generatedVisibleRows.length; i++) {
|
|
@@ -28442,8 +28779,8 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28442
28779
|
cellQuestion: null,
|
|
28443
28780
|
value: null,
|
|
28444
28781
|
};
|
|
28445
|
-
for (var i = 0; i < this.
|
|
28446
|
-
options.column = this.
|
|
28782
|
+
for (var i = 0; i < this.columns.length; i++) {
|
|
28783
|
+
options.column = this.columns[i];
|
|
28447
28784
|
options.columnName = options.column.name;
|
|
28448
28785
|
var cell = row.cells[i];
|
|
28449
28786
|
options.cell = cell;
|
|
@@ -28698,25 +29035,40 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28698
29035
|
return false;
|
|
28699
29036
|
};
|
|
28700
29037
|
QuestionMatrixDropdownModelBase.prototype.runCellsCondition = function (values, properties) {
|
|
28701
|
-
if (!this.generatedVisibleRows)
|
|
28702
|
-
return;
|
|
28703
|
-
var newValues = this.getRowConditionValues(values);
|
|
28704
29038
|
var rows = this.generatedVisibleRows;
|
|
28705
|
-
|
|
28706
|
-
|
|
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
|
+
}
|
|
28707
29044
|
}
|
|
28708
29045
|
this.checkColumnsVisibility();
|
|
28709
29046
|
this.checkColumnsRenderedRequired();
|
|
28710
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
|
+
};
|
|
28711
29062
|
QuestionMatrixDropdownModelBase.prototype.checkColumnsVisibility = function () {
|
|
28712
29063
|
if (this.isDesignMode)
|
|
28713
29064
|
return;
|
|
28714
29065
|
var hasChanged = false;
|
|
28715
|
-
for (var i = 0; i < this.
|
|
28716
|
-
var column = this.
|
|
28717
|
-
|
|
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)
|
|
28718
29070
|
continue;
|
|
28719
|
-
hasChanged = this.isColumnVisibilityChanged(column) || hasChanged;
|
|
29071
|
+
hasChanged = this.isColumnVisibilityChanged(column, isCellsVisibilty) || hasChanged;
|
|
28720
29072
|
}
|
|
28721
29073
|
if (hasChanged) {
|
|
28722
29074
|
this.resetRenderedTable();
|
|
@@ -28724,9 +29076,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28724
29076
|
};
|
|
28725
29077
|
QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
|
|
28726
29078
|
var rows = this.generatedVisibleRows;
|
|
28727
|
-
|
|
28728
|
-
|
|
28729
|
-
|
|
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)
|
|
28730
29084
|
continue;
|
|
28731
29085
|
var required = rows.length > 0;
|
|
28732
29086
|
for (var j = 0; j < rows.length; j++) {
|
|
@@ -28738,26 +29092,29 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28738
29092
|
column.updateIsRenderedRequired(required);
|
|
28739
29093
|
}
|
|
28740
29094
|
};
|
|
28741
|
-
QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column) {
|
|
29095
|
+
QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column, checkCellsVisiblity) {
|
|
28742
29096
|
var curVis = column.isColumnVisible;
|
|
28743
|
-
var
|
|
29097
|
+
var hasVisCell = !checkCellsVisiblity;
|
|
29098
|
+
var rows = this.generatedVisibleRows;
|
|
29099
|
+
var checkRows = checkCellsVisiblity && rows;
|
|
29100
|
+
var isMultipleColumnsVisibility = checkRows && column.isFilteredMultipleColumns;
|
|
28744
29101
|
var curVisibleChoices = isMultipleColumnsVisibility ? column.getVisibleChoicesInCell : [];
|
|
28745
29102
|
var newVisibleChoices = new Array();
|
|
28746
|
-
|
|
28747
|
-
|
|
28748
|
-
|
|
28749
|
-
|
|
28750
|
-
|
|
28751
|
-
|
|
28752
|
-
|
|
28753
|
-
|
|
28754
|
-
|
|
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;
|
|
28755
29114
|
}
|
|
28756
|
-
else
|
|
28757
|
-
break;
|
|
28758
29115
|
}
|
|
28759
29116
|
}
|
|
28760
|
-
column.hasVisibleCell = hasVisCell;
|
|
29117
|
+
column.hasVisibleCell = hasVisCell && column.isColumnsVisibleIf;
|
|
28761
29118
|
if (isMultipleColumnsVisibility) {
|
|
28762
29119
|
column.setVisibleChoicesInCell(newVisibleChoices);
|
|
28763
29120
|
if (!helpers_Helpers.isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
|
|
@@ -28932,20 +29289,46 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
28932
29289
|
this.columns.push(column);
|
|
28933
29290
|
return column;
|
|
28934
29291
|
};
|
|
29292
|
+
QuestionMatrixDropdownModelBase.prototype.clearVisibleRows = function () {
|
|
29293
|
+
this.visibleRowsArray = null;
|
|
29294
|
+
};
|
|
29295
|
+
QuestionMatrixDropdownModelBase.prototype.isColumnVisible = function (column) {
|
|
29296
|
+
return column.isColumnVisible;
|
|
29297
|
+
};
|
|
28935
29298
|
QuestionMatrixDropdownModelBase.prototype.getVisibleRows = function () {
|
|
28936
|
-
var _this = this;
|
|
28937
29299
|
if (this.isUpdateLocked)
|
|
28938
29300
|
return null;
|
|
28939
|
-
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;
|
|
28940
29313
|
this.generatedVisibleRows = this.generateRows();
|
|
29314
|
+
this.isGenereatingRows = false;
|
|
28941
29315
|
this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
|
|
28942
29316
|
if (this.data) {
|
|
28943
29317
|
this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
|
|
28944
29318
|
}
|
|
28945
|
-
|
|
28946
|
-
|
|
29319
|
+
if (!!this.generatedVisibleRows) {
|
|
29320
|
+
this.updateValueOnRowsGeneration(this.generatedVisibleRows);
|
|
29321
|
+
this.updateIsAnswered();
|
|
29322
|
+
}
|
|
28947
29323
|
}
|
|
28948
|
-
|
|
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;
|
|
28949
29332
|
};
|
|
28950
29333
|
QuestionMatrixDropdownModelBase.prototype.updateValueOnRowsGeneration = function (rows) {
|
|
28951
29334
|
var oldValue = this.createNewValue(true);
|
|
@@ -29533,7 +29916,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29533
29916
|
!this.generatedVisibleRows)
|
|
29534
29917
|
return;
|
|
29535
29918
|
this.isDoingonAnyValueChanged = true;
|
|
29536
|
-
var rows = this.
|
|
29919
|
+
var rows = this.generatedVisibleRows;
|
|
29537
29920
|
for (var i = 0; i < rows.length; i++) {
|
|
29538
29921
|
rows[i].onAnyValueChanged(name, questionName);
|
|
29539
29922
|
}
|
|
@@ -29582,6 +29965,19 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29582
29965
|
enumerable: false,
|
|
29583
29966
|
configurable: true
|
|
29584
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; };
|
|
29585
29981
|
QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
|
|
29586
29982
|
if (!this.survey && !this.cellValueChangingCallback)
|
|
29587
29983
|
return !!rowValue ? rowValue[columnName] : null;
|
|
@@ -29772,6 +30168,26 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
29772
30168
|
return null;
|
|
29773
30169
|
};
|
|
29774
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
|
+
};
|
|
29775
30191
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
|
29776
30192
|
if (index >= this.visibleRows.length)
|
|
29777
30193
|
return null;
|
|
@@ -29855,7 +30271,6 @@ Serializer.addClass("matrixdropdownbase", [
|
|
|
29855
30271
|
visible: false,
|
|
29856
30272
|
isLightSerializable: false,
|
|
29857
30273
|
},
|
|
29858
|
-
{ name: "columnsVisibleIf", visible: false },
|
|
29859
30274
|
{
|
|
29860
30275
|
name: "detailPanelMode",
|
|
29861
30276
|
choices: ["none", "underRow", "underRowSingle"],
|
|
@@ -29941,8 +30356,13 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
|
29941
30356
|
enumerable: false,
|
|
29942
30357
|
configurable: true
|
|
29943
30358
|
});
|
|
30359
|
+
MatrixDropdownRowModel.prototype.isItemVisible = function () { return this.item.isVisible; };
|
|
29944
30360
|
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
|
29945
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
|
+
};
|
|
29946
30366
|
return MatrixDropdownRowModel;
|
|
29947
30367
|
}(question_matrixdropdownbase_MatrixDropdownRowModelBase));
|
|
29948
30368
|
|
|
@@ -29958,11 +30378,11 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
29958
30378
|
_this.defaultValuesInRows = {};
|
|
29959
30379
|
_this.createLocalizableString("totalText", _this, true);
|
|
29960
30380
|
_this.registerPropertyChangedHandlers(["rows"], function () {
|
|
30381
|
+
if (!_this.generatedVisibleRows)
|
|
30382
|
+
return;
|
|
29961
30383
|
_this.clearGeneratedRows();
|
|
29962
30384
|
_this.resetRenderedTable();
|
|
29963
|
-
|
|
29964
|
-
_this.onRowsChanged();
|
|
29965
|
-
}
|
|
30385
|
+
_this.getVisibleRows();
|
|
29966
30386
|
_this.clearIncorrectValues();
|
|
29967
30387
|
});
|
|
29968
30388
|
_this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
|
|
@@ -30053,30 +30473,29 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
30053
30473
|
return helpers_Helpers.isValueObject(val, true);
|
|
30054
30474
|
};
|
|
30055
30475
|
QuestionMatrixDropdownModel.prototype.clearIncorrectValues = function () {
|
|
30056
|
-
|
|
30057
|
-
|
|
30058
|
-
|
|
30059
|
-
|
|
30060
|
-
|
|
30061
|
-
|
|
30062
|
-
|
|
30063
|
-
|
|
30064
|
-
|
|
30065
|
-
newVal = {};
|
|
30066
|
-
newVal[key] = val[key];
|
|
30067
|
-
}
|
|
30068
|
-
else {
|
|
30069
|
-
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
|
+
}
|
|
30070
30485
|
}
|
|
30071
|
-
}
|
|
30072
|
-
if (isChanged) {
|
|
30073
30486
|
this.value = newVal;
|
|
30074
30487
|
}
|
|
30075
30488
|
_super.prototype.clearIncorrectValues.call(this);
|
|
30076
30489
|
};
|
|
30077
|
-
QuestionMatrixDropdownModel.prototype.
|
|
30078
|
-
|
|
30079
|
-
|
|
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;
|
|
30080
30499
|
};
|
|
30081
30500
|
QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
|
|
30082
30501
|
var _this = this;
|
|
@@ -30103,7 +30522,7 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
30103
30522
|
};
|
|
30104
30523
|
QuestionMatrixDropdownModel.prototype.generateRows = function () {
|
|
30105
30524
|
var result = new Array();
|
|
30106
|
-
var rows =
|
|
30525
|
+
var rows = this.rows;
|
|
30107
30526
|
if (!rows || rows.length === 0)
|
|
30108
30527
|
return result;
|
|
30109
30528
|
var val = this.value;
|
|
@@ -30120,6 +30539,17 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
|
|
|
30120
30539
|
QuestionMatrixDropdownModel.prototype.createMatrixRow = function (item, value) {
|
|
30121
30540
|
return new MatrixDropdownRowModel(item.value, item, this, value);
|
|
30122
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
|
+
};
|
|
30123
30553
|
QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
|
|
30124
30554
|
keys.push("rows");
|
|
30125
30555
|
};
|
|
@@ -30955,6 +31385,7 @@ var question_matrixdynamic_extends = (undefined && undefined.__extends) || (func
|
|
|
30955
31385
|
|
|
30956
31386
|
|
|
30957
31387
|
|
|
31388
|
+
|
|
30958
31389
|
var MatrixDynamicRowModel = /** @class */ (function (_super) {
|
|
30959
31390
|
question_matrixdynamic_extends(MatrixDynamicRowModel, _super);
|
|
30960
31391
|
function MatrixDynamicRowModel(index, data, value) {
|
|
@@ -31030,7 +31461,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31030
31461
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
|
31031
31462
|
_this.updateShowTableAndAddRow();
|
|
31032
31463
|
});
|
|
31033
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.
|
|
31464
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
|
|
31034
31465
|
_this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
|
|
31035
31466
|
return _this;
|
|
31036
31467
|
}
|
|
@@ -31179,7 +31610,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31179
31610
|
};
|
|
31180
31611
|
QuestionMatrixDynamicModel.prototype.initDataUI = function () {
|
|
31181
31612
|
if (!this.generatedVisibleRows) {
|
|
31182
|
-
this.
|
|
31613
|
+
this.getVisibleRows();
|
|
31183
31614
|
}
|
|
31184
31615
|
};
|
|
31185
31616
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
|
|
@@ -31208,6 +31639,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31208
31639
|
}
|
|
31209
31640
|
if (this.generatedVisibleRows || prevValue == 0) {
|
|
31210
31641
|
if (!this.generatedVisibleRows) {
|
|
31642
|
+
this.clearGeneratedRows();
|
|
31211
31643
|
this.generatedVisibleRows = [];
|
|
31212
31644
|
}
|
|
31213
31645
|
this.generatedVisibleRows.splice(val);
|
|
@@ -31900,6 +32332,20 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31900
32332
|
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
|
31901
32333
|
this.setRowCountValueFromData = false;
|
|
31902
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
|
+
};
|
|
31903
32349
|
QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
|
|
31904
32350
|
if (!val || !Array.isArray(val))
|
|
31905
32351
|
return;
|
|
@@ -31924,7 +32370,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
31924
32370
|
}
|
|
31925
32371
|
else {
|
|
31926
32372
|
this.clearGeneratedRows();
|
|
31927
|
-
this.
|
|
32373
|
+
this.getVisibleRows();
|
|
31928
32374
|
this.onRowsChanged();
|
|
31929
32375
|
}
|
|
31930
32376
|
this.setRowCountValueFromData = false;
|
|
@@ -32000,7 +32446,6 @@ var QuestionMatrixDynamicRenderedTable = /** @class */ (function (_super) {
|
|
|
32000
32446
|
return QuestionMatrixDynamicRenderedTable;
|
|
32001
32447
|
}(question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable));
|
|
32002
32448
|
Serializer.addClass("matrixdynamic", [
|
|
32003
|
-
{ name: "rowsVisibleIf:condition", visible: false },
|
|
32004
32449
|
{ name: "allowAddRows:boolean", default: true },
|
|
32005
32450
|
{ name: "allowRemoveRows:boolean", default: true },
|
|
32006
32451
|
{ name: "rowCount:number", default: 2, minValue: 0, isBindable: true },
|
|
@@ -32230,6 +32675,7 @@ var defaultV2Css = {
|
|
|
32230
32675
|
emptyHeaderRoot: "sd-page__empty-header",
|
|
32231
32676
|
title: "sd-title sd-page__title",
|
|
32232
32677
|
description: "sd-description sd-page__description",
|
|
32678
|
+
number: "sd-page__num",
|
|
32233
32679
|
errorsContainer: "sd-page__errbox"
|
|
32234
32680
|
},
|
|
32235
32681
|
pageTitle: "sd-title sd-page__title",
|
|
@@ -36294,12 +36740,27 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36294
36740
|
return this.parent.getQuestionErrorLocation();
|
|
36295
36741
|
return this.survey ? this.survey.questionErrorLocation : "top";
|
|
36296
36742
|
};
|
|
36743
|
+
//ITitleOwner
|
|
36744
|
+
PanelModelBase.prototype.getTitleOwner = function () { return this; };
|
|
36297
36745
|
Object.defineProperty(PanelModelBase.prototype, "no", {
|
|
36298
|
-
//ITitleOwner
|
|
36299
36746
|
get: function () { return ""; },
|
|
36300
36747
|
enumerable: false,
|
|
36301
36748
|
configurable: true
|
|
36302
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
|
+
});
|
|
36303
36764
|
Object.defineProperty(PanelModelBase.prototype, "cssError", {
|
|
36304
36765
|
get: function () {
|
|
36305
36766
|
return this.getCssError(this.cssClasses);
|
|
@@ -36465,7 +36926,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36465
36926
|
enumerable: false,
|
|
36466
36927
|
configurable: true
|
|
36467
36928
|
});
|
|
36468
|
-
PanelModel.prototype.getTitleOwner = function () { return this; };
|
|
36469
36929
|
Object.defineProperty(PanelModel.prototype, "showNumber", {
|
|
36470
36930
|
/**
|
|
36471
36931
|
* Specifies whether to show the panel number in the title.
|
|
@@ -37167,11 +37627,6 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37167
37627
|
* @see maxTimeToFinish
|
|
37168
37628
|
*/
|
|
37169
37629
|
_this.timeSpent = 0;
|
|
37170
|
-
_this.locTitle.onGetTextCallback = function (text) {
|
|
37171
|
-
if (_this.canShowPageNumber() && text)
|
|
37172
|
-
return _this.num + ". " + text;
|
|
37173
|
-
return text;
|
|
37174
|
-
};
|
|
37175
37630
|
_this.createLocalizableString("navigationDescription", _this, true);
|
|
37176
37631
|
_this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
|
|
37177
37632
|
return _this;
|
|
@@ -37189,6 +37644,27 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
37189
37644
|
enumerable: false,
|
|
37190
37645
|
configurable: true
|
|
37191
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
|
+
});
|
|
37192
37668
|
PageModel.prototype.canShowPageNumber = function () {
|
|
37193
37669
|
return this.survey && this.survey.showPageNumbers;
|
|
37194
37670
|
};
|
|
@@ -37963,7 +38439,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
37963
38439
|
*
|
|
37964
38440
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
37965
38441
|
*
|
|
37966
|
-
* [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))
|
|
37967
38443
|
* @see triggers
|
|
37968
38444
|
* @see runTriggers
|
|
37969
38445
|
*/
|
|
@@ -46701,6 +47177,7 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
|
|
|
46701
47177
|
|
|
46702
47178
|
|
|
46703
47179
|
|
|
47180
|
+
|
|
46704
47181
|
/**
|
|
46705
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.).
|
|
46706
47183
|
*/
|
|
@@ -46738,6 +47215,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
46738
47215
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
|
46739
47216
|
_this.onVisibleChanged();
|
|
46740
47217
|
});
|
|
47218
|
+
_this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
|
|
46741
47219
|
_this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
|
|
46742
47220
|
_this.setNewRestfulProperty();
|
|
46743
47221
|
var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
|
|
@@ -46768,6 +47246,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
46768
47246
|
enumerable: false,
|
|
46769
47247
|
configurable: true
|
|
46770
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
|
+
};
|
|
46771
47269
|
QuestionSelectBase.prototype.getType = function () {
|
|
46772
47270
|
return "selectbase";
|
|
46773
47271
|
};
|
|
@@ -48727,8 +49225,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48727
49225
|
get: function () {
|
|
48728
49226
|
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
|
|
48729
49227
|
var res = [];
|
|
48730
|
-
for (var i = 0; i < count; i++)
|
|
48731
|
-
|
|
49228
|
+
for (var i = 0; i < count; i++) {
|
|
49229
|
+
if (this.renderedChoices[i]) {
|
|
49230
|
+
res.push(this.renderedChoices[i]);
|
|
49231
|
+
}
|
|
49232
|
+
}
|
|
48732
49233
|
return res;
|
|
48733
49234
|
},
|
|
48734
49235
|
enumerable: false,
|
|
@@ -48739,8 +49240,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48739
49240
|
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
|
|
48740
49241
|
var res = [];
|
|
48741
49242
|
var items = this.renderedChoices;
|
|
48742
|
-
for (var i = 0; i < count; i++)
|
|
48743
|
-
|
|
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
|
+
}
|
|
48744
49248
|
return res;
|
|
48745
49249
|
},
|
|
48746
49250
|
enumerable: false,
|
|
@@ -48967,9 +49471,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
48967
49471
|
return classes;
|
|
48968
49472
|
};
|
|
48969
49473
|
question_baseselect_decorate([
|
|
48970
|
-
jsonobject_property({
|
|
49474
|
+
jsonobject_property({
|
|
49475
|
+
onSet: function (newVal, target) {
|
|
48971
49476
|
target.onSelectedItemValuesChangedHandler(newVal);
|
|
48972
|
-
}
|
|
49477
|
+
}
|
|
49478
|
+
})
|
|
48973
49479
|
], QuestionSelectBase.prototype, "selectedItemValues", void 0);
|
|
48974
49480
|
question_baseselect_decorate([
|
|
48975
49481
|
jsonobject_property()
|
|
@@ -51310,6 +51816,7 @@ var question_matrix_extends = (undefined && undefined.__extends) || (function ()
|
|
|
51310
51816
|
|
|
51311
51817
|
|
|
51312
51818
|
|
|
51819
|
+
|
|
51313
51820
|
var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
|
|
51314
51821
|
question_matrix_extends(MatrixRowModel, _super);
|
|
51315
51822
|
function MatrixRowModel(item, fullName, data, value) {
|
|
@@ -51597,9 +52104,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51597
52104
|
_this.onColumnsChanged();
|
|
51598
52105
|
});
|
|
51599
52106
|
_this.registerPropertyChangedHandlers(["rows"], function () {
|
|
51600
|
-
|
|
51601
|
-
|
|
51602
|
-
}
|
|
52107
|
+
_this.runCondition(_this.getDataFilteredValues(), _this.getDataFilteredProperties());
|
|
52108
|
+
_this.onRowsChanged();
|
|
51603
52109
|
});
|
|
51604
52110
|
_this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
|
|
51605
52111
|
_this.updateVisibilityBasedOnRows();
|
|
@@ -51769,21 +52275,31 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51769
52275
|
}
|
|
51770
52276
|
return res;
|
|
51771
52277
|
};
|
|
51772
|
-
QuestionMatrixModel.prototype.
|
|
52278
|
+
QuestionMatrixModel.prototype.runCondition = function (values, properties) {
|
|
51773
52279
|
itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
|
51774
|
-
|
|
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);
|
|
51775
52288
|
};
|
|
51776
52289
|
QuestionMatrixModel.prototype.getVisibleRows = function () {
|
|
52290
|
+
if (!!this.generatedVisibleRows)
|
|
52291
|
+
return this.generatedVisibleRows;
|
|
51777
52292
|
var result = new Array();
|
|
51778
52293
|
var val = this.value;
|
|
51779
52294
|
if (!val)
|
|
51780
52295
|
val = {};
|
|
51781
|
-
var rows =
|
|
52296
|
+
var rows = this.filteredRows || this.rows;
|
|
51782
52297
|
for (var i = 0; i < rows.length; i++) {
|
|
51783
52298
|
var row = rows[i];
|
|
51784
52299
|
if (this.isValueEmpty(row.value))
|
|
51785
52300
|
continue;
|
|
51786
|
-
|
|
52301
|
+
var rowId = this.id + "_" + row.value.toString().replace(/\s/g, "_");
|
|
52302
|
+
result.push(this.createMatrixRow(row, rowId, val[row.value]));
|
|
51787
52303
|
}
|
|
51788
52304
|
this.generatedVisibleRows = result;
|
|
51789
52305
|
return result;
|
|
@@ -51799,6 +52315,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
51799
52315
|
QuestionMatrixModel.prototype.endLoadingFromJson = function () {
|
|
51800
52316
|
_super.prototype.endLoadingFromJson.call(this);
|
|
51801
52317
|
this.rows = this.sortVisibleRows(this.rows);
|
|
52318
|
+
this.onRowsChanged();
|
|
52319
|
+
this.onColumnsChanged();
|
|
51802
52320
|
};
|
|
51803
52321
|
QuestionMatrixModel.prototype.isNewValueCorrect = function (val) {
|
|
51804
52322
|
return helpers_Helpers.isValueObject(val, true);
|
|
@@ -52031,11 +52549,47 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
52031
52549
|
json["type"] = question.getType();
|
|
52032
52550
|
return json;
|
|
52033
52551
|
};
|
|
52552
|
+
QuestionMatrixModel.prototype.clearIncorrectValues = function () {
|
|
52553
|
+
this.clearInvisibleValuesInRowsAndColumns(true, true, true);
|
|
52554
|
+
_super.prototype.clearIncorrectValues.call(this);
|
|
52555
|
+
};
|
|
52034
52556
|
QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function (reason) {
|
|
52035
52557
|
_super.prototype.clearValueIfInvisibleCore.call(this, reason);
|
|
52036
|
-
|
|
52037
|
-
|
|
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
|
+
}
|
|
52038
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;
|
|
52039
52593
|
};
|
|
52040
52594
|
QuestionMatrixModel.prototype.getFirstInputElementId = function () {
|
|
52041
52595
|
var rows = this.generatedVisibleRows;
|
|
@@ -52941,6 +53495,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52941
53495
|
}
|
|
52942
53496
|
var valName = this.getValidatorTitle();
|
|
52943
53497
|
var emailValidator = new EmailValidator();
|
|
53498
|
+
emailValidator.errorOwner = this;
|
|
52944
53499
|
if (this.inputType === "email" &&
|
|
52945
53500
|
!this.validators.some(function (v) { return v.getType() === "emailvalidator"; })) {
|
|
52946
53501
|
var validateResult = emailValidator.validate(this.value, valName);
|
|
@@ -57730,6 +58285,8 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
|
57730
58285
|
|
|
57731
58286
|
|
|
57732
58287
|
|
|
58288
|
+
|
|
58289
|
+
|
|
57733
58290
|
/**
|
|
57734
58291
|
* A class that describes the Long Text question type.
|
|
57735
58292
|
*
|
|
@@ -57737,9 +58294,46 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
|
57737
58294
|
*/
|
|
57738
58295
|
var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
57739
58296
|
question_comment_extends(QuestionCommentModel, _super);
|
|
57740
|
-
function QuestionCommentModel() {
|
|
57741
|
-
|
|
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;
|
|
57742
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
|
+
};
|
|
57743
58337
|
Object.defineProperty(QuestionCommentModel.prototype, "rows", {
|
|
57744
58338
|
/**
|
|
57745
58339
|
* Specifies the visible height of the comment area, measured in lines.
|
|
@@ -57845,9 +58439,9 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
57845
58439
|
_super.prototype.afterRenderQuestionElement.call(this, el);
|
|
57846
58440
|
};
|
|
57847
58441
|
QuestionCommentModel.prototype.updateElement = function () {
|
|
57848
|
-
var
|
|
58442
|
+
var _this_1 = this;
|
|
57849
58443
|
if (this.element && this.renderedAutoGrow) {
|
|
57850
|
-
setTimeout(function () { return increaseHeightByContent(
|
|
58444
|
+
setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
|
|
57851
58445
|
}
|
|
57852
58446
|
};
|
|
57853
58447
|
QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
@@ -69334,8 +69928,8 @@ Serializer.addClass("currencymask", [
|
|
|
69334
69928
|
|
|
69335
69929
|
var Version;
|
|
69336
69930
|
var ReleaseDate;
|
|
69337
|
-
Version = "" + "1.12.
|
|
69338
|
-
ReleaseDate = "" + "2024-09-
|
|
69931
|
+
Version = "" + "1.12.2";
|
|
69932
|
+
ReleaseDate = "" + "2024-09-16";
|
|
69339
69933
|
function checkLibraryVersion(ver, libraryName) {
|
|
69340
69934
|
if (Version != ver) {
|
|
69341
69935
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -69500,6 +70094,7 @@ function checkPrefix(prefix) {
|
|
|
69500
70094
|
|
|
69501
70095
|
|
|
69502
70096
|
|
|
70097
|
+
|
|
69503
70098
|
|
|
69504
70099
|
|
|
69505
70100
|
//Uncomment to include the "date" question type.
|
|
@@ -70394,6 +70989,7 @@ var modernCss = {
|
|
|
70394
70989
|
page: {
|
|
70395
70990
|
root: "sv-page sv-body__page",
|
|
70396
70991
|
title: "sv-title sv-page__title",
|
|
70992
|
+
number: "sv-page__num",
|
|
70397
70993
|
description: "sv-description sv-page__description",
|
|
70398
70994
|
},
|
|
70399
70995
|
pageTitle: "sv-title sv-page__title",
|