survey-react 1.12.1 → 1.12.3

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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.3
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/react.ts":
964
964
  /*!********************************************!*\
965
- !*** ./src/entries/react.ts + 280 modules ***!
965
+ !*** ./src/entries/react.ts + 282 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, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
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, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, 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, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
968
968
  /*! ModuleConcatenation bailout: Cannot concat with external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} (<- Module is not an ECMAScript module) */
969
969
  /*! ModuleConcatenation bailout: Cannot concat with external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} (<- Module is not an ECMAScript module) */
970
970
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -1160,12 +1160,16 @@ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function()
1160
1160
  __webpack_require__.d(__webpack_exports__, "createSvg", function() { return /* reexport */ createSvg; });
1161
1161
  __webpack_require__.d(__webpack_exports__, "chooseFiles", function() { return /* reexport */ chooseFiles; });
1162
1162
  __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return /* reexport */ sanitizeEditableContent; });
1163
+ __webpack_require__.d(__webpack_exports__, "prepareElementForVerticalAnimation", function() { return /* reexport */ prepareElementForVerticalAnimation; });
1164
+ __webpack_require__.d(__webpack_exports__, "cleanHtmlElementAfterAnimation", function() { return /* reexport */ cleanHtmlElementAfterAnimation; });
1165
+ __webpack_require__.d(__webpack_exports__, "classesToSelector", function() { return /* reexport */ classesToSelector; });
1163
1166
  __webpack_require__.d(__webpack_exports__, "InputMaskBase", function() { return /* reexport */ mask_base_InputMaskBase; });
1164
1167
  __webpack_require__.d(__webpack_exports__, "InputMaskPattern", function() { return /* reexport */ mask_pattern_InputMaskPattern; });
1165
1168
  __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { return /* reexport */ mask_numeric_InputMaskNumeric; });
1166
1169
  __webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return /* reexport */ mask_datetime_InputMaskDateTime; });
1167
1170
  __webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return /* reexport */ mask_currency_InputMaskCurrency; });
1168
1171
  __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return /* reexport */ CssClassBuilder; });
1172
+ __webpack_require__.d(__webpack_exports__, "TextAreaModel", function() { return /* reexport */ text_area_TextAreaModel; });
1169
1173
  __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return /* reexport */ surveyCss; });
1170
1174
  __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return /* reexport */ defaultV2Css; });
1171
1175
  __webpack_require__.d(__webpack_exports__, "defaultV2ThemeName", function() { return /* reexport */ defaultV2ThemeName; });
@@ -1709,7 +1713,7 @@ var helpers_Helpers = /** @class */ (function () {
1709
1713
  var value = newValue ? newValue.length : "0";
1710
1714
  return [value, maxLength].join("/");
1711
1715
  };
1712
- Helpers.getNumberByIndex = function (index, startIndexStr) {
1716
+ Helpers.getNumberByIndex = function (index, startIndexStr, parentIndex) {
1713
1717
  if (index < 0)
1714
1718
  return "";
1715
1719
  var startIndex = 1;
@@ -1718,16 +1722,19 @@ var helpers_Helpers = /** @class */ (function () {
1718
1722
  var isNumeric = true;
1719
1723
  var strIndex = "A";
1720
1724
  var str = "";
1725
+ var hasDigitFunc = function (str) {
1726
+ if (!str)
1727
+ return false;
1728
+ for (var i = 0; i < str.length; i++) {
1729
+ if (Helpers.isCharDigit(str[i]))
1730
+ return true;
1731
+ }
1732
+ return false;
1733
+ };
1721
1734
  if (!!startIndexStr) {
1722
1735
  str = startIndexStr;
1723
1736
  var ind = str.length - 1;
1724
- var hasDigit = false;
1725
- for (var i = 0; i < str.length; i++) {
1726
- if (Helpers.isCharDigit(str[i])) {
1727
- hasDigit = true;
1728
- break;
1729
- }
1730
- }
1737
+ var hasDigit = hasDigitFunc(str);
1731
1738
  var checkLetter = function () {
1732
1739
  return ((hasDigit && !Helpers.isCharDigit(str[ind])) ||
1733
1740
  Helpers.isCharNotLetterAndDigit(str[ind]));
@@ -1757,6 +1764,9 @@ var helpers_Helpers = /** @class */ (function () {
1757
1764
  postfix = newPostfix;
1758
1765
  }
1759
1766
  }
1767
+ if (parentIndex > -1 && hasDigitFunc(prefix)) {
1768
+ prefix = this.getNumberByIndex(parentIndex, prefix);
1769
+ }
1760
1770
  if (isNumeric) {
1761
1771
  var val = (index + startIndex).toString();
1762
1772
  while (val.length < strIndex.length)
@@ -1891,7 +1901,7 @@ var helpers_Helpers = /** @class */ (function () {
1891
1901
  return Helpers.convertDateTimeToString(val);
1892
1902
  return Helpers.convertDateToString(val);
1893
1903
  }
1894
- return val;
1904
+ return this.getUnbindValue(val);
1895
1905
  };
1896
1906
  Helpers.compareVerions = function (ver1, ver2) {
1897
1907
  if (!ver1 && !ver2)
@@ -12777,7 +12787,7 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
12777
12787
  return this.getLocalizableStringText("title", this.getDefaultTitleValue());
12778
12788
  },
12779
12789
  set: function (val) {
12780
- this.setLocalizableStringText("title", val);
12790
+ this.setTitleValue(val);
12781
12791
  },
12782
12792
  enumerable: false,
12783
12793
  configurable: true
@@ -12790,6 +12800,9 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
12790
12800
  configurable: true
12791
12801
  });
12792
12802
  SurveyElementCore.prototype.getDefaultTitleValue = function () { return undefined; };
12803
+ SurveyElementCore.prototype.setTitleValue = function (val) {
12804
+ this.setLocalizableStringText("title", val);
12805
+ };
12793
12806
  SurveyElementCore.prototype.updateDescriptionVisibility = function (newDescription) {
12794
12807
  var showPlaceholder = false;
12795
12808
  if (this.isDesignMode) {
@@ -13488,6 +13501,14 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13488
13501
  enumerable: false,
13489
13502
  configurable: true
13490
13503
  });
13504
+ Object.defineProperty(SurveyElement.prototype, "cssRequiredText", {
13505
+ get: function () {
13506
+ var css = this.cssClasses;
13507
+ return css.requiredText || (css.panel && css.panel.requiredText);
13508
+ },
13509
+ enumerable: false,
13510
+ configurable: true
13511
+ });
13491
13512
  SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
13492
13513
  SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
13493
13514
  Object.defineProperty(SurveyElement.prototype, "cssError", {
@@ -14920,9 +14941,131 @@ function navigateToUrl(url) {
14920
14941
  function wrapUrlForBackgroundImage(url) {
14921
14942
  return !!url ? ["url(", url, ")"].join("") : "";
14922
14943
  }
14923
- //new-name: old-name
14944
+ // new-name: old-name
14924
14945
  var renamedIcons = {
14925
- "folder": "chooseFile"
14946
+ "flip-24x24": "changecamera",
14947
+ "toolbox-file-24x24": "choosefile",
14948
+ "clear-24x24": "clear",
14949
+ "close-24x24": "closecamera",
14950
+ "file-72x72": "defaultfile",
14951
+ "chevronleft-16x16": "left",
14952
+ "plus-32x32": "modernbooleancheckchecked",
14953
+ "minus-32x32": "modernbooleancheckunchecked",
14954
+ "more-24x24": "more",
14955
+ "navmenu-24x24": "navmenu_24x24",
14956
+ "error-24x24": "removefile",
14957
+ "camera-32x32": "takepicture",
14958
+ "camera-24x24": "takepicture_24x24",
14959
+ "pg-quiz-24x24": "timercircle",
14960
+ "check-16x16": "v2check",
14961
+ "check-24x24": "v2check_24x24",
14962
+ "restoredown-16x16": "back-to-panel_16x16",
14963
+ "clear-16x16": "clear_16x16",
14964
+ "close-16x16": "close_16x16",
14965
+ "collapsedetails-16x16": "collapsedetail",
14966
+ "expanddetails-16x16": "expanddetail",
14967
+ "maximize-16x16": "full-screen_16x16",
14968
+ "loading-48x48": "loading",
14969
+ "minimize-16x16": "minimize_16x16",
14970
+ "chevronright-16x16": "next_16x16",
14971
+ "noimage-48x48": "no-image",
14972
+ "reorder-24x24": "ranking-arrows",
14973
+ "fullsize-16x16": "restore_16x16",
14974
+ "search-24x24": "search",
14975
+ "smiley-rate5-24x24": "average",
14976
+ "smiley-rate9-24x24": "excellent",
14977
+ "smiley-rate7-24x24": "good",
14978
+ "smiley-rate6-24x24": "normal",
14979
+ "smiley-rate4-24x24": "not-good",
14980
+ "smiley-rate10-24x24": "perfect",
14981
+ "smiley-rate3-24x24": "poor",
14982
+ "smiley-rate1-24x24": "terrible",
14983
+ "smiley-rate8-24x24": "very-good",
14984
+ "smiley-rate2-24x24": "very-poor",
14985
+ "add-16x16": "add_16x16",
14986
+ "add-24x24": "add_24x24",
14987
+ "warning-24x24": "alert_24x24",
14988
+ "apply-24x24": "apply",
14989
+ "arrowdown-24x24": "arrow-down",
14990
+ "arrowleft-24x24": "arrow-left",
14991
+ "arrowleft-16x16": "arrow-left_16x16",
14992
+ "arrowright-24x24": "arrow-right",
14993
+ "arrowright-16x16": "arrow-right_16x16",
14994
+ "arrowup-24x24": "arrow-up",
14995
+ "toolbox-boolean-24x24": "boolean",
14996
+ "speechbubble-16x16": "change-question-type_16x16",
14997
+ "toolbox-checkbox-24x24": "checkbox",
14998
+ "minusbox-16x16": "collapse-detail_16x16",
14999
+ "collapse-pg-24x24": "collapse-panel",
15000
+ "collapse-16x16": "collapse_16x16",
15001
+ "dropper-16x16": "color-picker",
15002
+ "toolbox-longtext-24x24": "comment",
15003
+ "wrench-24x24": "config",
15004
+ "copy-24x24": "copy",
15005
+ "toolbox-customquestion-24x24": "default",
15006
+ "delete-16x16": "delete_16x16",
15007
+ "delete-24x24": "delete_24x24",
15008
+ "hidehint-24x24": "description-hide",
15009
+ "hint-24x24": "description",
15010
+ "desktop-24x24": "device-desktop",
15011
+ "phone-24x24": "device-phone",
15012
+ "rotate-24x24": "device-rotate",
15013
+ "tablet-24x24": "device-tablet",
15014
+ "download-24x24": "download",
15015
+ "drag-24x24": "drag-area-indicator",
15016
+ "draghorizontal-24x16": "drag-area-indicator_24x16",
15017
+ "chevrondown-24x24": "drop-down-arrow",
15018
+ "chevrondown-16x16": "drop-down-arrow_16x16",
15019
+ "toolbox-dropdown-24x24": "dropdown",
15020
+ "copy-16x16": "duplicate_16x16",
15021
+ "edit-24x24": "edit",
15022
+ "edit-16x16": "edit_16x16",
15023
+ "finishedit-24x24": "editing-finish",
15024
+ "error-16x16": "error",
15025
+ "plusbox-16x16": "expand-detail_16x16",
15026
+ "expand-pg-24x24": "expand-panel",
15027
+ "expand-16x16": "expand_16x16",
15028
+ "toolbox-expression-24x24": "expression",
15029
+ "textedit-24x24": "fast-entry",
15030
+ "fix-24x24": "fix",
15031
+ "toolbox-html-24x24": "html",
15032
+ "toolbox-image-24x24": "image",
15033
+ "toolbox-imagepicker-24x24": "imagepicker",
15034
+ "import-24x24": "import",
15035
+ "invisible-24x24": "invisible-items",
15036
+ "language-24x24": "language",
15037
+ "folder-24x24": "load",
15038
+ "collapsepage-16x16": "logic-collapse",
15039
+ "expandpage-16x16": "logic-expand",
15040
+ "image-48x48": "logo",
15041
+ "toolbox-matrix-24x24": "matrix",
15042
+ "toolbox-multimatrix-24x24": "matrixdropdown",
15043
+ "toolbox-dynamicmatrix-24x24": "matrixdynamic",
15044
+ "toolbox-multipletext-24x24": "multipletext",
15045
+ "toolbox-panel-24x24": "panel",
15046
+ "toolbox-dynamicpanel-24x24": "paneldynamic",
15047
+ "preview-24x24": "preview",
15048
+ "toolbox-radiogroup-24x24": "radiogroup",
15049
+ "toolbox-ranking-24x24": "ranking",
15050
+ "toolbox-rating-24x24": "rating",
15051
+ "redo-24x24": "redo",
15052
+ "remove-16x16": "remove_16x16",
15053
+ "required-16x16": "required",
15054
+ "restore-24x24": "reset",
15055
+ "save-24x24": "save",
15056
+ "selectpage-24x24": "select-page",
15057
+ "settings-24x24": "settings",
15058
+ "settings-16x16": "settings_16x16",
15059
+ "toolbox-signature-24x24": "signaturepad",
15060
+ "switchon-16x16": "switch-active_16x16",
15061
+ "switchoff-16x16": "switch-inactive_16x16",
15062
+ "toolbox-tagbox-24x24": "tagbox",
15063
+ "toolbox-singleline-24x24": "text",
15064
+ "theme-24x24": "theme",
15065
+ "toolbox-24x24": "toolbox",
15066
+ "undo-24x24": "undo",
15067
+ "visible-24x24": "visible",
15068
+ "wand-24x24": "wizard"
14926
15069
  };
14927
15070
  function getIconNameFromProxy(iconName) {
14928
15071
  if (!iconName)
@@ -16512,7 +16655,9 @@ var ValidatorResult = /** @class */ (function () {
16512
16655
  }());
16513
16656
 
16514
16657
  /**
16515
- * Base SurveyJS validator class.
16658
+ * A base class for all classes that implement validators.
16659
+ *
16660
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16516
16661
  */
16517
16662
  var validator_SurveyValidator = /** @class */ (function (_super) {
16518
16663
  validator_extends(SurveyValidator, _super);
@@ -16528,6 +16673,9 @@ var validator_SurveyValidator = /** @class */ (function (_super) {
16528
16673
  : null;
16529
16674
  };
16530
16675
  Object.defineProperty(SurveyValidator.prototype, "text", {
16676
+ /**
16677
+ * An error message to display when a value fails validation.
16678
+ */
16531
16679
  get: function () {
16532
16680
  return this.getLocalizableStringText("text");
16533
16681
  },
@@ -16668,7 +16816,9 @@ var ValidatorRunner = /** @class */ (function () {
16668
16816
  }());
16669
16817
 
16670
16818
  /**
16671
- * Validate numeric values.
16819
+ * A class that implements a validator for numeric values.
16820
+ *
16821
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16672
16822
  */
16673
16823
  var validator_NumericValidator = /** @class */ (function (_super) {
16674
16824
  validator_extends(NumericValidator, _super);
@@ -16717,7 +16867,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16717
16867
  };
16718
16868
  Object.defineProperty(NumericValidator.prototype, "minValue", {
16719
16869
  /**
16720
- * The minValue property.
16870
+ * A minimum allowed numeric value.
16871
+ *
16872
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16721
16873
  */
16722
16874
  get: function () {
16723
16875
  return this.getPropertyValue("minValue");
@@ -16730,7 +16882,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16730
16882
  });
16731
16883
  Object.defineProperty(NumericValidator.prototype, "maxValue", {
16732
16884
  /**
16733
- * The maxValue property.
16885
+ * A maximum allowed numeric value.
16886
+ *
16887
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16734
16888
  */
16735
16889
  get: function () {
16736
16890
  return this.getPropertyValue("maxValue");
@@ -16745,7 +16899,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16745
16899
  }(validator_SurveyValidator));
16746
16900
 
16747
16901
  /**
16748
- * Validate text values.
16902
+ * A class that implements a validator for text values.
16903
+ *
16904
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16749
16905
  */
16750
16906
  var TextValidator = /** @class */ (function (_super) {
16751
16907
  validator_extends(TextValidator, _super);
@@ -16784,7 +16940,11 @@ var TextValidator = /** @class */ (function (_super) {
16784
16940
  };
16785
16941
  Object.defineProperty(TextValidator.prototype, "minLength", {
16786
16942
  /**
16787
- * The minLength property.
16943
+ * The minimum length of a text value measured in characters.
16944
+ *
16945
+ * Default value: 0
16946
+ *
16947
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16788
16948
  */
16789
16949
  get: function () {
16790
16950
  return this.getPropertyValue("minLength");
@@ -16797,7 +16957,11 @@ var TextValidator = /** @class */ (function (_super) {
16797
16957
  });
16798
16958
  Object.defineProperty(TextValidator.prototype, "maxLength", {
16799
16959
  /**
16800
- * The maxLength property.
16960
+ * The maximum length of a text value measured in characters.
16961
+ *
16962
+ * Default value: 0 (unlimited)
16963
+ *
16964
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16801
16965
  */
16802
16966
  get: function () {
16803
16967
  return this.getPropertyValue("maxLength");
@@ -16810,7 +16974,9 @@ var TextValidator = /** @class */ (function (_super) {
16810
16974
  });
16811
16975
  Object.defineProperty(TextValidator.prototype, "allowDigits", {
16812
16976
  /**
16813
- * The allowDigits property.
16977
+ * Specifies whether a text value can include numerical digits.
16978
+ *
16979
+ * Default value: `true`
16814
16980
  */
16815
16981
  get: function () {
16816
16982
  return this.getPropertyValue("allowDigits");
@@ -16825,7 +16991,9 @@ var TextValidator = /** @class */ (function (_super) {
16825
16991
  }(validator_SurveyValidator));
16826
16992
 
16827
16993
  /**
16828
- * Validates the number of answers.
16994
+ * 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)).
16995
+ *
16996
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16829
16997
  */
16830
16998
  var AnswerCountValidator = /** @class */ (function (_super) {
16831
16999
  validator_extends(AnswerCountValidator, _super);
@@ -16862,7 +17030,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16862
17030
  };
16863
17031
  Object.defineProperty(AnswerCountValidator.prototype, "minCount", {
16864
17032
  /**
16865
- * The minCount property.
17033
+ * A minimum number of selected answers.
17034
+ *
17035
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16866
17036
  */
16867
17037
  get: function () {
16868
17038
  return this.getPropertyValue("minCount");
@@ -16875,7 +17045,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16875
17045
  });
16876
17046
  Object.defineProperty(AnswerCountValidator.prototype, "maxCount", {
16877
17047
  /**
16878
- * The maxCount property.
17048
+ * A maximum number of selected answers.
17049
+ *
17050
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16879
17051
  */
16880
17052
  get: function () {
16881
17053
  return this.getPropertyValue("maxCount");
@@ -16890,7 +17062,7 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16890
17062
  }(validator_SurveyValidator));
16891
17063
 
16892
17064
  /**
16893
- * Use it to validate the text by regular expressions.
17065
+ * A class that implements validation using regular expressions.
16894
17066
  *
16895
17067
  * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16896
17068
  */
@@ -16928,7 +17100,9 @@ var RegexValidator = /** @class */ (function (_super) {
16928
17100
  };
16929
17101
  Object.defineProperty(RegexValidator.prototype, "regex", {
16930
17102
  /**
16931
- * The regex property.
17103
+ * A regular expression used to validate values.
17104
+ *
17105
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16932
17106
  */
16933
17107
  get: function () {
16934
17108
  return this.getPropertyValue("regex");
@@ -16939,24 +17113,39 @@ var RegexValidator = /** @class */ (function (_super) {
16939
17113
  enumerable: false,
16940
17114
  configurable: true
16941
17115
  });
16942
- Object.defineProperty(RegexValidator.prototype, "insensitive", {
17116
+ Object.defineProperty(RegexValidator.prototype, "caseInsensitive", {
17117
+ /**
17118
+ * Specifies whether uppercase and lowercase letters must be treated as distinct or equivalent when validating values.
17119
+ *
17120
+ * Default value: `false` (uppercase and lowercase letters are treated as distinct)
17121
+ */
16943
17122
  get: function () {
16944
- return this.getPropertyValue("insensitive");
17123
+ return this.getPropertyValue("caseInsensitive");
16945
17124
  },
16946
17125
  set: function (val) {
16947
- this.setPropertyValue("insensitive", val);
17126
+ this.setPropertyValue("caseInsensitive", val);
17127
+ },
17128
+ enumerable: false,
17129
+ configurable: true
17130
+ });
17131
+ Object.defineProperty(RegexValidator.prototype, "insensitive", {
17132
+ get: function () { return this.caseInsensitive; },
17133
+ set: function (val) {
17134
+ this.caseInsensitive = val;
16948
17135
  },
16949
17136
  enumerable: false,
16950
17137
  configurable: true
16951
17138
  });
16952
17139
  RegexValidator.prototype.createRegExp = function () {
16953
- return new RegExp(this.regex, this.insensitive ? "i" : "");
17140
+ return new RegExp(this.regex, this.caseInsensitive ? "i" : "");
16954
17141
  };
16955
17142
  return RegexValidator;
16956
17143
  }(validator_SurveyValidator));
16957
17144
 
16958
17145
  /**
16959
- * Validate e-mail address in the text input
17146
+ * A class that implements a validator for e-mail addresses.
17147
+ *
17148
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16960
17149
  */
16961
17150
  var EmailValidator = /** @class */ (function (_super) {
16962
17151
  validator_extends(EmailValidator, _super);
@@ -16985,7 +17174,9 @@ var EmailValidator = /** @class */ (function (_super) {
16985
17174
  }(validator_SurveyValidator));
16986
17175
 
16987
17176
  /**
16988
- * Show error if expression returns false
17177
+ * A class that implements validation using [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
17178
+ *
17179
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16989
17180
  */
16990
17181
  var validator_ExpressionValidator = /** @class */ (function (_super) {
16991
17182
  validator_extends(ExpressionValidator, _super);
@@ -17064,7 +17255,9 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
17064
17255
  };
17065
17256
  Object.defineProperty(ExpressionValidator.prototype, "expression", {
17066
17257
  /**
17067
- * The expression property.
17258
+ * A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `false`, validation fails.
17259
+ *
17260
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
17068
17261
  */
17069
17262
  get: function () {
17070
17263
  return this.getPropertyValue("expression");
@@ -17092,7 +17285,7 @@ Serializer.addClass("textvalidator", [{ name: "minLength:number", default: 0 },
17092
17285
  Serializer.addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
17093
17286
  return new AnswerCountValidator();
17094
17287
  }, "surveyvalidator");
17095
- Serializer.addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
17288
+ Serializer.addClass("regexvalidator", ["regex", { name: "caseInsensitive:boolean", alternativeName: "insensitive" }], function () {
17096
17289
  return new RegexValidator();
17097
17290
  }, "surveyvalidator");
17098
17291
  Serializer.addClass("emailvalidator", [], function () {
@@ -17322,6 +17515,188 @@ var RendererFactory = /** @class */ (function () {
17322
17515
  }());
17323
17516
 
17324
17517
 
17518
+ // CONCATENATED MODULE: ./packages/survey-core/src/utils/text-area.ts
17519
+
17520
+ var text_area_TextAreaModel = /** @class */ (function () {
17521
+ function TextAreaModel(options) {
17522
+ var _this = this;
17523
+ this.options = options;
17524
+ this.onPropertyChangedCallback = function () {
17525
+ if (_this.element) {
17526
+ _this.element.value = _this.getTextValue();
17527
+ if (_this.autoGrow) {
17528
+ increaseHeightByContent(_this.element);
17529
+ }
17530
+ }
17531
+ };
17532
+ this.question.registerFunctionOnPropertyValueChanged(this.options.propertyName, this.onPropertyChangedCallback, "__textarea");
17533
+ }
17534
+ TextAreaModel.prototype.setElement = function (element) {
17535
+ if (!!element) {
17536
+ this.element = element;
17537
+ }
17538
+ };
17539
+ TextAreaModel.prototype.getTextValue = function () {
17540
+ if (!!this.options.getTextValue)
17541
+ return this.options.getTextValue();
17542
+ return "";
17543
+ };
17544
+ TextAreaModel.prototype.onTextAreaChange = function (event) {
17545
+ if (!!this.options.onTextAreaChange)
17546
+ this.options.onTextAreaChange(event);
17547
+ };
17548
+ TextAreaModel.prototype.onTextAreaInput = function (event) {
17549
+ if (!!this.options.onTextAreaInput)
17550
+ this.options.onTextAreaInput(event);
17551
+ if (this.element && this.autoGrow) {
17552
+ increaseHeightByContent(this.element);
17553
+ }
17554
+ };
17555
+ TextAreaModel.prototype.onTextAreaKeyDown = function (event) {
17556
+ if (!!this.options.onTextAreaKeyDown)
17557
+ this.options.onTextAreaKeyDown(event);
17558
+ };
17559
+ TextAreaModel.prototype.onTextAreaBlur = function (event) {
17560
+ this.onTextAreaChange(event);
17561
+ if (!!this.options.onTextAreaBlur)
17562
+ this.options.onTextAreaBlur(event);
17563
+ };
17564
+ TextAreaModel.prototype.onTextAreaFocus = function (event) {
17565
+ if (!!this.options.onTextAreaFocus)
17566
+ this.options.onTextAreaFocus(event);
17567
+ };
17568
+ Object.defineProperty(TextAreaModel.prototype, "question", {
17569
+ get: function () {
17570
+ return this.options.question;
17571
+ },
17572
+ enumerable: false,
17573
+ configurable: true
17574
+ });
17575
+ Object.defineProperty(TextAreaModel.prototype, "id", {
17576
+ get: function () {
17577
+ return this.options.id();
17578
+ },
17579
+ enumerable: false,
17580
+ configurable: true
17581
+ });
17582
+ Object.defineProperty(TextAreaModel.prototype, "placeholder", {
17583
+ get: function () {
17584
+ return this.options.placeholder();
17585
+ },
17586
+ enumerable: false,
17587
+ configurable: true
17588
+ });
17589
+ Object.defineProperty(TextAreaModel.prototype, "className", {
17590
+ get: function () {
17591
+ return this.options.className();
17592
+ },
17593
+ enumerable: false,
17594
+ configurable: true
17595
+ });
17596
+ Object.defineProperty(TextAreaModel.prototype, "maxLength", {
17597
+ get: function () {
17598
+ if (this.options.maxLength)
17599
+ return this.options.maxLength();
17600
+ },
17601
+ enumerable: false,
17602
+ configurable: true
17603
+ });
17604
+ Object.defineProperty(TextAreaModel.prototype, "autoGrow", {
17605
+ get: function () {
17606
+ if (this.options.autoGrow)
17607
+ return this.options.autoGrow();
17608
+ },
17609
+ enumerable: false,
17610
+ configurable: true
17611
+ });
17612
+ Object.defineProperty(TextAreaModel.prototype, "rows", {
17613
+ get: function () {
17614
+ if (this.options.rows)
17615
+ return this.options.rows();
17616
+ },
17617
+ enumerable: false,
17618
+ configurable: true
17619
+ });
17620
+ Object.defineProperty(TextAreaModel.prototype, "cols", {
17621
+ get: function () {
17622
+ if (this.options.cols)
17623
+ return this.options.cols();
17624
+ },
17625
+ enumerable: false,
17626
+ configurable: true
17627
+ });
17628
+ Object.defineProperty(TextAreaModel.prototype, "isDisabledAttr", {
17629
+ get: function () {
17630
+ return this.options.isDisabledAttr();
17631
+ },
17632
+ enumerable: false,
17633
+ configurable: true
17634
+ });
17635
+ Object.defineProperty(TextAreaModel.prototype, "isReadOnlyAttr", {
17636
+ get: function () {
17637
+ if (this.options.isReadOnlyAttr)
17638
+ return this.options.isReadOnlyAttr();
17639
+ },
17640
+ enumerable: false,
17641
+ configurable: true
17642
+ });
17643
+ Object.defineProperty(TextAreaModel.prototype, "ariaRequired", {
17644
+ get: function () {
17645
+ if (this.options.ariaRequired)
17646
+ return this.options.ariaRequired();
17647
+ },
17648
+ enumerable: false,
17649
+ configurable: true
17650
+ });
17651
+ Object.defineProperty(TextAreaModel.prototype, "ariaLabel", {
17652
+ get: function () {
17653
+ if (this.options.ariaLabel)
17654
+ return this.options.ariaLabel();
17655
+ },
17656
+ enumerable: false,
17657
+ configurable: true
17658
+ });
17659
+ Object.defineProperty(TextAreaModel.prototype, "ariaInvalid", {
17660
+ get: function () {
17661
+ if (this.options.ariaInvalid)
17662
+ return this.options.ariaInvalid();
17663
+ },
17664
+ enumerable: false,
17665
+ configurable: true
17666
+ });
17667
+ Object.defineProperty(TextAreaModel.prototype, "ariaLabelledBy", {
17668
+ get: function () {
17669
+ if (this.options.ariaLabelledBy)
17670
+ return this.options.ariaLabelledBy();
17671
+ },
17672
+ enumerable: false,
17673
+ configurable: true
17674
+ });
17675
+ Object.defineProperty(TextAreaModel.prototype, "ariaDescribedBy", {
17676
+ get: function () {
17677
+ if (this.options.ariaDescribedBy)
17678
+ return this.options.ariaDescribedBy();
17679
+ },
17680
+ enumerable: false,
17681
+ configurable: true
17682
+ });
17683
+ Object.defineProperty(TextAreaModel.prototype, "ariaErrormessage", {
17684
+ get: function () {
17685
+ if (this.options.ariaErrormessage)
17686
+ return this.options.ariaErrormessage();
17687
+ },
17688
+ enumerable: false,
17689
+ configurable: true
17690
+ });
17691
+ TextAreaModel.prototype.dispose = function () {
17692
+ if (this.question) {
17693
+ this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName, "__textarea");
17694
+ }
17695
+ };
17696
+ return TextAreaModel;
17697
+ }());
17698
+
17699
+
17325
17700
  // CONCATENATED MODULE: ./packages/survey-core/src/question.ts
17326
17701
  var question_extends = (undefined && undefined.__extends) || (function () {
17327
17702
  var extendStatics = function (d, b) {
@@ -17359,6 +17734,7 @@ var question_decorate = (undefined && undefined.__decorate) || function (decorat
17359
17734
 
17360
17735
 
17361
17736
 
17737
+
17362
17738
  var TriggerExpressionInfo = /** @class */ (function () {
17363
17739
  function TriggerExpressionInfo(name, canRun, doComplete) {
17364
17740
  this.name = name;
@@ -17401,6 +17777,7 @@ var question_Question = /** @class */ (function (_super) {
17401
17777
  _this.createNewArray("validators", function (validator) {
17402
17778
  validator.errorOwner = _this;
17403
17779
  });
17780
+ _this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
17404
17781
  _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
17405
17782
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
17406
17783
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
@@ -17441,6 +17818,26 @@ var question_Question = /** @class */ (function (_super) {
17441
17818
  Question.getQuestionId = function () {
17442
17819
  return "sq_" + Question.questionCounter++;
17443
17820
  };
17821
+ Question.prototype.getCommentTextAreaOptions = function () {
17822
+ var _this = this;
17823
+ var options = {
17824
+ question: this,
17825
+ id: function () { return _this.commentId; },
17826
+ propertyName: "comment",
17827
+ className: function () { return _this.cssClasses.comment; },
17828
+ placeholder: function () { return _this.renderedCommentPlaceholder; },
17829
+ isDisabledAttr: function () { return _this.isInputReadOnly || false; },
17830
+ rows: function () { return _this.commentAreaRows; },
17831
+ autoGrow: function () { return _this.autoGrowComment; },
17832
+ maxLength: function () { return _this.getOthersMaxLength(); },
17833
+ ariaRequired: function () { return _this.a11y_input_ariaRequired; },
17834
+ ariaLabel: function () { return _this.a11y_input_ariaLabel; },
17835
+ getTextValue: function () { return _this.comment; },
17836
+ onTextAreaChange: function (e) { _this.onCommentChange(e); },
17837
+ onTextAreaInput: function (e) { _this.onCommentInput(e); },
17838
+ };
17839
+ return options;
17840
+ };
17444
17841
  Question.prototype.isReadOnlyRenderDiv = function () {
17445
17842
  return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
17446
17843
  };
@@ -18363,13 +18760,6 @@ var question_Question = /** @class */ (function (_super) {
18363
18760
  configurable: true
18364
18761
  });
18365
18762
  Question.prototype.updateCommentElements = function () {
18366
- if (!this.autoGrowComment || !Array.isArray(this.commentElements))
18367
- return;
18368
- for (var i = 0; i < this.commentElements.length; i++) {
18369
- var el = this.commentElements[i];
18370
- if (el)
18371
- increaseHeightByContent(el);
18372
- }
18373
18763
  };
18374
18764
  Question.prototype.onCommentInput = function (event) {
18375
18765
  if (this.isInputTextUpdate) {
@@ -19046,6 +19436,8 @@ var question_Question = /** @class */ (function (_super) {
19046
19436
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19047
19437
  *
19048
19438
  * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
19439
+ *
19440
+ * [View Demo](https://surveyjs.io/form-library/examples/how-to-conditionally-make-input-field-read-only/ (linkStyle))
19049
19441
  * @see readOnly
19050
19442
  * @see isReadOnly
19051
19443
  */
@@ -19071,6 +19463,20 @@ var question_Question = /** @class */ (function (_super) {
19071
19463
  this.runDefaultValueExpression(this.defaultValueRunner, values, properties);
19072
19464
  }
19073
19465
  };
19466
+ Object.defineProperty(Question.prototype, "isInDesignMode", {
19467
+ get: function () {
19468
+ return !this.isContentElement && this.isDesignMode;
19469
+ },
19470
+ enumerable: false,
19471
+ configurable: true
19472
+ });
19473
+ Object.defineProperty(Question.prototype, "isInDesignModeV2", {
19474
+ get: function () {
19475
+ return !this.isContentElement && this.isDesignModeV2;
19476
+ },
19477
+ enumerable: false,
19478
+ configurable: true
19479
+ });
19074
19480
  Object.defineProperty(Question.prototype, "no", {
19075
19481
  /**
19076
19482
  * A question number or letter (depends on the `questionStartIndex` property of the question container (panel, page, or survey)).
@@ -19088,9 +19494,11 @@ var question_Question = /** @class */ (function (_super) {
19088
19494
  configurable: true
19089
19495
  });
19090
19496
  Question.prototype.calcNo = function () {
19497
+ var _a;
19091
19498
  if (!this.hasTitle || this.hideNumber)
19092
19499
  return "";
19093
- var no = helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex());
19500
+ var parentIndex = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.visibleIndex;
19501
+ var no = helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex(), parentIndex);
19094
19502
  if (!!this.survey) {
19095
19503
  no = this.survey.getUpdatedQuestionNo(this, no);
19096
19504
  }
@@ -19466,11 +19874,11 @@ var question_Question = /** @class */ (function (_super) {
19466
19874
  });
19467
19875
  Object.defineProperty(Question.prototype, "resetValueIf", {
19468
19876
  /**
19469
- * A Boolean expression. If it evaluates to `true`, the question value is reset to [default](#defaultValue).
19877
+ * 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).
19470
19878
  *
19471
19879
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19472
19880
  *
19473
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
19881
+ * [View Demo](https://surveyjs.io/form-library/examples/set-question-value-dynamically/ (linkStyle))
19474
19882
  * @see setValueIf
19475
19883
  */
19476
19884
  get: function () {
@@ -19484,11 +19892,11 @@ var question_Question = /** @class */ (function (_super) {
19484
19892
  });
19485
19893
  Object.defineProperty(Question.prototype, "setValueIf", {
19486
19894
  /**
19487
- * A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
19895
+ * 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).
19488
19896
  *
19489
19897
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19490
19898
  *
19491
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
19899
+ * [View Demo](https://surveyjs.io/form-library/examples/set-question-value-dynamically/ (linkStyle))
19492
19900
  * @see resetValueIf
19493
19901
  */
19494
19902
  get: function () {
@@ -19502,11 +19910,11 @@ var question_Question = /** @class */ (function (_super) {
19502
19910
  });
19503
19911
  Object.defineProperty(Question.prototype, "setValueExpression", {
19504
19912
  /**
19505
- * An expression used to calculate the question value.
19913
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the question value.
19506
19914
  *
19507
19915
  * 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`.
19508
19916
  *
19509
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
19917
+ * [View Demo](https://surveyjs.io/form-library/examples/set-question-value-dynamically/ (linkStyle))
19510
19918
  * @see defaultValueExpression
19511
19919
  * @see resetValueIf
19512
19920
  */
@@ -20678,7 +21086,7 @@ Serializer.addClass("question", [
20678
21086
  name: "title:text", serializationProperty: "locTitle", layout: "row", dependsOn: "name",
20679
21087
  onPropertyEditorUpdate: function (obj, editor) {
20680
21088
  if (!!obj && !!editor) {
20681
- editor.placeholder = obj.name;
21089
+ editor.placeholder = obj.getDefaultTitle();
20682
21090
  }
20683
21091
  }
20684
21092
  },
@@ -21921,8 +22329,8 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
21921
22329
  .replace(ChoicesRestful.noCacheText, "");
21922
22330
  }
21923
22331
  if (textProcessor) {
21924
- var pUrl = textProcessor.processTextEx(urlText, false, settings.web.encodeUrlParams);
21925
- var pPath = textProcessor.processTextEx(this.path, false, settings.web.encodeUrlParams);
22332
+ var pUrl = textProcessor.processTextEx({ text: urlText, runAtDesign: true });
22333
+ var pPath = textProcessor.processTextEx({ text: this.path, runAtDesign: true });
21926
22334
  if (!pUrl.hasAllValuesOnLastRun || !pPath.hasAllValuesOnLastRun) {
21927
22335
  this.processedUrl = "";
21928
22336
  this.processedPath = "";
@@ -22445,7 +22853,6 @@ var martixBase_decorate = (undefined && undefined.__decorate) || function (decor
22445
22853
 
22446
22854
 
22447
22855
 
22448
-
22449
22856
  /**
22450
22857
  * A base class for all matrix question types.
22451
22858
  */
@@ -22456,7 +22863,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22456
22863
  _this.generatedVisibleRows = null;
22457
22864
  _this.generatedTotalRow = null;
22458
22865
  _this.filteredRows = null;
22459
- _this.filteredColumns = null;
22460
22866
  _this.columns = _this.createColumnValues();
22461
22867
  _this.rows = _this.createItemValues("rows");
22462
22868
  return _this;
@@ -22516,11 +22922,19 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22516
22922
  });
22517
22923
  Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleColumns", {
22518
22924
  get: function () {
22519
- return !!this.filteredColumns ? this.filteredColumns : this.columns;
22925
+ var _this = this;
22926
+ var res = [];
22927
+ this.columns.forEach(function (col) { if (_this.isColumnVisible(col)) {
22928
+ res.push(col);
22929
+ } });
22930
+ return res;
22520
22931
  },
22521
22932
  enumerable: false,
22522
22933
  configurable: true
22523
22934
  });
22935
+ QuestionMatrixBaseModel.prototype.isColumnVisible = function (column) {
22936
+ return column.isVisible;
22937
+ };
22524
22938
  Object.defineProperty(QuestionMatrixBaseModel.prototype, "rows", {
22525
22939
  /**
22526
22940
  * An array of matrix rows.
@@ -22535,7 +22949,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22535
22949
  set: function (newValue) {
22536
22950
  var newRows = this.processRowsOnSet(newValue);
22537
22951
  this.setPropertyValue("rows", newRows);
22538
- this.filterItems();
22539
22952
  },
22540
22953
  enumerable: false,
22541
22954
  configurable: true
@@ -22574,7 +22987,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22574
22987
  },
22575
22988
  set: function (val) {
22576
22989
  this.setPropertyValue("rowsVisibleIf", val);
22577
- this.filterItems();
22990
+ if (!this.isLoadingFromJsonValue) {
22991
+ this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22992
+ }
22578
22993
  },
22579
22994
  enumerable: false,
22580
22995
  configurable: true
@@ -22595,7 +23010,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22595
23010
  },
22596
23011
  set: function (val) {
22597
23012
  this.setPropertyValue("columnsVisibleIf", val);
22598
- this.filterItems();
23013
+ if (!this.isLoadingFromJson) {
23014
+ this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
23015
+ }
22599
23016
  },
22600
23017
  enumerable: false,
22601
23018
  configurable: true
@@ -22604,15 +23021,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22604
23021
  _super.prototype.runCondition.call(this, values, properties);
22605
23022
  this.runItemsCondition(values, properties);
22606
23023
  };
22607
- QuestionMatrixBaseModel.prototype.filterItems = function () {
22608
- if (this.areInvisibleElementsShowing) {
22609
- this.onRowsChanged();
22610
- return false;
22611
- }
22612
- if (this.isLoadingFromJson || !this.data)
22613
- return false;
22614
- return this.runItemsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22615
- };
22616
23024
  QuestionMatrixBaseModel.prototype.onColumnsChanged = function () { };
22617
23025
  QuestionMatrixBaseModel.prototype.onRowsChanged = function () {
22618
23026
  this.updateVisibilityBasedOnRows();
@@ -22624,10 +23032,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22624
23032
  }
22625
23033
  };
22626
23034
  QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
23035
+ var _a;
22627
23036
  var res = _super.prototype.isVisibleCore.call(this);
22628
23037
  if (!res || !this.hideIfRowsEmpty)
22629
23038
  return res;
22630
- return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
23039
+ return ((_a = this.visibleRows) === null || _a === void 0 ? void 0 : _a.length) > 0;
22631
23040
  };
22632
23041
  QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
22633
23042
  return !this.survey || !this.survey.areInvisibleElementsShowing;
@@ -22636,22 +23045,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22636
23045
  return true;
22637
23046
  };
22638
23047
  QuestionMatrixBaseModel.prototype.runItemsCondition = function (values, properties) {
22639
- var oldVisibleRows = null;
22640
- if (!!this.filteredRows && !helpers_Helpers.isValueEmpty(this.defaultValue)) {
22641
- oldVisibleRows = [];
22642
- for (var i = 0; i < this.filteredRows.length; i++) {
22643
- oldVisibleRows.push(this.filteredRows[i]);
22644
- }
22645
- }
22646
23048
  var hasChanges = this.hasRowsAsItems() && this.runConditionsForRows(values, properties);
22647
23049
  var hasColumnsChanged = this.runConditionsForColumns(values, properties);
22648
23050
  hasChanges = hasColumnsChanged || hasChanges;
22649
23051
  if (hasChanges) {
22650
- if (this.isClearValueOnHidden && (!!this.filteredColumns || !!this.filteredRows)) {
22651
- this.clearIncorrectValues();
22652
- }
22653
- if (!!oldVisibleRows) {
22654
- this.restoreNewVisibleRowsValues(oldVisibleRows);
23052
+ if (this.isClearValueOnHidden && hasColumnsChanged) {
23053
+ this.clearInvisibleColumnValues();
22655
23054
  }
22656
23055
  this.clearGeneratedRows();
22657
23056
  if (hasColumnsChanged) {
@@ -22659,16 +23058,15 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22659
23058
  }
22660
23059
  this.onRowsChanged();
22661
23060
  }
22662
- return hasChanges;
22663
23061
  };
23062
+ QuestionMatrixBaseModel.prototype.isRowsFiltered = function () { return !!this.filteredRows; };
22664
23063
  QuestionMatrixBaseModel.prototype.clearGeneratedRows = function () {
22665
23064
  this.generatedVisibleRows = null;
22666
23065
  };
23066
+ QuestionMatrixBaseModel.prototype.createRowsVisibleIfRunner = function () { return null; };
22667
23067
  QuestionMatrixBaseModel.prototype.runConditionsForRows = function (values, properties) {
22668
23068
  var showInvisibile = !!this.survey && this.survey.areInvisibleElementsShowing;
22669
- var runner = !showInvisibile && !!this.rowsVisibleIf
22670
- ? new ConditionRunner(this.rowsVisibleIf)
22671
- : null;
23069
+ var runner = !showInvisibile ? this.createRowsVisibleIfRunner() : null;
22672
23070
  this.filteredRows = [];
22673
23071
  var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
22674
23072
  itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
@@ -22679,73 +23077,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22679
23077
  };
22680
23078
  QuestionMatrixBaseModel.prototype.runConditionsForColumns = function (values, properties) {
22681
23079
  var useColumnsExpression = !!this.survey && !this.survey.areInvisibleElementsShowing;
22682
- var runner = useColumnsExpression && !!this.columnsVisibleIf
22683
- ? new ConditionRunner(this.columnsVisibleIf)
22684
- : null;
22685
- this.filteredColumns = [];
22686
- var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.columns, this.filteredColumns, runner, values, properties, this.shouldRunColumnExpression());
22687
- if (this.filteredColumns.length === this.columns.length) {
22688
- this.filteredColumns = null;
22689
- }
22690
- return hasChanged;
22691
- };
22692
- QuestionMatrixBaseModel.prototype.clearIncorrectValues = function () {
22693
- var val = this.value;
22694
- if (!val)
22695
- return;
22696
- var newVal = null;
22697
- var isChanged = false;
22698
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
22699
- var columns = !!this.filteredColumns ? this.filteredColumns : this.columns;
22700
- for (var key in val) {
22701
- if (itemvalue_ItemValue.getItemByValue(rows, key) &&
22702
- itemvalue_ItemValue.getItemByValue(columns, val[key])) {
22703
- if (newVal == null)
22704
- newVal = {};
22705
- newVal[key] = val[key];
22706
- }
22707
- else {
22708
- isChanged = true;
22709
- }
22710
- }
22711
- if (isChanged) {
22712
- this.value = newVal;
22713
- }
22714
- _super.prototype.clearIncorrectValues.call(this);
22715
- };
22716
- QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () {
22717
- if (this.isEmpty())
22718
- return;
22719
- var newData = this.getUnbindValue(this.value);
22720
- var rows = this.rows;
22721
- for (var i = 0; i < rows.length; i++) {
22722
- var key = rows[i].value;
22723
- if (!!newData[key] && !rows[i].isVisible) {
22724
- delete newData[key];
22725
- }
22726
- }
22727
- if (this.isTwoValueEquals(newData, this.value))
22728
- return;
22729
- this.value = newData;
22730
- };
22731
- QuestionMatrixBaseModel.prototype.restoreNewVisibleRowsValues = function (oldVisibleRows) {
22732
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
22733
- var val = this.defaultValue;
22734
- var newValue = this.getUnbindValue(this.value);
22735
- var isChanged = false;
22736
- for (var key in val) {
22737
- if (itemvalue_ItemValue.getItemByValue(rows, key) &&
22738
- !itemvalue_ItemValue.getItemByValue(oldVisibleRows, key)) {
22739
- if (newValue == null)
22740
- newValue = {};
22741
- newValue[key] = val[key];
22742
- isChanged = true;
22743
- }
22744
- }
22745
- if (isChanged) {
22746
- this.value = newValue;
22747
- }
23080
+ var runner = useColumnsExpression && !!this.columnsVisibleIf ? new ConditionRunner(this.columnsVisibleIf) : null;
23081
+ return itemvalue_ItemValue.runConditionsForItems(this.columns, undefined, runner, values, properties, this.shouldRunColumnExpression());
22748
23082
  };
23083
+ QuestionMatrixBaseModel.prototype.clearInvisibleColumnValues = function () { };
23084
+ QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () { };
22749
23085
  QuestionMatrixBaseModel.prototype.needResponsiveWidth = function () {
22750
23086
  //TODO: make it mor intelligent
22751
23087
  return true;
@@ -23052,12 +23388,12 @@ var textPreProcessor_QuestionTextProcessor = /** @class */ (function () {
23052
23388
  text = this.processTextCore(this.getParentTextProcessor(), text, returnDisplayValue);
23053
23389
  return this.processTextCore(this.survey, text, returnDisplayValue);
23054
23390
  };
23055
- QuestionTextProcessor.prototype.processTextEx = function (text, returnDisplayValue) {
23056
- text = this.processText(text, returnDisplayValue);
23391
+ QuestionTextProcessor.prototype.processTextEx = function (params) {
23392
+ params.text = this.processText(params.text, params.returnDisplayValue);
23057
23393
  var hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
23058
- var res = { hasAllValuesOnLastRun: true, text: text };
23394
+ var res = { hasAllValuesOnLastRun: true, text: params.text };
23059
23395
  if (this.survey) {
23060
- res = this.survey.processTextEx(text, returnDisplayValue, false);
23396
+ res = this.survey.processTextEx(params);
23061
23397
  }
23062
23398
  res.hasAllValuesOnLastRun =
23063
23399
  res.hasAllValuesOnLastRun && hasAllValuesOnLastRun;
@@ -24207,6 +24543,13 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
24207
24543
  };
24208
24544
  }
24209
24545
  };
24546
+ Object.defineProperty(QuestionCompositeModel.prototype, "ariaRole", {
24547
+ get: function () {
24548
+ return "group";
24549
+ },
24550
+ enumerable: false,
24551
+ configurable: true
24552
+ });
24210
24553
  QuestionCompositeModel.ItemVariableName = "composite";
24211
24554
  return QuestionCompositeModel;
24212
24555
  }(question_custom_QuestionCustomModelBase));
@@ -24954,6 +25297,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
24954
25297
  _this.colOwnerValue = null;
24955
25298
  _this.indexValue = -1;
24956
25299
  _this._hasVisibleCell = true;
25300
+ _this.isColumnsVisibleIf = true;
24957
25301
  _this.previousChoicesId = undefined;
24958
25302
  _this.createLocalizableString("totalFormat", _this);
24959
25303
  _this.createLocalizableString("cellHint", _this);
@@ -26653,8 +26997,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26653
26997
  this.headerRow.cells.push(this.createHeaderCell(null));
26654
26998
  }
26655
26999
  if (this.matrix.isColumnLayoutHorizontal) {
26656
- for (var i = 0; i < this.matrix.visibleColumns.length; i++) {
26657
- var column = this.matrix.visibleColumns[i];
27000
+ for (var i = 0; i < this.matrix.columns.length; i++) {
27001
+ var column = this.matrix.columns[i];
26658
27002
  if (!column.isColumnVisible)
26659
27003
  continue;
26660
27004
  if (this.matrix.IsMultiplyColumn(column)) {
@@ -27286,6 +27630,7 @@ var question_matrixdropdownbase_extends = (undefined && undefined.__extends) ||
27286
27630
 
27287
27631
 
27288
27632
 
27633
+
27289
27634
  var question_matrixdropdownbase_MatrixDropdownCell = /** @class */ (function () {
27290
27635
  function MatrixDropdownCell(column, row, data) {
27291
27636
  this.column = column;
@@ -27455,6 +27800,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27455
27800
  var _this = this;
27456
27801
  this.isSettingValue = false;
27457
27802
  this.detailPanelValue = null;
27803
+ this.visibleValue = true;
27458
27804
  this.cells = [];
27459
27805
  this.isCreatingDetailPanel = false;
27460
27806
  this.data = data;
@@ -27500,6 +27846,24 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27500
27846
  });
27501
27847
  MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
27502
27848
  MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
27849
+ Object.defineProperty(MatrixDropdownRowModelBase.prototype, "isVisible", {
27850
+ get: function () { return this.visible && this.isItemVisible(); },
27851
+ enumerable: false,
27852
+ configurable: true
27853
+ });
27854
+ Object.defineProperty(MatrixDropdownRowModelBase.prototype, "visible", {
27855
+ get: function () { return this.visibleValue; },
27856
+ set: function (val) {
27857
+ var _a;
27858
+ if (this.visible !== val) {
27859
+ this.visibleValue = val;
27860
+ (_a = this.data) === null || _a === void 0 ? void 0 : _a.onRowVisibilityChanged(this);
27861
+ }
27862
+ },
27863
+ enumerable: false,
27864
+ configurable: true
27865
+ });
27866
+ MatrixDropdownRowModelBase.prototype.isItemVisible = function () { return true; };
27503
27867
  Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
27504
27868
  get: function () {
27505
27869
  var result = {};
@@ -27657,15 +28021,23 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27657
28021
  res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
27658
28022
  res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
27659
28023
  };
27660
- MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
28024
+ MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties, rowsVisibleIf) {
27661
28025
  if (!!this.data) {
27662
- values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
28026
+ values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.getFilteredData();
27663
28027
  }
27664
28028
  var rowIndex = this.rowIndex;
27665
28029
  this.applyRowVariablesToValues(values, rowIndex);
27666
28030
  var newProps = helpers_Helpers.createCopy(properties);
27667
28031
  newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
27668
28032
  var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
28033
+ if (!!rowsVisibleIf) {
28034
+ values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
28035
+ this.setRowsVisibleIfValues(values);
28036
+ this.visible = new ConditionRunner(rowsVisibleIf).run(values, properties);
28037
+ }
28038
+ else {
28039
+ this.visible = true;
28040
+ }
27669
28041
  for (var i = 0; i < this.cells.length; i++) {
27670
28042
  if (i > 0) {
27671
28043
  mergeValues(this.value, rowValues);
@@ -27680,6 +28052,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27680
28052
  this.onQuestionReadOnlyChanged();
27681
28053
  }
27682
28054
  };
28055
+ MatrixDropdownRowModelBase.prototype.setRowsVisibleIfValues = function (values) { };
27683
28056
  MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
27684
28057
  var res = [];
27685
28058
  this.questions.forEach(function (q) {
@@ -28123,12 +28496,12 @@ var question_matrixdropdownbase_MatrixDropdownTotalRowModel = /** @class */ (fun
28123
28496
  this.data.onTotalValueChanged();
28124
28497
  }
28125
28498
  };
28126
- MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties) {
28499
+ MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties, rowsVisibleIf) {
28127
28500
  var counter = 0;
28128
28501
  var prevValue;
28129
28502
  do {
28130
28503
  prevValue = helpers_Helpers.getUnbindValue(this.value);
28131
- _super.prototype.runCondition.call(this, values, properties);
28504
+ _super.prototype.runCondition.call(this, values, properties, "");
28132
28505
  counter++;
28133
28506
  } while (!helpers_Helpers.isTwoValueEquals(prevValue, this.value) && counter < 3);
28134
28507
  };
@@ -28459,6 +28832,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28459
28832
  };
28460
28833
  QuestionMatrixDropdownModelBase.prototype.onPointerDown = function (pointerDownEvent, row) { };
28461
28834
  QuestionMatrixDropdownModelBase.prototype.onRowsChanged = function () {
28835
+ this.clearVisibleRows();
28462
28836
  this.resetRenderedTable();
28463
28837
  _super.prototype.onRowsChanged.call(this);
28464
28838
  };
@@ -28512,6 +28886,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28512
28886
  this.fireCallback(this.onRenderedTableResetCallback);
28513
28887
  };
28514
28888
  QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
28889
+ this.clearVisibleRows();
28515
28890
  if (!this.generatedVisibleRows)
28516
28891
  return;
28517
28892
  for (var i = 0; i < this.generatedVisibleRows.length; i++) {
@@ -28554,8 +28929,8 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28554
28929
  cellQuestion: null,
28555
28930
  value: null,
28556
28931
  };
28557
- for (var i = 0; i < this.visibleColumns.length; i++) {
28558
- options.column = this.visibleColumns[i];
28932
+ for (var i = 0; i < this.columns.length; i++) {
28933
+ options.column = this.columns[i];
28559
28934
  options.columnName = options.column.name;
28560
28935
  var cell = row.cells[i];
28561
28936
  options.cell = cell;
@@ -28801,6 +29176,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28801
29176
  counter++;
28802
29177
  } while (!helpers_Helpers.isTwoValueEquals(prevTotalValue, this.totalValue) &&
28803
29178
  counter < 3);
29179
+ this.updateVisibilityBasedOnRows();
28804
29180
  };
28805
29181
  QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value) {
28806
29182
  _super.prototype.runTriggers.call(this, name, value);
@@ -28810,25 +29186,40 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28810
29186
  return false;
28811
29187
  };
28812
29188
  QuestionMatrixDropdownModelBase.prototype.runCellsCondition = function (values, properties) {
28813
- if (!this.generatedVisibleRows)
28814
- return;
28815
- var newValues = this.getRowConditionValues(values);
28816
29189
  var rows = this.generatedVisibleRows;
28817
- for (var i = 0; i < rows.length; i++) {
28818
- rows[i].runCondition(newValues, properties);
29190
+ if (!!rows) {
29191
+ var newValues = this.getRowConditionValues(values);
29192
+ for (var i = 0; i < rows.length; i++) {
29193
+ rows[i].runCondition(newValues, properties, this.rowsVisibleIf);
29194
+ }
28819
29195
  }
28820
29196
  this.checkColumnsVisibility();
28821
29197
  this.checkColumnsRenderedRequired();
28822
29198
  };
29199
+ QuestionMatrixDropdownModelBase.prototype.runConditionsForColumns = function (values, properties) {
29200
+ var _this = this;
29201
+ this.columns.forEach(function (column) {
29202
+ if (!_this.columnsVisibleIf) {
29203
+ column.isColumnsVisibleIf = true;
29204
+ }
29205
+ else {
29206
+ var condition = new ConditionRunner(_this.columnsVisibleIf);
29207
+ values["item"] = column.name;
29208
+ column.isColumnsVisibleIf = condition.run(values, properties) === true;
29209
+ }
29210
+ });
29211
+ return false;
29212
+ };
28823
29213
  QuestionMatrixDropdownModelBase.prototype.checkColumnsVisibility = function () {
28824
29214
  if (this.isDesignMode)
28825
29215
  return;
28826
29216
  var hasChanged = false;
28827
- for (var i = 0; i < this.visibleColumns.length; i++) {
28828
- var column = this.visibleColumns[i];
28829
- if (!column.visibleIf && !column.isFilteredMultipleColumns)
29217
+ for (var i = 0; i < this.columns.length; i++) {
29218
+ var column = this.columns[i];
29219
+ var isCellsVisibilty = !!column.visibleIf || column.isFilteredMultipleColumns;
29220
+ if (!isCellsVisibilty && !this.columnsVisibleIf && column.isColumnVisible)
28830
29221
  continue;
28831
- hasChanged = this.isColumnVisibilityChanged(column) || hasChanged;
29222
+ hasChanged = this.isColumnVisibilityChanged(column, isCellsVisibilty) || hasChanged;
28832
29223
  }
28833
29224
  if (hasChanged) {
28834
29225
  this.resetRenderedTable();
@@ -28836,9 +29227,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28836
29227
  };
28837
29228
  QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
28838
29229
  var rows = this.generatedVisibleRows;
28839
- for (var i = 0; i < this.visibleColumns.length; i++) {
28840
- var column = this.visibleColumns[i];
28841
- if (!column.requiredIf)
29230
+ if (!rows)
29231
+ return;
29232
+ for (var i = 0; i < this.columns.length; i++) {
29233
+ var column = this.columns[i];
29234
+ if (!column.requiredIf || !column.isColumnVisible)
28842
29235
  continue;
28843
29236
  var required = rows.length > 0;
28844
29237
  for (var j = 0; j < rows.length; j++) {
@@ -28850,26 +29243,29 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28850
29243
  column.updateIsRenderedRequired(required);
28851
29244
  }
28852
29245
  };
28853
- QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column) {
29246
+ QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column, checkCellsVisiblity) {
28854
29247
  var curVis = column.isColumnVisible;
28855
- var isMultipleColumnsVisibility = column.isFilteredMultipleColumns;
29248
+ var hasVisCell = !checkCellsVisiblity;
29249
+ var rows = this.generatedVisibleRows;
29250
+ var checkRows = checkCellsVisiblity && rows;
29251
+ var isMultipleColumnsVisibility = checkRows && column.isFilteredMultipleColumns;
28856
29252
  var curVisibleChoices = isMultipleColumnsVisibility ? column.getVisibleChoicesInCell : [];
28857
29253
  var newVisibleChoices = new Array();
28858
- var hasVisCell = false;
28859
- var rows = this.generatedVisibleRows;
28860
- for (var i = 0; i < rows.length; i++) {
28861
- var cell = rows[i].cells[column.index];
28862
- var q = cell === null || cell === void 0 ? void 0 : cell.question;
28863
- if (!!q && q.isVisible) {
28864
- hasVisCell = true;
28865
- if (isMultipleColumnsVisibility) {
28866
- this.updateNewVisibleChoices(q, newVisibleChoices);
29254
+ if (checkRows) {
29255
+ for (var i = 0; i < rows.length; i++) {
29256
+ var cell = rows[i].cells[column.index];
29257
+ var q = cell === null || cell === void 0 ? void 0 : cell.question;
29258
+ if (!!q && q.isVisible) {
29259
+ hasVisCell = true;
29260
+ if (isMultipleColumnsVisibility) {
29261
+ this.updateNewVisibleChoices(q, newVisibleChoices);
29262
+ }
29263
+ else
29264
+ break;
28867
29265
  }
28868
- else
28869
- break;
28870
29266
  }
28871
29267
  }
28872
- column.hasVisibleCell = hasVisCell;
29268
+ column.hasVisibleCell = hasVisCell && column.isColumnsVisibleIf;
28873
29269
  if (isMultipleColumnsVisibility) {
28874
29270
  column.setVisibleChoicesInCell(newVisibleChoices);
28875
29271
  if (!helpers_Helpers.isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
@@ -28961,7 +29357,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28961
29357
  * }
28962
29358
  * ```
28963
29359
  *
28964
- * To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
29360
+ * To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
28965
29361
  *
28966
29362
  * If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
28967
29363
  *
@@ -29044,20 +29440,46 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29044
29440
  this.columns.push(column);
29045
29441
  return column;
29046
29442
  };
29443
+ QuestionMatrixDropdownModelBase.prototype.clearVisibleRows = function () {
29444
+ this.visibleRowsArray = null;
29445
+ };
29446
+ QuestionMatrixDropdownModelBase.prototype.isColumnVisible = function (column) {
29447
+ return column.isColumnVisible;
29448
+ };
29047
29449
  QuestionMatrixDropdownModelBase.prototype.getVisibleRows = function () {
29048
- var _this = this;
29049
29450
  if (this.isUpdateLocked)
29050
29451
  return null;
29051
- if (!this.generatedVisibleRows) {
29452
+ if (this.isGenereatingRows)
29453
+ return [];
29454
+ if (!!this.visibleRowsArray)
29455
+ return this.visibleRowsArray;
29456
+ this.generateVisibleRowsIfNeeded();
29457
+ this.visibleRowsArray = this.getVisibleFromGenerated(this.generatedVisibleRows);
29458
+ return this.visibleRowsArray;
29459
+ };
29460
+ QuestionMatrixDropdownModelBase.prototype.generateVisibleRowsIfNeeded = function () {
29461
+ var _this = this;
29462
+ if (!this.isUpdateLocked && !this.generatedVisibleRows && !this.generatedVisibleRows) {
29463
+ this.isGenereatingRows = true;
29052
29464
  this.generatedVisibleRows = this.generateRows();
29465
+ this.isGenereatingRows = false;
29053
29466
  this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
29054
29467
  if (this.data) {
29055
29468
  this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
29056
29469
  }
29057
- this.updateValueOnRowsGeneration(this.generatedVisibleRows);
29058
- this.updateIsAnswered();
29470
+ if (!!this.generatedVisibleRows) {
29471
+ this.updateValueOnRowsGeneration(this.generatedVisibleRows);
29472
+ this.updateIsAnswered();
29473
+ }
29059
29474
  }
29060
- return this.generatedVisibleRows;
29475
+ };
29476
+ QuestionMatrixDropdownModelBase.prototype.getVisibleFromGenerated = function (rows) {
29477
+ var res = [];
29478
+ if (!rows)
29479
+ return res;
29480
+ rows.forEach(function (row) { if (row.isVisible)
29481
+ res.push(row); });
29482
+ return res.length === rows.length ? rows : res;
29061
29483
  };
29062
29484
  QuestionMatrixDropdownModelBase.prototype.updateValueOnRowsGeneration = function (rows) {
29063
29485
  var oldValue = this.createNewValue(true);
@@ -29645,7 +30067,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29645
30067
  !this.generatedVisibleRows)
29646
30068
  return;
29647
30069
  this.isDoingonAnyValueChanged = true;
29648
- var rows = this.visibleRows;
30070
+ var rows = this.generatedVisibleRows;
29649
30071
  for (var i = 0; i < rows.length; i++) {
29650
30072
  rows[i].onAnyValueChanged(name, questionName);
29651
30073
  }
@@ -29694,6 +30116,19 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29694
30116
  enumerable: false,
29695
30117
  configurable: true
29696
30118
  });
30119
+ Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasInvisibleRows", {
30120
+ get: function () {
30121
+ return !!this.visibleRowsArray && this.visibleRowsArray.length !== this.generatedVisibleRows.length;
30122
+ },
30123
+ enumerable: false,
30124
+ configurable: true
30125
+ });
30126
+ QuestionMatrixDropdownModelBase.prototype.getFilteredData = function () {
30127
+ if (this.isEmpty() || !this.generatedVisibleRows || !this.hasInvisibleRows)
30128
+ return this.value;
30129
+ return this.getFilteredDataCore();
30130
+ };
30131
+ QuestionMatrixDropdownModelBase.prototype.getFilteredDataCore = function () { return this.value; };
29697
30132
  QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
29698
30133
  if (!this.survey && !this.cellValueChangingCallback)
29699
30134
  return !!rowValue ? rowValue[columnName] : null;
@@ -29884,6 +30319,26 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29884
30319
  return null;
29885
30320
  };
29886
30321
  QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
30322
+ QuestionMatrixDropdownModelBase.prototype.onRowVisibilityChanged = function (row) {
30323
+ this.clearVisibleRows();
30324
+ this.resetRenderedTable();
30325
+ };
30326
+ QuestionMatrixDropdownModelBase.prototype.clearValueIfInvisibleCore = function (reason) {
30327
+ _super.prototype.clearValueIfInvisibleCore.call(this, reason);
30328
+ this.clearInvisibleValuesInRows();
30329
+ };
30330
+ QuestionMatrixDropdownModelBase.prototype.clearInvisibleValuesInRows = function () {
30331
+ var _a;
30332
+ if (this.isEmpty() || !this.isRowsFiltered)
30333
+ return;
30334
+ var sharedQuestions = ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.questionsByValueName(this.getValueName())) || [];
30335
+ if (sharedQuestions.length < 2) {
30336
+ this.value = this.getFilteredData();
30337
+ }
30338
+ };
30339
+ QuestionMatrixDropdownModelBase.prototype.isRowsFiltered = function () {
30340
+ return _super.prototype.isRowsFiltered.call(this) || (this.visibleRows !== this.generatedVisibleRows);
30341
+ };
29887
30342
  QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
29888
30343
  if (index >= this.visibleRows.length)
29889
30344
  return null;
@@ -29967,7 +30422,6 @@ Serializer.addClass("matrixdropdownbase", [
29967
30422
  visible: false,
29968
30423
  isLightSerializable: false,
29969
30424
  },
29970
- { name: "columnsVisibleIf", visible: false },
29971
30425
  {
29972
30426
  name: "detailPanelMode",
29973
30427
  choices: ["none", "underRow", "underRowSingle"],
@@ -30053,8 +30507,13 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
30053
30507
  enumerable: false,
30054
30508
  configurable: true
30055
30509
  });
30510
+ MatrixDropdownRowModel.prototype.isItemVisible = function () { return this.item.isVisible; };
30056
30511
  MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
30057
30512
  MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
30513
+ MatrixDropdownRowModel.prototype.setRowsVisibleIfValues = function (values) {
30514
+ values["item"] = this.item.value;
30515
+ values["choice"] = this.item.value;
30516
+ };
30058
30517
  return MatrixDropdownRowModel;
30059
30518
  }(question_matrixdropdownbase_MatrixDropdownRowModelBase));
30060
30519
 
@@ -30070,11 +30529,11 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30070
30529
  _this.defaultValuesInRows = {};
30071
30530
  _this.createLocalizableString("totalText", _this, true);
30072
30531
  _this.registerPropertyChangedHandlers(["rows"], function () {
30532
+ if (!_this.generatedVisibleRows)
30533
+ return;
30073
30534
  _this.clearGeneratedRows();
30074
30535
  _this.resetRenderedTable();
30075
- if (!_this.filterItems()) {
30076
- _this.onRowsChanged();
30077
- }
30536
+ _this.getVisibleRows();
30078
30537
  _this.clearIncorrectValues();
30079
30538
  });
30080
30539
  _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
@@ -30165,30 +30624,29 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30165
30624
  return helpers_Helpers.isValueObject(val, true);
30166
30625
  };
30167
30626
  QuestionMatrixDropdownModel.prototype.clearIncorrectValues = function () {
30168
- var val = this.value;
30169
- if (!val)
30170
- return;
30171
- var newVal = null;
30172
- var isChanged = false;
30173
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
30174
- for (var key in val) {
30175
- if (itemvalue_ItemValue.getItemByValue(rows, key)) {
30176
- if (newVal == null)
30177
- newVal = {};
30178
- newVal[key] = val[key];
30179
- }
30180
- else {
30181
- isChanged = true;
30627
+ if (!this.isEmpty()) {
30628
+ this.getVisibleRows();
30629
+ var newVal = {};
30630
+ var val = this.value;
30631
+ for (var key in val) {
30632
+ var row = this.getRowByKey(key);
30633
+ if (!!row && row.isVisible) {
30634
+ newVal[key] = val[key];
30635
+ }
30182
30636
  }
30183
- }
30184
- if (isChanged) {
30185
30637
  this.value = newVal;
30186
30638
  }
30187
30639
  _super.prototype.clearIncorrectValues.call(this);
30188
30640
  };
30189
- QuestionMatrixDropdownModel.prototype.clearValueIfInvisibleCore = function (reason) {
30190
- _super.prototype.clearValueIfInvisibleCore.call(this, reason);
30191
- this.clearInvisibleValuesInRows();
30641
+ QuestionMatrixDropdownModel.prototype.getRowByKey = function (val) {
30642
+ var rows = this.generatedVisibleRows;
30643
+ if (!rows)
30644
+ return null;
30645
+ for (var i = 0; i < rows.length; i++) {
30646
+ if (rows[i].rowName === val)
30647
+ return rows[i];
30648
+ }
30649
+ return null;
30192
30650
  };
30193
30651
  QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
30194
30652
  var _this = this;
@@ -30215,7 +30673,7 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30215
30673
  };
30216
30674
  QuestionMatrixDropdownModel.prototype.generateRows = function () {
30217
30675
  var result = new Array();
30218
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
30676
+ var rows = this.rows;
30219
30677
  if (!rows || rows.length === 0)
30220
30678
  return result;
30221
30679
  var val = this.value;
@@ -30232,6 +30690,17 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30232
30690
  QuestionMatrixDropdownModel.prototype.createMatrixRow = function (item, value) {
30233
30691
  return new MatrixDropdownRowModel(item.value, item, this, value);
30234
30692
  };
30693
+ QuestionMatrixDropdownModel.prototype.getFilteredDataCore = function () {
30694
+ var res = {};
30695
+ var val = this.createValueCopy();
30696
+ this.generatedVisibleRows.forEach(function (row) {
30697
+ var rowVal = val[row.rowName];
30698
+ if (row.isVisible && !helpers_Helpers.isValueEmpty(rowVal)) {
30699
+ res[row.rowName] = rowVal;
30700
+ }
30701
+ });
30702
+ return res;
30703
+ };
30235
30704
  QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
30236
30705
  keys.push("rows");
30237
30706
  };
@@ -31067,6 +31536,7 @@ var question_matrixdynamic_extends = (undefined && undefined.__extends) || (func
31067
31536
 
31068
31537
 
31069
31538
 
31539
+
31070
31540
  var MatrixDynamicRowModel = /** @class */ (function (_super) {
31071
31541
  question_matrixdynamic_extends(MatrixDynamicRowModel, _super);
31072
31542
  function MatrixDynamicRowModel(index, data, value) {
@@ -31142,7 +31612,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31142
31612
  _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
31143
31613
  _this.updateShowTableAndAddRow();
31144
31614
  });
31145
- _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.clearRowsAndResetRenderedTable(); });
31615
+ _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
31146
31616
  _this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
31147
31617
  return _this;
31148
31618
  }
@@ -31291,7 +31761,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31291
31761
  };
31292
31762
  QuestionMatrixDynamicModel.prototype.initDataUI = function () {
31293
31763
  if (!this.generatedVisibleRows) {
31294
- this.visibleRows;
31764
+ this.getVisibleRows();
31295
31765
  }
31296
31766
  };
31297
31767
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
@@ -31320,6 +31790,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31320
31790
  }
31321
31791
  if (this.generatedVisibleRows || prevValue == 0) {
31322
31792
  if (!this.generatedVisibleRows) {
31793
+ this.clearGeneratedRows();
31323
31794
  this.generatedVisibleRows = [];
31324
31795
  }
31325
31796
  this.generatedVisibleRows.splice(val);
@@ -32009,9 +32480,29 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32009
32480
  QuestionMatrixDynamicModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
32010
32481
  if (clearData === void 0) { clearData = false; }
32011
32482
  this.setRowCountValueFromData = true;
32483
+ if (this.minRowCount > 0 && helpers_Helpers.isValueEmpty(newValue) && !helpers_Helpers.isValueEmpty(this.defaultRowValue)) {
32484
+ newValue = [];
32485
+ for (var i = 0; i < this.minRowCount; i++) {
32486
+ newValue.push(helpers_Helpers.createCopy(this.defaultRowValue));
32487
+ }
32488
+ }
32012
32489
  _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
32013
32490
  this.setRowCountValueFromData = false;
32014
32491
  };
32492
+ QuestionMatrixDynamicModel.prototype.getFilteredDataCore = function () {
32493
+ var res = [];
32494
+ var val = this.createValueCopy();
32495
+ if (!Array.isArray(val))
32496
+ return res;
32497
+ var rows = this.generatedVisibleRows;
32498
+ for (var i = 0; i < rows.length && i < val.length; i++) {
32499
+ var rowVal = val[i];
32500
+ if (rows[i].isVisible && !helpers_Helpers.isValueEmpty(rowVal)) {
32501
+ res.push(rowVal);
32502
+ }
32503
+ }
32504
+ return res;
32505
+ };
32015
32506
  QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
32016
32507
  if (!val || !Array.isArray(val))
32017
32508
  return;
@@ -32036,7 +32527,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32036
32527
  }
32037
32528
  else {
32038
32529
  this.clearGeneratedRows();
32039
- this.generatedVisibleRows = this.visibleRows;
32530
+ this.getVisibleRows();
32040
32531
  this.onRowsChanged();
32041
32532
  }
32042
32533
  this.setRowCountValueFromData = false;
@@ -32112,7 +32603,6 @@ var QuestionMatrixDynamicRenderedTable = /** @class */ (function (_super) {
32112
32603
  return QuestionMatrixDynamicRenderedTable;
32113
32604
  }(question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable));
32114
32605
  Serializer.addClass("matrixdynamic", [
32115
- { name: "rowsVisibleIf:condition", visible: false },
32116
32606
  { name: "allowAddRows:boolean", default: true },
32117
32607
  { name: "allowRemoveRows:boolean", default: true },
32118
32608
  { name: "rowCount:number", default: 2, minValue: 0, isBindable: true },
@@ -32240,7 +32730,6 @@ var defaultV2Css = {
32240
32730
  titleExpanded: "sd-element__title--expanded",
32241
32731
  titleCollapsed: "sd-element__title--collapsed",
32242
32732
  titleDisabled: "sd-element__title--disabled",
32243
- titleHidden: "sd-element__title--hidden",
32244
32733
  titleOnExpand: "sd-panel__title--expanded",
32245
32734
  titleOnError: "sd-panel__title--error",
32246
32735
  titleBar: "sd-action-title-bar",
@@ -32253,7 +32742,6 @@ var defaultV2Css = {
32253
32742
  footer: "sd-panel__footer",
32254
32743
  requiredText: "sd-panel__required-text",
32255
32744
  header: "sd-panel__header sd-element__header sd-element__header--location-top",
32256
- headerHidden: "sd-panel__header--hidden",
32257
32745
  collapsed: "sd-element--collapsed",
32258
32746
  expanded: "sd-element--expanded",
32259
32747
  expandable: "sd-element--expandable",
@@ -32342,6 +32830,7 @@ var defaultV2Css = {
32342
32830
  emptyHeaderRoot: "sd-page__empty-header",
32343
32831
  title: "sd-title sd-page__title",
32344
32832
  description: "sd-description sd-page__description",
32833
+ number: "sd-page__num",
32345
32834
  errorsContainer: "sd-page__errbox"
32346
32835
  },
32347
32836
  pageTitle: "sd-title sd-page__title",
@@ -32951,6 +33440,7 @@ var defaultV2Css = {
32951
33440
  rootSelectToRankEmptyValueMod: "sv-ranking--select-to-rank-empty-value",
32952
33441
  rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
32953
33442
  rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
33443
+ rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
32954
33444
  item: "sv-ranking-item",
32955
33445
  itemContent: "sv-ranking-item__content sd-ranking-item__content",
32956
33446
  itemIndex: "sv-ranking-item__index sd-ranking-item__index",
@@ -33766,7 +34256,13 @@ var header_Cover = /** @class */ (function (_super) {
33766
34256
  };
33767
34257
  Object.defineProperty(Cover.prototype, "renderedHeight", {
33768
34258
  get: function () {
33769
- return this.height && (this.survey && !this.survey.isMobile || !this.survey) ? Math.max(this.height, this.actualHeight + 40) + "px" : undefined;
34259
+ if (this.survey && !this.survey.isMobile || !this.survey) {
34260
+ return this.height ? Math.max(this.height, this.actualHeight + 40) + "px" : undefined;
34261
+ }
34262
+ if (this.survey && this.survey.isMobile) {
34263
+ return this.mobileHeight ? Math.max(this.mobileHeight, this.actualHeight + 40) + "px" : undefined;
34264
+ }
34265
+ return undefined;
33770
34266
  },
33771
34267
  enumerable: false,
33772
34268
  configurable: true
@@ -33867,6 +34363,9 @@ var header_Cover = /** @class */ (function (_super) {
33867
34363
  header_decorate([
33868
34364
  jsonobject_property()
33869
34365
  ], Cover.prototype, "height", void 0);
34366
+ header_decorate([
34367
+ jsonobject_property()
34368
+ ], Cover.prototype, "mobileHeight", void 0);
33870
34369
  header_decorate([
33871
34370
  jsonobject_property()
33872
34371
  ], Cover.prototype, "inheritWidthFrom", void 0);
@@ -33948,6 +34447,7 @@ var header_Cover = /** @class */ (function (_super) {
33948
34447
 
33949
34448
  Serializer.addClass("cover", [
33950
34449
  { name: "height:number", minValue: 0, default: 256 },
34450
+ { name: "mobileHeight:number", minValue: 0, default: 0 },
33951
34451
  { name: "inheritWidthFrom", default: "container" },
33952
34452
  { name: "textAreaWidth:number", minValue: 0, default: 512 },
33953
34453
  { name: "textGlowEnabled:boolean" },
@@ -34638,6 +35138,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34638
35138
  _this.registerPropertyChangedHandlers(["questionStartIndex", "showQuestionNumbers"], function () {
34639
35139
  _this.updateVisibleIndexes();
34640
35140
  });
35141
+ _this.registerPropertyChangedHandlers(["title"], function () {
35142
+ _this.calcHasTextInTitle();
35143
+ });
34641
35144
  _this.dragDropPanelHelper = new drag_drop_panel_helper_v1_DragDropPanelHelperV1(_this);
34642
35145
  return _this;
34643
35146
  }
@@ -34712,10 +35215,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34712
35215
  col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
34713
35216
  });
34714
35217
  };
35218
+ PanelModelBase.prototype.calcHasTextInTitle = function () {
35219
+ this.hasTextInTitle = !!this.title;
35220
+ };
34715
35221
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
34716
35222
  get: function () {
34717
- return ((this.canShowTitle() && this.locTitle.textOrHtml.length > 0) ||
34718
- (this.isDesignMode && (this.showTitle && this.isInteractiveDesignElement && settings.designMode.showEmptyTitles)));
35223
+ return ((this.canShowTitle() && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
35224
+ (this.isDesignMode && !(settings.supportCreatorV2 && this.isPanel) && this.showTitle && settings.designMode.showEmptyTitles));
34719
35225
  },
34720
35226
  enumerable: false,
34721
35227
  configurable: true
@@ -35203,6 +35709,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35203
35709
  * @see questions
35204
35710
  */
35205
35711
  get: function () {
35712
+ base_Base.collectDependency(this, "elements");
35206
35713
  return this.elementsValue;
35207
35714
  },
35208
35715
  enumerable: false,
@@ -35715,6 +36222,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35715
36222
  }
35716
36223
  this.onElementVisibilityChanged(this);
35717
36224
  this.releaseAnimations();
36225
+ this.calcHasTextInTitle();
35718
36226
  };
35719
36227
  PanelModelBase.prototype.onFirstRendering = function () {
35720
36228
  _super.prototype.onFirstRendering.call(this);
@@ -36406,12 +36914,27 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36406
36914
  return this.parent.getQuestionErrorLocation();
36407
36915
  return this.survey ? this.survey.questionErrorLocation : "top";
36408
36916
  };
36917
+ //ITitleOwner
36918
+ PanelModelBase.prototype.getTitleOwner = function () { return this; };
36409
36919
  Object.defineProperty(PanelModelBase.prototype, "no", {
36410
- //ITitleOwner
36411
36920
  get: function () { return ""; },
36412
36921
  enumerable: false,
36413
36922
  configurable: true
36414
36923
  });
36924
+ Object.defineProperty(PanelModelBase.prototype, "cssTitleNumber", {
36925
+ get: function () {
36926
+ return this.cssClasses.panel.number;
36927
+ },
36928
+ enumerable: false,
36929
+ configurable: true
36930
+ });
36931
+ Object.defineProperty(PanelModelBase.prototype, "cssRequiredText", {
36932
+ get: function () {
36933
+ return this.cssClasses.panel.requiredText;
36934
+ },
36935
+ enumerable: false,
36936
+ configurable: true
36937
+ });
36415
36938
  Object.defineProperty(PanelModelBase.prototype, "cssError", {
36416
36939
  get: function () {
36417
36940
  return this.getCssError(this.cssClasses);
@@ -36452,6 +36975,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36452
36975
  panel_decorate([
36453
36976
  jsonobject_property({ defaultValue: true })
36454
36977
  ], PanelModelBase.prototype, "showTitle", void 0);
36978
+ panel_decorate([
36979
+ jsonobject_property({ defaultValue: false })
36980
+ ], PanelModelBase.prototype, "hasTextInTitle", void 0);
36455
36981
  panel_decorate([
36456
36982
  jsonobject_property({ defaultValue: true })
36457
36983
  ], PanelModelBase.prototype, "showDescription", void 0);
@@ -36482,9 +37008,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
36482
37008
  });
36483
37009
  _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
36484
37010
  _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
36485
- _this.registerPropertyChangedHandlers(["title"], function () {
36486
- _this.calcHasTextInTitle();
36487
- });
36488
37011
  return _this;
36489
37012
  }
36490
37013
  PanelModel.prototype.getType = function () {
@@ -36504,37 +37027,15 @@ var panel_PanelModel = /** @class */ (function (_super) {
36504
37027
  }
36505
37028
  return _super.prototype.getSurvey.call(this, live);
36506
37029
  };
36507
- Object.defineProperty(PanelModel.prototype, "hasTextInTitle", {
36508
- get: function () {
36509
- return this.getPropertyValue("hasTextInTitle");
36510
- },
36511
- enumerable: false,
36512
- configurable: true
36513
- });
36514
- PanelModel.prototype.calcHasTextInTitle = function () {
36515
- this.setPropertyValue("hasTextInTitle", !!this.title);
36516
- };
36517
37030
  PanelModel.prototype.onSurveyLoad = function () {
36518
37031
  _super.prototype.onSurveyLoad.call(this);
36519
37032
  this.onIndentChanged();
36520
- this.calcHasTextInTitle();
36521
37033
  };
36522
37034
  PanelModel.prototype.onSetData = function () {
36523
37035
  _super.prototype.onSetData.call(this);
36524
37036
  this.onIndentChanged();
36525
37037
  this.calcHasTextInTitle();
36526
37038
  };
36527
- Object.defineProperty(PanelModel.prototype, "cssHeader", {
36528
- get: function () {
36529
- return new CssClassBuilder()
36530
- .append(this.cssClasses.panel.header)
36531
- .append(this.cssClasses.panel.headerHidden, !this.hasTextInTitle &&
36532
- !this.hasDescription &&
36533
- this.isDesignMode).toString();
36534
- },
36535
- enumerable: false,
36536
- configurable: true
36537
- });
36538
37039
  Object.defineProperty(PanelModel.prototype, "isPanel", {
36539
37040
  get: function () {
36540
37041
  return true;
@@ -36577,7 +37078,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
36577
37078
  enumerable: false,
36578
37079
  configurable: true
36579
37080
  });
36580
- PanelModel.prototype.getTitleOwner = function () { return this; };
36581
37081
  Object.defineProperty(PanelModel.prototype, "showNumber", {
36582
37082
  /**
36583
37083
  * Specifies whether to show the panel number in the title.
@@ -36674,7 +37174,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
36674
37174
  var _this = this;
36675
37175
  var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
36676
37176
  locTitleValue.onGetTextCallback = function (text) {
36677
- if (!text && (_this.state !== "default" || (_this.isDesignMode && _this.isDefaultV2Theme && _this.isInteractiveDesignElement))) {
37177
+ if (!text && (_this.state !== "default")) {
36678
37178
  text = _this.name;
36679
37179
  }
36680
37180
  return text;
@@ -36837,10 +37337,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
36837
37337
  };
36838
37338
  Object.defineProperty(PanelModel.prototype, "cssTitle", {
36839
37339
  get: function () {
36840
- return new CssClassBuilder()
36841
- .append(this.getCssTitle(this.cssClasses.panel))
36842
- .append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
36843
- .toString();
37340
+ return this.getCssTitle(this.cssClasses.panel);
36844
37341
  },
36845
37342
  enumerable: false,
36846
37343
  configurable: true
@@ -37279,11 +37776,6 @@ var page_PageModel = /** @class */ (function (_super) {
37279
37776
  * @see maxTimeToFinish
37280
37777
  */
37281
37778
  _this.timeSpent = 0;
37282
- _this.locTitle.onGetTextCallback = function (text) {
37283
- if (_this.canShowPageNumber() && text)
37284
- return _this.num + ". " + text;
37285
- return text;
37286
- };
37287
37779
  _this.createLocalizableString("navigationDescription", _this, true);
37288
37780
  _this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
37289
37781
  return _this;
@@ -37301,12 +37793,37 @@ var page_PageModel = /** @class */ (function (_super) {
37301
37793
  enumerable: false,
37302
37794
  configurable: true
37303
37795
  });
37796
+ Object.defineProperty(PageModel.prototype, "no", {
37797
+ get: function () {
37798
+ return this.canShowPageNumber() ? this.num + ". " : "";
37799
+ },
37800
+ enumerable: false,
37801
+ configurable: true
37802
+ });
37803
+ Object.defineProperty(PageModel.prototype, "cssTitleNumber", {
37804
+ get: function () {
37805
+ return this.cssClasses.page.number;
37806
+ },
37807
+ enumerable: false,
37808
+ configurable: true
37809
+ });
37810
+ Object.defineProperty(PageModel.prototype, "cssRequiredText", {
37811
+ get: function () {
37812
+ return "";
37813
+ },
37814
+ enumerable: false,
37815
+ configurable: true
37816
+ });
37304
37817
  PageModel.prototype.canShowPageNumber = function () {
37305
37818
  return this.survey && this.survey.showPageNumbers;
37306
37819
  };
37307
37820
  PageModel.prototype.canShowTitle = function () {
37308
37821
  return this.survey && this.survey.showPageTitles;
37309
37822
  };
37823
+ PageModel.prototype.setTitleValue = function (val) {
37824
+ _super.prototype.setTitleValue.call(this, val);
37825
+ this.navigationLocStrChanged();
37826
+ };
37310
37827
  Object.defineProperty(PageModel.prototype, "navigationTitle", {
37311
37828
  /**
37312
37829
  * A caption displayed on a navigation button in the TOC or progress bar. Applies when [`showTOC`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTOC) is `true` or when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar), [`progressBarType`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarType) is set to `"pages"`, and [`progressBarShowPageTitles`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarShowPageTitles) is `true`.
@@ -37891,24 +38408,8 @@ function tryFocusPage(survey, panel) {
37891
38408
  return true;
37892
38409
  }
37893
38410
  function createTOCListModel(survey, onAction) {
37894
- var _a;
37895
- var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
37896
- var items = (pagesSource || []).map(function (page) {
37897
- return new action_Action({
37898
- id: page.name,
37899
- locTitle: page.locNavigationTitle,
37900
- action: function () {
37901
- DomDocumentHelper.activeElementBlur();
37902
- !!onAction && onAction();
37903
- if (page instanceof page_PageModel) {
37904
- return survey.tryNavigateToPage(page);
37905
- }
37906
- return tryFocusPage(survey, page);
37907
- },
37908
- visible: new ComputedUpdater(function () { return page.isVisible && !(page["isStartPage"]); })
37909
- });
37910
- });
37911
- var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0];
38411
+ var items = getTOCItems(survey, onAction);
38412
+ var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items[0];
37912
38413
  var listOptions = {
37913
38414
  items: items,
37914
38415
  onSelectionChanged: function (item) {
@@ -37924,10 +38425,35 @@ function createTOCListModel(survey, onAction) {
37924
38425
  var listModel = new list_ListModel(listOptions);
37925
38426
  listModel.allowSelection = false;
37926
38427
  survey.onCurrentPageChanged.add(function (s, o) {
37927
- listModel.selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
38428
+ listModel.selectedItem = listModel.actions.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
37928
38429
  });
38430
+ survey.registerFunctionOnPropertyValueChanged("pages", function () {
38431
+ listModel.setItems(getTOCItems(survey, onAction));
38432
+ }, "toc");
37929
38433
  return listModel;
37930
38434
  }
38435
+ function getTOCItems(survey, onAction) {
38436
+ var _a;
38437
+ var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
38438
+ var items = (pagesSource || []).map(function (page) {
38439
+ return new action_Action({
38440
+ id: page.name,
38441
+ locTitle: page.locNavigationTitle,
38442
+ action: function () {
38443
+ DomDocumentHelper.activeElementBlur();
38444
+ !!onAction && onAction();
38445
+ if (page instanceof page_PageModel) {
38446
+ return survey.tryNavigateToPage(page);
38447
+ }
38448
+ return tryFocusPage(survey, page);
38449
+ },
38450
+ visible: new ComputedUpdater(function () {
38451
+ return page.isVisible && !(page["isStartPage"]);
38452
+ })
38453
+ });
38454
+ });
38455
+ return items;
38456
+ }
37931
38457
  function getTocRootCss(survey, isMobile) {
37932
38458
  if (isMobile === void 0) { isMobile = false; }
37933
38459
  var rootCss = surveyToc_TOCModel.RootStyle;
@@ -37998,6 +38524,7 @@ var surveyToc_TOCModel = /** @class */ (function () {
37998
38524
  configurable: true
37999
38525
  });
38000
38526
  TOCModel.prototype.dispose = function () {
38527
+ this.survey.unRegisterFunctionOnPropertyValueChanged("pages", "toc");
38001
38528
  this.popupModel.dispose();
38002
38529
  this.listModel.dispose();
38003
38530
  };
@@ -38075,7 +38602,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38075
38602
  *
38076
38603
  * For information on event handler parameters, refer to descriptions within the interface.
38077
38604
  *
38078
- * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle)).
38605
+ * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
38079
38606
  * @see triggers
38080
38607
  * @see runTriggers
38081
38608
  */
@@ -45452,13 +45979,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45452
45979
  return this.processText(options.html, true);
45453
45980
  };
45454
45981
  SurveyModel.prototype.processText = function (text, returnDisplayValue) {
45455
- return this.processTextEx(text, returnDisplayValue, false).text;
45982
+ return this.processTextEx({ text: text, returnDisplayValue: returnDisplayValue, doEncoding: false }).text;
45456
45983
  };
45457
- SurveyModel.prototype.processTextEx = function (text, returnDisplayValue, doEncoding) {
45458
- var res = {
45459
- text: this.processTextCore(text, returnDisplayValue, doEncoding),
45460
- hasAllValuesOnLastRun: true,
45461
- };
45984
+ SurveyModel.prototype.processTextEx = function (params) {
45985
+ var doEncoding = params.doEncoding === undefined ? settings.web.encodeUrlParams : params.doEncoding;
45986
+ var text = params.text;
45987
+ if (params.runAtDesign || !this.isDesignMode) {
45988
+ text = this.textPreProcessor.process(text, params.returnDisplayValue === true, doEncoding);
45989
+ }
45990
+ var res = { text: text, hasAllValuesOnLastRun: true };
45462
45991
  res.hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
45463
45992
  return res;
45464
45993
  };
@@ -45476,12 +46005,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45476
46005
  enumerable: false,
45477
46006
  configurable: true
45478
46007
  });
45479
- SurveyModel.prototype.processTextCore = function (text, returnDisplayValue, doEncoding) {
45480
- if (doEncoding === void 0) { doEncoding = false; }
45481
- if (this.isDesignMode)
45482
- return text;
45483
- return this.textPreProcessor.process(text, returnDisplayValue, doEncoding);
45484
- };
45485
46008
  SurveyModel.prototype.getSurveyMarkdownHtml = function (element, text, name) {
45486
46009
  var options = {
45487
46010
  element: element,
@@ -46813,6 +47336,7 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
46813
47336
 
46814
47337
 
46815
47338
 
47339
+
46816
47340
  /**
46817
47341
  * 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.).
46818
47342
  */
@@ -46850,6 +47374,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46850
47374
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
46851
47375
  _this.onVisibleChanged();
46852
47376
  });
47377
+ _this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
46853
47378
  _this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
46854
47379
  _this.setNewRestfulProperty();
46855
47380
  var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
@@ -46880,6 +47405,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46880
47405
  enumerable: false,
46881
47406
  configurable: true
46882
47407
  });
47408
+ QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
47409
+ var _this = this;
47410
+ var options = {
47411
+ question: this,
47412
+ id: function () { return _this.otherId; },
47413
+ propertyName: "otherValue",
47414
+ className: function () { return _this.cssClasses.other; },
47415
+ placeholder: function () { return _this.otherPlaceholder; },
47416
+ isDisabledAttr: function () { return _this.isInputReadOnly || false; },
47417
+ rows: function () { return _this.commentAreaRows; },
47418
+ maxLength: function () { return _this.getOthersMaxLength(); },
47419
+ autoGrow: function () { return _this.survey && _this.survey.autoGrowComment; },
47420
+ ariaRequired: function () { return _this.ariaRequired || _this.a11y_input_ariaRequired; },
47421
+ ariaLabel: function () { return _this.ariaLabel || _this.a11y_input_ariaLabel; },
47422
+ getTextValue: function () { return _this.otherValue; },
47423
+ onTextAreaChange: function (e) { _this.onOtherValueChange(e); },
47424
+ onTextAreaInput: function (e) { _this.onOtherValueInput(e); },
47425
+ };
47426
+ return options;
47427
+ };
46883
47428
  QuestionSelectBase.prototype.getType = function () {
46884
47429
  return "selectbase";
46885
47430
  };
@@ -47694,7 +48239,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47694
48239
  * }
47695
48240
  * ```
47696
48241
  *
47697
- * To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
48242
+ * To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
47698
48243
  *
47699
48244
  * If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
47700
48245
  *
@@ -47730,7 +48275,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47730
48275
  this.isLockVisibleChoices = !!question && question.name === val;
47731
48276
  if (!!question && question.name !== val) {
47732
48277
  question.removeDependedQuestion(this);
47733
- if (this.isDesignMode && !this.isLoadingFromJson && !!val) {
48278
+ if (this.isInDesignMode && !this.isLoadingFromJson && !!val) {
47734
48279
  this.setPropertyValue("choicesFromQuestion", undefined);
47735
48280
  }
47736
48281
  }
@@ -48077,8 +48622,8 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48077
48622
  };
48078
48623
  Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
48079
48624
  get: function () {
48080
- return settings.showDefaultItemsInCreatorV2 && this.isDesignModeV2 &&
48081
- !this.customWidget && !this.isContentElement;
48625
+ return settings.showDefaultItemsInCreatorV2 && this.isInDesignModeV2 &&
48626
+ !this.customWidget;
48082
48627
  },
48083
48628
  enumerable: false,
48084
48629
  configurable: true
@@ -48204,7 +48749,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48204
48749
  });
48205
48750
  Object.defineProperty(QuestionSelectBase.prototype, "isEmptyActiveChoicesInDesign", {
48206
48751
  get: function () {
48207
- return this.isDesignModeV2 && (this.hasChoicesUrl || this.isMessagePanelVisible);
48752
+ return this.isInDesignModeV2 && (this.hasChoicesUrl || this.isMessagePanelVisible);
48208
48753
  },
48209
48754
  enumerable: false,
48210
48755
  configurable: true
@@ -48244,7 +48789,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48244
48789
  return !!question && question.isValueArray ? question : null;
48245
48790
  };
48246
48791
  QuestionSelectBase.prototype.getChoicesFromArrayQuestion = function (question) {
48247
- if (this.isDesignMode)
48792
+ if (this.isInDesignMode)
48248
48793
  return [];
48249
48794
  var val = question.value;
48250
48795
  if (!Array.isArray(val))
@@ -48269,7 +48814,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48269
48814
  return keys.length > 0 ? keys[0] : undefined;
48270
48815
  };
48271
48816
  QuestionSelectBase.prototype.getChoicesFromSelectQuestion = function (question) {
48272
- if (this.isDesignMode)
48817
+ if (this.isInDesignMode)
48273
48818
  return [];
48274
48819
  var res = [];
48275
48820
  var isSelected = this.choicesFromQuestionMode == "selected"
@@ -48444,7 +48989,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48444
48989
  };
48445
48990
  QuestionSelectBase.prototype.runChoicesByUrl = function () {
48446
48991
  this.updateIsUsingRestful();
48447
- if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isDesignModeV2)
48992
+ if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isInDesignModeV2)
48448
48993
  return;
48449
48994
  var processor = this.surveyImpl
48450
48995
  ? this.surveyImpl.getTextProcessor()
@@ -48612,7 +49157,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48612
49157
  return !choices || choices.length > 0;
48613
49158
  };
48614
49159
  QuestionSelectBase.prototype.sortVisibleChoices = function (array) {
48615
- if (this.isDesignMode)
49160
+ if (this.isInDesignMode)
48616
49161
  return array;
48617
49162
  var order = this.choicesOrder.toLowerCase();
48618
49163
  if (order == "asc")
@@ -48837,10 +49382,13 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48837
49382
  });
48838
49383
  Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
48839
49384
  get: function () {
48840
- var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
49385
+ var count = (this.separateSpecialChoices || this.isInDesignMode) ? this.headItemsCount : 0;
48841
49386
  var res = [];
48842
- for (var i = 0; i < count; i++)
48843
- this.renderedChoices[i] && res.push(this.renderedChoices[i]);
49387
+ for (var i = 0; i < count; i++) {
49388
+ if (this.renderedChoices[i]) {
49389
+ res.push(this.renderedChoices[i]);
49390
+ }
49391
+ }
48844
49392
  return res;
48845
49393
  },
48846
49394
  enumerable: false,
@@ -48848,11 +49396,14 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48848
49396
  });
48849
49397
  Object.defineProperty(QuestionSelectBase.prototype, "footItems", {
48850
49398
  get: function () {
48851
- var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
49399
+ var count = (this.separateSpecialChoices || this.isInDesignMode) ? this.footItemsCount : 0;
48852
49400
  var res = [];
48853
49401
  var items = this.renderedChoices;
48854
- for (var i = 0; i < count; i++)
48855
- this.renderedChoices[items.length - count + i] && res.push(this.renderedChoices[items.length - count + i]);
49402
+ for (var i = 0; i < count; i++) {
49403
+ if (this.renderedChoices[items.length - count + i]) {
49404
+ res.push(this.renderedChoices[items.length - count + i]);
49405
+ }
49406
+ }
48856
49407
  return res;
48857
49408
  },
48858
49409
  enumerable: false,
@@ -48892,7 +49443,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48892
49443
  var columns = [];
48893
49444
  var colCount = this.getCurrentColCount();
48894
49445
  if (this.hasColumns && this.renderedChoices.length > 0) {
48895
- var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isDesignMode) ?
49446
+ var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isInDesignMode) ?
48896
49447
  this.renderedChoices : this.dataChoices;
48897
49448
  if (settings.showItemsInOrder == "column") {
48898
49449
  var prevIndex = 0;
@@ -49079,9 +49630,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
49079
49630
  return classes;
49080
49631
  };
49081
49632
  question_baseselect_decorate([
49082
- jsonobject_property({ onSet: function (newVal, target) {
49633
+ jsonobject_property({
49634
+ onSet: function (newVal, target) {
49083
49635
  target.onSelectedItemValuesChangedHandler(newVal);
49084
- } })
49636
+ }
49637
+ })
49085
49638
  ], QuestionSelectBase.prototype, "selectedItemValues", void 0);
49086
49639
  question_baseselect_decorate([
49087
49640
  jsonobject_property()
@@ -51422,6 +51975,7 @@ var question_matrix_extends = (undefined && undefined.__extends) || (function ()
51422
51975
 
51423
51976
 
51424
51977
 
51978
+
51425
51979
  var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
51426
51980
  question_matrix_extends(MatrixRowModel, _super);
51427
51981
  function MatrixRowModel(item, fullName, data, value) {
@@ -51709,9 +52263,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51709
52263
  _this.onColumnsChanged();
51710
52264
  });
51711
52265
  _this.registerPropertyChangedHandlers(["rows"], function () {
51712
- if (!_this.filterItems()) {
51713
- _this.onRowsChanged();
51714
- }
52266
+ _this.runCondition(_this.getDataFilteredValues(), _this.getDataFilteredProperties());
52267
+ _this.onRowsChanged();
51715
52268
  });
51716
52269
  _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
51717
52270
  _this.updateVisibilityBasedOnRows();
@@ -51881,21 +52434,31 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51881
52434
  }
51882
52435
  return res;
51883
52436
  };
51884
- QuestionMatrixModel.prototype.runItemsCondition = function (values, properties) {
52437
+ QuestionMatrixModel.prototype.runCondition = function (values, properties) {
51885
52438
  itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
51886
- return _super.prototype.runItemsCondition.call(this, values, properties);
52439
+ _super.prototype.runCondition.call(this, values, properties);
52440
+ };
52441
+ QuestionMatrixModel.prototype.createRowsVisibleIfRunner = function () {
52442
+ return !!this.rowsVisibleIf ? new ConditionRunner(this.rowsVisibleIf) : null;
52443
+ };
52444
+ QuestionMatrixModel.prototype.onRowsChanged = function () {
52445
+ this.clearGeneratedRows();
52446
+ _super.prototype.onRowsChanged.call(this);
51887
52447
  };
51888
52448
  QuestionMatrixModel.prototype.getVisibleRows = function () {
52449
+ if (!!this.generatedVisibleRows)
52450
+ return this.generatedVisibleRows;
51889
52451
  var result = new Array();
51890
52452
  var val = this.value;
51891
52453
  if (!val)
51892
52454
  val = {};
51893
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
52455
+ var rows = this.filteredRows || this.rows;
51894
52456
  for (var i = 0; i < rows.length; i++) {
51895
52457
  var row = rows[i];
51896
52458
  if (this.isValueEmpty(row.value))
51897
52459
  continue;
51898
- result.push(this.createMatrixRow(row, this.id + "_" + row.value.toString().replace(/\s/g, "_"), val[row.value]));
52460
+ var rowId = this.id + "_" + row.value.toString().replace(/\s/g, "_");
52461
+ result.push(this.createMatrixRow(row, rowId, val[row.value]));
51899
52462
  }
51900
52463
  this.generatedVisibleRows = result;
51901
52464
  return result;
@@ -51911,6 +52474,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51911
52474
  QuestionMatrixModel.prototype.endLoadingFromJson = function () {
51912
52475
  _super.prototype.endLoadingFromJson.call(this);
51913
52476
  this.rows = this.sortVisibleRows(this.rows);
52477
+ this.onRowsChanged();
52478
+ this.onColumnsChanged();
51914
52479
  };
51915
52480
  QuestionMatrixModel.prototype.isNewValueCorrect = function (val) {
51916
52481
  return helpers_Helpers.isValueObject(val, true);
@@ -52143,11 +52708,47 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
52143
52708
  json["type"] = question.getType();
52144
52709
  return json;
52145
52710
  };
52711
+ QuestionMatrixModel.prototype.clearIncorrectValues = function () {
52712
+ this.clearInvisibleValuesInRowsAndColumns(true, true, true);
52713
+ _super.prototype.clearIncorrectValues.call(this);
52714
+ };
52146
52715
  QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function (reason) {
52147
52716
  _super.prototype.clearValueIfInvisibleCore.call(this, reason);
52148
- if (this.hasRows) {
52149
- this.clearInvisibleValuesInRows();
52717
+ this.clearInvisibleValuesInRowsAndColumns(true, true, false);
52718
+ };
52719
+ QuestionMatrixModel.prototype.clearInvisibleColumnValues = function () {
52720
+ this.clearInvisibleValuesInRowsAndColumns(false, true, false);
52721
+ };
52722
+ QuestionMatrixModel.prototype.clearInvisibleValuesInRows = function () {
52723
+ this.clearInvisibleValuesInRowsAndColumns(true, false, false);
52724
+ };
52725
+ QuestionMatrixModel.prototype.clearInvisibleValuesInRowsAndColumns = function (inRows, inColumns, inCorrectRows) {
52726
+ if (this.isEmpty())
52727
+ return;
52728
+ var updatedData = this.getUnbindValue(this.value);
52729
+ var newData = {};
52730
+ var rows = this.rows;
52731
+ for (var i = 0; i < rows.length; i++) {
52732
+ var key = rows[i].value;
52733
+ if (!!updatedData[key]) {
52734
+ if (inRows && !rows[i].isVisible || inColumns && !this.getVisibleColumnByValue(updatedData[key])) {
52735
+ delete updatedData[key];
52736
+ }
52737
+ else {
52738
+ newData[key] = updatedData[key];
52739
+ }
52740
+ }
52741
+ }
52742
+ if (inCorrectRows) {
52743
+ updatedData = newData;
52150
52744
  }
52745
+ if (this.isTwoValueEquals(updatedData, this.value))
52746
+ return;
52747
+ this.value = updatedData;
52748
+ };
52749
+ QuestionMatrixModel.prototype.getVisibleColumnByValue = function (val) {
52750
+ var col = itemvalue_ItemValue.getItemByValue(this.columns, val);
52751
+ return !!col && col.isVisible ? col : null;
52151
52752
  };
52152
52753
  QuestionMatrixModel.prototype.getFirstInputElementId = function () {
52153
52754
  var rows = this.generatedVisibleRows;
@@ -53053,6 +53654,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
53053
53654
  }
53054
53655
  var valName = this.getValidatorTitle();
53055
53656
  var emailValidator = new EmailValidator();
53657
+ emailValidator.errorOwner = this;
53056
53658
  if (this.inputType === "email" &&
53057
53659
  !this.validators.some(function (v) { return v.getType() === "emailvalidator"; })) {
53058
53660
  var validateResult = emailValidator.validate(this.value, valName);
@@ -54168,7 +54770,7 @@ var question_multipletext_QuestionMultipleTextModel = /** @class */ (function (_
54168
54770
  * }
54169
54771
  * ```
54170
54772
  *
54171
- * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
54773
+ * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
54172
54774
  * @see itemTitleWidth
54173
54775
  * @see addItem
54174
54776
  */
@@ -56683,19 +57285,31 @@ var choices_DragDropChoices = /** @class */ (function (_super) {
56683
57285
  return false;
56684
57286
  return true;
56685
57287
  };
56686
- DragDropChoices.prototype.calculateIsBottom = function (clientY) {
56687
- var choices = this.getVisibleChoices();
56688
- return (choices.indexOf(this.dropTarget) - choices.indexOf(this.draggedElement) >
56689
- 0);
57288
+ DragDropChoices.prototype.isDropTargetDoesntChanged = function (newIsBottom) {
57289
+ return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom);
57290
+ };
57291
+ DragDropChoices.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
57292
+ var rect = dropTargetNode.getBoundingClientRect();
57293
+ return clientY >= rect.y + rect.height / 2;
56690
57294
  };
56691
57295
  DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
56692
- if (this.isDropTargetDoesntChanged(this.isBottom))
56693
- return;
57296
+ //if (this.isDropTargetDoesntChanged(this.isBottom)) return;
56694
57297
  var choices = this.getVisibleChoices();
56695
57298
  var dropTargetIndex = choices.indexOf(this.dropTarget);
56696
57299
  var draggedElementIndex = choices.indexOf(this.draggedElement);
56697
- choices.splice(draggedElementIndex, 1);
56698
- choices.splice(dropTargetIndex, 0, this.draggedElement);
57300
+ if (draggedElementIndex < dropTargetIndex && this.isBottom === true) {
57301
+ // drag "down"
57302
+ choices.splice(draggedElementIndex, 1);
57303
+ choices.splice(dropTargetIndex, 0, this.draggedElement);
57304
+ }
57305
+ else if (draggedElementIndex > dropTargetIndex && this.isBottom === false) {
57306
+ // drag "up"
57307
+ choices.splice(dropTargetIndex, 1);
57308
+ choices.splice(draggedElementIndex, 0, this.dropTarget);
57309
+ }
57310
+ else {
57311
+ return;
57312
+ }
56699
57313
  if (this.parentElement.getType() === "imagepicker")
56700
57314
  return;
56701
57315
  if (draggedElementIndex !== dropTargetIndex) {
@@ -56855,10 +57469,9 @@ var ranking_choices_DragDropRankingChoices = /** @class */ (function (_super) {
56855
57469
  };
56856
57470
  DragDropRankingChoices.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
56857
57471
  if (this.dropTarget instanceof itemvalue_ItemValue && this.draggedElement !== this.dropTarget) {
56858
- var rect = dropTargetNode.getBoundingClientRect();
56859
- return clientY >= rect.y + rect.height / 2;
57472
+ return _super.prototype.calculateIsBottom.call(this, clientY, dropTargetNode);
56860
57473
  }
56861
- return _super.prototype.calculateIsBottom.call(this, clientY);
57474
+ return false;
56862
57475
  };
56863
57476
  DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
56864
57477
  var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
@@ -57216,6 +57829,7 @@ var question_ranking_QuestionRankingModel = /** @class */ (function (_super) {
57216
57829
  .append(this.cssClasses.rootSelectToRankEmptyValueMod, this.isEmpty())
57217
57830
  .append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal")
57218
57831
  .append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "vertical")
57832
+ .append(this.cssClasses.rootSelectToRankSwapAreas, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal" && this.selectToRankSwapAreas)
57219
57833
  .toString();
57220
57834
  },
57221
57835
  enumerable: false,
@@ -57637,6 +58251,16 @@ var question_ranking_QuestionRankingModel = /** @class */ (function (_super) {
57637
58251
  enumerable: false,
57638
58252
  configurable: true
57639
58253
  });
58254
+ Object.defineProperty(QuestionRankingModel.prototype, "selectToRankSwapAreas", {
58255
+ get: function () {
58256
+ return this.getPropertyValue("selectToRankSwapAreas", false);
58257
+ },
58258
+ set: function (val) {
58259
+ this.setPropertyValue("selectToRankSwapAreas", val);
58260
+ },
58261
+ enumerable: false,
58262
+ configurable: true
58263
+ });
57640
58264
  Object.defineProperty(QuestionRankingModel.prototype, "selectToRankAreasLayout", {
57641
58265
  /**
57642
58266
  * Specifies the layout of the ranked and unranked areas. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
@@ -57766,6 +58390,13 @@ Serializer.addClass("ranking", [
57766
58390
  visible: true,
57767
58391
  isSerializable: true,
57768
58392
  },
58393
+ {
58394
+ name: "selectToRankSwapAreas:switch",
58395
+ default: false,
58396
+ visible: false,
58397
+ isSerializable: true,
58398
+ dependsOn: "selectToRankEnabled",
58399
+ },
57769
58400
  {
57770
58401
  name: "selectToRankAreasLayout",
57771
58402
  default: "horizontal",
@@ -57842,6 +58473,8 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
57842
58473
 
57843
58474
 
57844
58475
 
58476
+
58477
+
57845
58478
  /**
57846
58479
  * A class that describes the Long Text question type.
57847
58480
  *
@@ -57849,9 +58482,46 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
57849
58482
  */
57850
58483
  var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
57851
58484
  question_comment_extends(QuestionCommentModel, _super);
57852
- function QuestionCommentModel() {
57853
- return _super !== null && _super.apply(this, arguments) || this;
58485
+ function QuestionCommentModel(name) {
58486
+ var _this_1 = _super.call(this, name) || this;
58487
+ _this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
58488
+ return _this_1;
57854
58489
  }
58490
+ QuestionCommentModel.prototype.getTextAreaOptions = function () {
58491
+ var _this_1 = this;
58492
+ var _this = this;
58493
+ var updateQuestionValue = function (newValue) {
58494
+ if (!helpers_Helpers.isTwoValueEquals(_this.value, newValue, false, true, false)) {
58495
+ _this.value = newValue;
58496
+ }
58497
+ };
58498
+ var options = {
58499
+ question: this,
58500
+ id: function () { return _this_1.inputId; },
58501
+ propertyName: "value",
58502
+ className: function () { return _this_1.className; },
58503
+ placeholder: function () { return _this_1.renderedPlaceholder; },
58504
+ isDisabledAttr: function () { return _this_1.isDisabledAttr; },
58505
+ isReadOnlyAttr: function () { return _this_1.isReadOnlyAttr; },
58506
+ autoGrow: function () { return _this_1.renderedAutoGrow; },
58507
+ maxLength: function () { return _this_1.getMaxLength(); },
58508
+ rows: function () { return _this_1.rows; },
58509
+ cols: function () { return _this_1.cols; },
58510
+ ariaRequired: function () { return _this_1.a11y_input_ariaRequired; },
58511
+ ariaLabel: function () { return _this_1.a11y_input_ariaLabel; },
58512
+ ariaLabelledBy: function () { return _this_1.a11y_input_ariaLabelledBy; },
58513
+ ariaDescribedBy: function () { return _this_1.a11y_input_ariaDescribedBy; },
58514
+ ariaInvalid: function () { return _this_1.a11y_input_ariaInvalid; },
58515
+ ariaErrormessage: function () { return _this_1.a11y_input_ariaErrormessage; },
58516
+ getTextValue: function () { return _this_1.value; },
58517
+ onTextAreaChange: function (e) { updateQuestionValue(e.target.value); },
58518
+ onTextAreaInput: function (event) { _this_1.onInput(event); },
58519
+ onTextAreaKeyDown: function (event) { _this_1.onKeyDown(event); },
58520
+ onTextAreaFocus: function (event) { _this_1.onFocus(event); },
58521
+ onTextAreaBlur: function (event) { _this_1.onBlur(event); }
58522
+ };
58523
+ return options;
58524
+ };
57855
58525
  Object.defineProperty(QuestionCommentModel.prototype, "rows", {
57856
58526
  /**
57857
58527
  * Specifies the visible height of the comment area, measured in lines.
@@ -57957,9 +58627,9 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
57957
58627
  _super.prototype.afterRenderQuestionElement.call(this, el);
57958
58628
  };
57959
58629
  QuestionCommentModel.prototype.updateElement = function () {
57960
- var _this = this;
58630
+ var _this_1 = this;
57961
58631
  if (this.element && this.renderedAutoGrow) {
57962
- setTimeout(function () { return increaseHeightByContent(_this.element); }, 1);
58632
+ setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
57963
58633
  }
57964
58634
  };
57965
58635
  QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
@@ -60080,7 +60750,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60080
60750
  *
60081
60751
  * If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
60082
60752
  *
60083
- * To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
60753
+ * To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
60084
60754
  *
60085
60755
  * If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
60086
60756
  *
@@ -64724,8 +65394,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64724
65394
  value = [];
64725
65395
  if (value.length == this.panelCount)
64726
65396
  return;
64727
- for (var i = value.length; i < this.panelCount; i++)
64728
- value.push({});
65397
+ for (var i = value.length; i < this.panelCount; i++) {
65398
+ var panelValue = this.panels[i].getValue();
65399
+ var val = !helpers_Helpers.isValueEmpty(panelValue) ? panelValue : {};
65400
+ value.push(val);
65401
+ }
64729
65402
  if (value.length > this.panelCount) {
64730
65403
  value.splice(this.panelCount, value.length - this.panelCount);
64731
65404
  }
@@ -69446,8 +70119,8 @@ Serializer.addClass("currencymask", [
69446
70119
 
69447
70120
  var Version;
69448
70121
  var ReleaseDate;
69449
- Version = "" + "1.12.1";
69450
- ReleaseDate = "" + "2024-09-10";
70122
+ Version = "" + "1.12.3";
70123
+ ReleaseDate = "" + "2024-09-24";
69451
70124
  function checkLibraryVersion(ver, libraryName) {
69452
70125
  if (Version != ver) {
69453
70126
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -69612,6 +70285,7 @@ function checkPrefix(prefix) {
69612
70285
 
69613
70286
 
69614
70287
 
70288
+
69615
70289
 
69616
70290
 
69617
70291
  //Uncomment to include the "date" question type.
@@ -70147,6 +70821,7 @@ var defaultStandardCss = {
70147
70821
  rootSelectToRankMod: "sv-ranking--select-to-rank",
70148
70822
  rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
70149
70823
  rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
70824
+ rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
70150
70825
  item: "sv-ranking-item",
70151
70826
  itemContent: "sv-ranking-item__content",
70152
70827
  itemIndex: "sv-ranking-item__index",
@@ -70506,6 +71181,7 @@ var modernCss = {
70506
71181
  page: {
70507
71182
  root: "sv-page sv-body__page",
70508
71183
  title: "sv-title sv-page__title",
71184
+ number: "sv-page__num",
70509
71185
  description: "sv-description sv-page__description",
70510
71186
  },
70511
71187
  pageTitle: "sv-title sv-page__title",
@@ -70580,6 +71256,7 @@ var modernCss = {
70580
71256
  rootSelectToRankMod: "sv-ranking--select-to-rank",
70581
71257
  rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
70582
71258
  rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
71259
+ rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
70583
71260
  item: "sv-ranking-item",
70584
71261
  itemContent: "sv-ranking-item__content",
70585
71262
  itemIndex: "sv-ranking-item__index",
@@ -71470,6 +72147,7 @@ var cssbootstrapmaterial_defaultCss = {
71470
72147
  rootSelectToRankMod: "sv-ranking--select-to-rank",
71471
72148
  rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
71472
72149
  rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
72150
+ rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
71473
72151
  item: "sv-ranking-item",
71474
72152
  itemContent: "sv-ranking-item__content",
71475
72153
  itemIndex: "sv-ranking-item__index",
@@ -75156,43 +75834,43 @@ var japaneseSurveyStrings = {
75156
75834
  otherItemText: "その他(説明)",
75157
75835
  noneItemText: "なし",
75158
75836
  refuseItemText: "回答を拒否する",
75159
- dontKnowItemText: "わかりません",
75837
+ dontKnowItemText: "わからない",
75160
75838
  selectAllItemText: "すべて選択",
75161
- progressText: "{0}/{1}",
75839
+ progressText: "ページ{0}/{1}",
75162
75840
  indexText: "{1}の{0}",
75163
75841
  panelDynamicProgressText: "{1}の{0}を記録する",
75164
75842
  panelDynamicTabTextFormat: "Panel {panelIndex}",
75165
- questionsProgressText: "{0}/{1}の質問に回答しました。",
75166
- emptySurvey: "この調査に表示できるページや質問はありません",
75167
- completingSurvey: "調査を完了してくれてありがとうございました",
75168
- completingSurveyBefore: "当社の記録によると、この調査はすでに完了しています。",
75169
- loadingSurvey: "調査をダウンロード中",
75843
+ questionsProgressText: "{0}/{1}問回答済",
75844
+ emptySurvey: "アンケートに表示可能な要素がありません。",
75845
+ completingSurvey: "アンケートにご協力いただき、ありがとうございます。",
75846
+ completingSurveyBefore: "このアンケートはすでに回答済みです。",
75847
+ loadingSurvey: "アンケートを読み込んでいます...",
75170
75848
  placeholder: "選択",
75171
- ratingOptionsCaption: "選ぶ。。。",
75172
- value: "値打ち",
75173
- requiredError: "質問にお答え下さい",
75174
- requiredErrorInPanel: "最低でも1つの質問に答えてください。",
75175
- requiredInAllRowsError: "質問には全列で回答してください。",
75176
- eachRowUniqueError: "各行には一意の値が必要です。",
75849
+ ratingOptionsCaption: "選択。。。",
75850
+ value: "",
75851
+ requiredError: "回答が必要です",
75852
+ requiredErrorInPanel: "回答が必要です:少なくとも1つの質問に答えてください。",
75853
+ requiredInAllRowsError: "回答が必要です:すべての行の質問に答えてください。",
75854
+ eachRowUniqueError: "各行に一意の値を入力してください。",
75177
75855
  numericError: "数字でご記入下さい",
75178
- minError: "値は {0} 値より小さくすることはできません",
75179
- maxError: "値は {0} を超えてはなりません。",
75180
- textMinLength: "{0} 文字以上で入力して下さい",
75181
- textMaxLength: "{0}文字以下で入力してください。",
75182
- textMinMaxLength: "{0}以上{1}未満の文字を入力してください。",
75183
- minRowCountError: "{0}行以上で入力して下さい",
75184
- minSelectError: "{0}種類以上を選択して下さい",
75185
- maxSelectError: "{0}以上のバリアントを選択しないでください。",
75186
- numericMinMax: "{0}は{1}以上であり、{2}以下であることが望ましい。",
75187
- numericMin: "'{0}' は同等か{1}より大きくなければなりません",
75188
- numericMax: "'{0}' は同等か{1}より小さくなければなりません",
75189
- invalidEmail: "有効なメールアドレスをご記入下さい",
75190
- invalidExpression: "式は {0}は'true'を返すべきです。",
75856
+ minError: "値は {0} 以上である必要があります",
75857
+ maxError: "値は {0} 以下である必要があります",
75858
+ textMinLength: "少なくとも {0} 文字を入力してください。",
75859
+ textMaxLength: "{0} 文字以内で入力してください。",
75860
+ textMinMaxLength: "{0} 文字以上 {1} 文字以内で入力してください。",
75861
+ minRowCountError: "少なくとも {0} 行を入力してください。",
75862
+ minSelectError: "少なくとも {0} 個のオプションを選択してください。",
75863
+ maxSelectError: "{0} 個以下の選択肢を選択してください。",
75864
+ numericMinMax: "'{0}' {1} 以上 {2} 以下である必要があります",
75865
+ numericMin: "'{0}' {1} 以上である必要があります",
75866
+ numericMax: "'{0}' {1} 以下である必要があります",
75867
+ invalidEmail: "有効なメールアドレスを入力してください。",
75868
+ invalidExpression: "式: {0} 'true' を返す必要があります。",
75191
75869
  urlRequestError: "リクエストはエラー '{0}' を返しました。{1}",
75192
75870
  urlGetChoicesError: "リクエストが空のデータを返したか、'path' プロパティが正しくありません。",
75193
75871
  exceedMaxSize: "ファイルのサイズは{0}を超えてはいけません",
75194
75872
  noUploadFilesHandler: "ファイルはアップロードできません。「onUploadFiles」イベントのハンドラーを追加してください。",
75195
- otherRequiredError: "その他の値を入力してください。",
75873
+ otherRequiredError: "回答が必要です:他の値を入力してください。",
75196
75874
  uploadingFile: "ファイルをアップロード中です。しばらくしてから再度お試し下さい",
75197
75875
  loadingFile: "読み込み中",
75198
75876
  chooseFile: "ファイルを選択",
@@ -75202,20 +75880,20 @@ var japaneseSurveyStrings = {
75202
75880
  keyDuplicationError: "この値は一意でなければなりません。",
75203
75881
  addColumn: "列の追加",
75204
75882
  addRow: "追加行",
75205
- removeRow: "除去",
75206
- emptyRowsText: "行はありません。",
75883
+ removeRow: "削除",
75884
+ emptyRowsText: "行がありません。",
75207
75885
  addPanel: "新規追加",
75208
- removePanel: "除去",
75886
+ removePanel: "削除",
75209
75887
  showDetails: "詳細を表示",
75210
- hideDetails: "詳細を隠す",
75211
- choices_Item: "品目",
75212
- matrix_column: "コラム",
75888
+ hideDetails: "詳細を非表示",
75889
+ choices_Item: "項目",
75890
+ matrix_column: "",
75213
75891
  matrix_row: "行",
75214
75892
  multipletext_itemname: "テキスト",
75215
- savingData: "結果はサーバーに保存されています...。",
75893
+ savingData: "結果を保存中...。",
75216
75894
  savingDataError: "エラーが発生し、結果を保存できませんでした。",
75217
- savingDataSuccess: "結果は無事に保存されました",
75218
- savingExceedSize: "回答は 64 KB を超えています。ファイルのサイズを小さくしてもう一度お試しいただくか、アンケートの所有者にお問い合わせください。",
75895
+ savingDataSuccess: "結果が正常に保存されました",
75896
+ savingExceedSize: "回答は 64 KB を超えています。ファイルのサイズを小さくしてもう一度お試しいただくか、アンケートの作成者にお問い合わせください。",
75219
75897
  saveAgainButton: "もう一度試してみてください。",
75220
75898
  timerMin: "僅少",
75221
75899
  timerSec: "セック",
@@ -75230,23 +75908,23 @@ var japaneseSurveyStrings = {
75230
75908
  signaturePlaceHolderReadOnly: "署名なし",
75231
75909
  chooseFileCaption: "ファイルを選択",
75232
75910
  takePhotoCaption: "写真を撮る",
75233
- photoPlaceholder: "下のボタンをクリックして、カメラを使用して写真を撮ります。",
75234
- fileOrPhotoPlaceholder: "アップロードするファイルをドラッグアンドドロップまたは選択するか、カメラを使用して写真を撮ります。",
75235
- replaceFileCaption: "ファイルの置換",
75911
+ photoPlaceholder: "下のボタンをクリックしてカメラで写真を撮影してください。",
75912
+ fileOrPhotoPlaceholder: "ファイルをドラッグ&ドロップまたは選択してアップロードするか、カメラで写真を撮影してください。",
75913
+ replaceFileCaption: "ファイルを置換",
75236
75914
  removeFileCaption: "このファイルを削除",
75237
- booleanCheckedLabel: "",
75238
- booleanUncheckedLabel: "",
75915
+ booleanCheckedLabel: "はい",
75916
+ booleanUncheckedLabel: "いいえ",
75239
75917
  confirmRemoveFile: "このファイルを削除してもよろしいですか?{0}?",
75240
75918
  confirmRemoveAllFiles: "すべてのファイルを削除してもよろしいですか?",
75241
- questionTitlePatternText: "質問名",
75919
+ questionTitlePatternText: "質問のタイトル",
75242
75920
  modalCancelButtonText: "キャンセル",
75243
75921
  modalApplyButtonText: "申し込む",
75244
75922
  filterStringPlaceholder: "検索するタイプ...",
75245
75923
  emptyMessage: "表示するデータがありません",
75246
75924
  noEntriesText: "エントリはまだありません。\n下のボタンをクリックして、新しいエントリを追加します。",
75247
75925
  noEntriesReadonlyText: "エントリはありません。",
75248
- tabTitlePlaceholder: "新規パネル",
75249
- more: "もっとその",
75926
+ tabTitlePlaceholder: "新しいパネル",
75927
+ more: "続きを見る",
75250
75928
  tagboxDoneButtonCaption: "わかりました",
75251
75929
  selectToRankEmptyRankedAreaText: "すべての選択肢がランク付けされます",
75252
75930
  selectToRankEmptyUnrankedAreaText: "ここに選択肢をドラッグアンドドロップしてランク付けします",
@@ -80630,28 +81308,27 @@ var title_content_TitleContent = /** @class */ (function (_super) {
80630
81308
  };
80631
81309
  var spans = [];
80632
81310
  if (element.isRequireTextOnStart) {
80633
- spans.push(this.renderRequireText(element, cssClasses));
81311
+ spans.push(this.renderRequireText(element));
80634
81312
  spans.push(getSpaceSpan("req-sp"));
80635
81313
  }
80636
81314
  var questionNumber = element.no;
80637
81315
  if (questionNumber) {
80638
- var panelNumber = !!cssClasses.panel ? cssClasses.panel.number : undefined;
80639
- spans.push(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { "data-key": "q_num", key: "q_num", className: cssClasses.number || panelNumber, style: { position: "static" }, "aria-hidden": true }, questionNumber));
81316
+ spans.push(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { "data-key": "q_num", key: "q_num", className: element.cssTitleNumber, style: { position: "static" }, "aria-hidden": true }, questionNumber));
80640
81317
  spans.push(getSpaceSpan("num-sp"));
80641
81318
  }
80642
81319
  if (element.isRequireTextBeforeTitle) {
80643
- spans.push(this.renderRequireText(element, cssClasses));
81320
+ spans.push(this.renderRequireText(element));
80644
81321
  spans.push(getSpaceSpan("req-sp"));
80645
81322
  }
80646
81323
  spans.push(reactquestion_element_SurveyElementBase.renderLocString(element.locTitle, null, "q_title"));
80647
81324
  if (element.isRequireTextAfterTitle) {
80648
81325
  spans.push(getSpaceSpan("req-sp"));
80649
- spans.push(this.renderRequireText(element, cssClasses));
81326
+ spans.push(this.renderRequireText(element));
80650
81327
  }
80651
81328
  return spans;
80652
81329
  };
80653
- TitleContent.prototype.renderRequireText = function (element, cssClasses) {
80654
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { "data-key": "req-text", key: "req-text", className: cssClasses.requiredText || cssClasses.panel.requiredText, "aria-hidden": true }, element.requiredText));
81330
+ TitleContent.prototype.renderRequireText = function (element) {
81331
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { "data-key": "req-text", key: "req-text", className: element.cssRequiredText, "aria-hidden": true }, element.requiredText));
80655
81332
  };
80656
81333
  return TitleContent;
80657
81334
  }(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component));
@@ -80827,6 +81504,56 @@ ReactElementFactory.Instance.registerElement("sv-character-counter", function (p
80827
81504
  return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(character_counter_CharacterCounterComponent, props);
80828
81505
  });
80829
81506
 
81507
+ // CONCATENATED MODULE: ./packages/survey-react-ui/src/components/text-area.tsx
81508
+ var text_area_extends = (undefined && undefined.__extends) || (function () {
81509
+ var extendStatics = function (d, b) {
81510
+ extendStatics = Object.setPrototypeOf ||
81511
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
81512
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
81513
+ return extendStatics(d, b);
81514
+ };
81515
+ return function (d, b) {
81516
+ if (typeof b !== "function" && b !== null)
81517
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
81518
+ extendStatics(d, b);
81519
+ function __() { this.constructor = d; }
81520
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
81521
+ };
81522
+ })();
81523
+
81524
+
81525
+
81526
+ var text_area_TextAreaComponent = /** @class */ (function (_super) {
81527
+ text_area_extends(TextAreaComponent, _super);
81528
+ function TextAreaComponent(props) {
81529
+ var _this = _super.call(this, props) || this;
81530
+ _this.initialValue = _this.viewModel.getTextValue() || "";
81531
+ return _this;
81532
+ }
81533
+ Object.defineProperty(TextAreaComponent.prototype, "viewModel", {
81534
+ get: function () {
81535
+ return this.props.viewModel;
81536
+ },
81537
+ enumerable: false,
81538
+ configurable: true
81539
+ });
81540
+ TextAreaComponent.prototype.canRender = function () {
81541
+ return !!this.viewModel.question;
81542
+ };
81543
+ TextAreaComponent.prototype.renderElement = function () {
81544
+ var _this = this;
81545
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: function (textarea) { return (_this.viewModel.setElement(textarea)); }, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: function (event) { _this.viewModel.onTextAreaInput(event); }, onFocus: function (event) { _this.viewModel.onTextAreaFocus(event); }, onBlur: function (event) { _this.viewModel.onTextAreaBlur(event); }, onKeyDown: function (event) { _this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
81546
+ };
81547
+ TextAreaComponent.prototype.componentWillUnmount = function () {
81548
+ this.viewModel.dispose();
81549
+ };
81550
+ return TextAreaComponent;
81551
+ }(reactquestion_element_SurveyElementBase));
81552
+
81553
+ ReactElementFactory.Instance.registerElement("sv-text-area", function (props) {
81554
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(text_area_TextAreaComponent, props);
81555
+ });
81556
+
80830
81557
  // CONCATENATED MODULE: ./packages/survey-react-ui/src/reactquestion_comment.tsx
80831
81558
  var reactquestion_comment_extends = (undefined && undefined.__extends) || (function () {
80832
81559
  var extendStatics = function (d, b) {
@@ -80853,31 +81580,21 @@ var reactquestion_comment_SurveyQuestionComment = /** @class */ (function (_supe
80853
81580
  function SurveyQuestionComment(props) {
80854
81581
  return _super.call(this, props) || this;
80855
81582
  }
81583
+ SurveyQuestionComment.prototype.renderCharacterCounter = function () {
81584
+ var counter = null;
81585
+ if (!!this.question.getMaxLength()) {
81586
+ counter = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](character_counter_CharacterCounterComponent, { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter });
81587
+ }
81588
+ return counter;
81589
+ };
80856
81590
  SurveyQuestionComment.prototype.renderElement = function () {
80857
- var _this = this;
80858
- var onBlur = function (e) {
80859
- if (!_this.question.isInputTextUpdate) {
80860
- _this.updateValueOnEvent(e);
80861
- }
80862
- _this.question.onBlur(e);
80863
- };
80864
- var onInput = function (event) {
80865
- if (_this.question.isInputTextUpdate) {
80866
- _this.updateValueOnEvent(event);
80867
- }
80868
- else {
80869
- _this.question.updateElement();
80870
- }
80871
- var newValue = event.target.value;
80872
- _this.question.updateRemainingCharacterCounter(newValue);
80873
- };
80874
- var placeholder = this.question.renderedPlaceholder;
80875
81591
  if (this.question.isReadOnlyRenderDiv()) {
80876
81592
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", null, this.question.value);
80877
81593
  }
80878
- var counter = !!this.question.getMaxLength() ? (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](character_counter_CharacterCounterComponent, { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
81594
+ var counter = this.renderCharacterCounter();
81595
+ var textAreaModel = this.props.question.textAreaModel;
80879
81596
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null,
80880
- external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, ref: function (textarea) { return (_this.setControl(textarea)); }, maxLength: this.question.getMaxLength(), placeholder: placeholder, onFocus: function (event) { _this.question.onFocus(event); }, onBlur: onBlur, onInput: onInput, onKeyDown: function (event) { _this.question.onKeyDown(event); }, cols: this.question.cols, rows: this.question.rows, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, style: { resize: this.question.resizeStyle } }),
81597
+ external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](text_area_TextAreaComponent, { viewModel: textAreaModel }),
80881
81598
  counter));
80882
81599
  };
80883
81600
  return SurveyQuestionComment;
@@ -80887,61 +81604,22 @@ var reactquestion_comment_SurveyQuestionCommentItem = /** @class */ (function (_
80887
81604
  reactquestion_comment_extends(SurveyQuestionCommentItem, _super);
80888
81605
  function SurveyQuestionCommentItem(props) {
80889
81606
  var _this = _super.call(this, props) || this;
80890
- _this.state = { comment: _this.getComment() || "" };
81607
+ _this.textAreaModel = _this.getTextAreaModel();
80891
81608
  return _this;
80892
81609
  }
80893
- SurveyQuestionCommentItem.prototype.componentDidUpdate = function (prevProps, prevState) {
80894
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
80895
- this.updateDomElement();
80896
- };
80897
- SurveyQuestionCommentItem.prototype.componentDidMount = function () {
80898
- _super.prototype.componentDidMount.call(this);
80899
- this.updateDomElement();
80900
- };
80901
- SurveyQuestionCommentItem.prototype.updateDomElement = function () {
80902
- if (!!this.control) {
80903
- var control = this.control;
80904
- var newValue = this.getComment() || "";
80905
- if (!helpers_Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
80906
- control.value = newValue;
80907
- }
80908
- }
80909
- };
80910
- SurveyQuestionCommentItem.prototype.setControl = function (element) {
80911
- if (!!element) {
80912
- this.control = element;
80913
- }
80914
- };
80915
81610
  SurveyQuestionCommentItem.prototype.canRender = function () {
80916
81611
  return !!this.props.question;
80917
81612
  };
80918
- SurveyQuestionCommentItem.prototype.onCommentChange = function (event) {
80919
- this.props.question.onCommentChange(event);
80920
- };
80921
- SurveyQuestionCommentItem.prototype.onCommentInput = function (event) {
80922
- this.props.question.onCommentInput(event);
80923
- };
80924
- SurveyQuestionCommentItem.prototype.getComment = function () {
80925
- return this.props.question.comment;
80926
- };
80927
- SurveyQuestionCommentItem.prototype.setComment = function (value) {
80928
- this.props.question.comment = value;
80929
- };
80930
- SurveyQuestionCommentItem.prototype.getId = function () {
80931
- return this.props.question.commentId;
80932
- };
80933
- SurveyQuestionCommentItem.prototype.getPlaceholder = function () {
80934
- return this.props.question.renderedCommentPlaceholder;
81613
+ SurveyQuestionCommentItem.prototype.getTextAreaModel = function () {
81614
+ return this.props.question.commentTextAreaModel;
80935
81615
  };
80936
81616
  SurveyQuestionCommentItem.prototype.renderElement = function () {
80937
- var _this = this;
80938
81617
  var question = this.props.question;
80939
- var className = this.props.otherCss || this.cssClasses.comment;
80940
81618
  if (question.isReadOnlyRenderDiv()) {
80941
- var comment = this.getComment() || "";
81619
+ var comment = this.textAreaModel.getTextValue() || "";
80942
81620
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", null, comment);
80943
81621
  }
80944
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("textarea", { id: this.getId(), className: className, ref: function (textarea) { return (_this.setControl(textarea)); }, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), rows: question.commentAreaRows, placeholder: this.getPlaceholder(), onBlur: function (e) { _this.onCommentChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
81622
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](text_area_TextAreaComponent, { viewModel: this.textAreaModel }));
80945
81623
  };
80946
81624
  return SurveyQuestionCommentItem;
80947
81625
  }(ReactSurveyElement));
@@ -80951,23 +81629,8 @@ var SurveyQuestionOtherValueItem = /** @class */ (function (_super) {
80951
81629
  function SurveyQuestionOtherValueItem() {
80952
81630
  return _super !== null && _super.apply(this, arguments) || this;
80953
81631
  }
80954
- SurveyQuestionOtherValueItem.prototype.onCommentChange = function (event) {
80955
- this.props.question.onOtherValueChange(event);
80956
- };
80957
- SurveyQuestionOtherValueItem.prototype.onCommentInput = function (event) {
80958
- this.props.question.onOtherValueInput(event);
80959
- };
80960
- SurveyQuestionOtherValueItem.prototype.getComment = function () {
80961
- return this.props.question.otherValue;
80962
- };
80963
- SurveyQuestionOtherValueItem.prototype.setComment = function (value) {
80964
- this.props.question.otherValue = value;
80965
- };
80966
- SurveyQuestionOtherValueItem.prototype.getId = function () {
80967
- return this.props.question.otherId;
80968
- };
80969
- SurveyQuestionOtherValueItem.prototype.getPlaceholder = function () {
80970
- return this.props.question.otherPlaceholder;
81632
+ SurveyQuestionOtherValueItem.prototype.getTextAreaModel = function () {
81633
+ return this.props.question.otherTextAreaModel;
80971
81634
  };
80972
81635
  return SurveyQuestionOtherValueItem;
80973
81636
  }(reactquestion_comment_SurveyQuestionCommentItem));