survey-react 1.12.1 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.2
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -962,9 +962,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
962
962
 
963
963
  /***/ "./src/entries/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, 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__) {
@@ -1166,6 +1166,7 @@ __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { retu
1166
1166
  __webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return /* reexport */ mask_datetime_InputMaskDateTime; });
1167
1167
  __webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return /* reexport */ mask_currency_InputMaskCurrency; });
1168
1168
  __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return /* reexport */ CssClassBuilder; });
1169
+ __webpack_require__.d(__webpack_exports__, "TextAreaModel", function() { return /* reexport */ text_area_TextAreaModel; });
1169
1170
  __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return /* reexport */ surveyCss; });
1170
1171
  __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return /* reexport */ defaultV2Css; });
1171
1172
  __webpack_require__.d(__webpack_exports__, "defaultV2ThemeName", function() { return /* reexport */ defaultV2ThemeName; });
@@ -1891,7 +1892,7 @@ var helpers_Helpers = /** @class */ (function () {
1891
1892
  return Helpers.convertDateTimeToString(val);
1892
1893
  return Helpers.convertDateToString(val);
1893
1894
  }
1894
- return val;
1895
+ return this.getUnbindValue(val);
1895
1896
  };
1896
1897
  Helpers.compareVerions = function (ver1, ver2) {
1897
1898
  if (!ver1 && !ver2)
@@ -13488,6 +13489,14 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13488
13489
  enumerable: false,
13489
13490
  configurable: true
13490
13491
  });
13492
+ Object.defineProperty(SurveyElement.prototype, "cssRequiredText", {
13493
+ get: function () {
13494
+ var css = this.cssClasses;
13495
+ return css.requiredText || (css.panel && css.panel.requiredText);
13496
+ },
13497
+ enumerable: false,
13498
+ configurable: true
13499
+ });
13491
13500
  SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
13492
13501
  SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
13493
13502
  Object.defineProperty(SurveyElement.prototype, "cssError", {
@@ -14920,9 +14929,131 @@ function navigateToUrl(url) {
14920
14929
  function wrapUrlForBackgroundImage(url) {
14921
14930
  return !!url ? ["url(", url, ")"].join("") : "";
14922
14931
  }
14923
- //new-name: old-name
14932
+ // new-name: old-name
14924
14933
  var renamedIcons = {
14925
- "folder": "chooseFile"
14934
+ "flip-24x24": "changecamera",
14935
+ "toolbox-file-24x24": "choosefile",
14936
+ "clear-24x24": "clear",
14937
+ "close-24x24": "closecamera",
14938
+ "file-72x72": "defaultfile",
14939
+ "chevronleft-16x16": "left",
14940
+ "plus-32x32": "modernbooleancheckchecked",
14941
+ "minus-32x32": "modernbooleancheckunchecked",
14942
+ "more-24x24": "more",
14943
+ "navmenu-24x24": "navmenu_24x24",
14944
+ "error-24x24": "removefile",
14945
+ "camera-32x32": "takepicture",
14946
+ "camera-24x24": "takepicture_24x24",
14947
+ "pg-quiz-24x24": "timercircle",
14948
+ "check-16x16": "v2check",
14949
+ "check-24x24": "v2check_24x24",
14950
+ "restoredown-16x16": "back-to-panel_16x16",
14951
+ "clear-16x16": "clear_16x16",
14952
+ "close-16x16": "close_16x16",
14953
+ "collapsedetails-16x16": "collapsedetail",
14954
+ "expanddetails-16x16": "expanddetail",
14955
+ "maximize-16x16": "full-screen_16x16",
14956
+ "loading-48x48": "loading",
14957
+ "minimize-16x16": "minimize_16x16",
14958
+ "chevronright-16x16": "next_16x16",
14959
+ "noimage-48x48": "no-image",
14960
+ "reorder-24x24": "ranking-arrows",
14961
+ "fullsize-16x16": "restore_16x16",
14962
+ "search-24x24": "search",
14963
+ "smiley-rate5-24x24": "average",
14964
+ "smiley-rate9-24x24": "excellent",
14965
+ "smiley-rate7-24x24": "good",
14966
+ "smiley-rate6-24x24": "normal",
14967
+ "smiley-rate4-24x24": "not-good",
14968
+ "smiley-rate10-24x24": "perfect",
14969
+ "smiley-rate3-24x24": "poor",
14970
+ "smiley-rate1-24x24": "terrible",
14971
+ "smiley-rate8-24x24": "very-good",
14972
+ "smiley-rate2-24x24": "very-poor",
14973
+ "add-16x16": "add_16x16",
14974
+ "add-24x24": "add_24x24",
14975
+ "warning-24x24": "alert_24x24",
14976
+ "apply-24x24": "apply",
14977
+ "arrowdown-24x24": "arrow-down",
14978
+ "arrowleft-24x24": "arrow-left",
14979
+ "arrowleft-16x16": "arrow-left_16x16",
14980
+ "arrowright-24x24": "arrow-right",
14981
+ "arrowright-16x16": "arrow-right_16x16",
14982
+ "arrowup-24x24": "arrow-up",
14983
+ "toolbox-boolean-24x24": "boolean",
14984
+ "speechbubble-16x16": "change-question-type_16x16",
14985
+ "toolbox-checkbox-24x24": "checkbox",
14986
+ "minusbox-16x16": "collapse-detail_16x16",
14987
+ "collapse-pg-24x24": "collapse-panel",
14988
+ "collapse-16x16": "collapse_16x16",
14989
+ "dropper-16x16": "color-picker",
14990
+ "toolbox-longtext-24x24": "comment",
14991
+ "wrench-24x24": "config",
14992
+ "copy-24x24": "copy",
14993
+ "toolbox-customquestion-24x24": "default",
14994
+ "delete-16x16": "delete_16x16",
14995
+ "delete-24x24": "delete_24x24",
14996
+ "hidehint-24x24": "description-hide",
14997
+ "hint-24x24": "description",
14998
+ "desktop-24x24": "device-desktop",
14999
+ "phone-24x24": "device-phone",
15000
+ "rotate-24x24": "device-rotate",
15001
+ "tablet-24x24": "device-tablet",
15002
+ "download-24x24": "download",
15003
+ "drag-24x24": "drag-area-indicator",
15004
+ "draghorizontal-24x16": "drag-area-indicator_24x16",
15005
+ "chevrondown-24x24": "drop-down-arrow",
15006
+ "chevrondown-16x16": "drop-down-arrow_16x16",
15007
+ "toolbox-dropdown-24x24": "dropdown",
15008
+ "copy-16x16": "duplicate_16x16",
15009
+ "edit-24x24": "edit",
15010
+ "edit-16x16": "edit_16x16",
15011
+ "finishedit-24x24": "editing-finish",
15012
+ "error-16x16": "error",
15013
+ "plusbox-16x16": "expand-detail_16x16",
15014
+ "expand-pg-24x24": "expand-panel",
15015
+ "expand-16x16": "expand_16x16",
15016
+ "toolbox-expression-24x24": "expression",
15017
+ "textedit-24x24": "fast-entry",
15018
+ "fix-24x24": "fix",
15019
+ "toolbox-html-24x24": "html",
15020
+ "toolbox-image-24x24": "image",
15021
+ "toolbox-imagepicker-24x24": "imagepicker",
15022
+ "import-24x24": "import",
15023
+ "invisible-24x24": "invisible-items",
15024
+ "language-24x24": "language",
15025
+ "folder-24x24": "load",
15026
+ "collapsepage-16x16": "logic-collapse",
15027
+ "expandpage-16x16": "logic-expand",
15028
+ "image-48x48": "logo",
15029
+ "toolbox-matrix-24x24": "matrix",
15030
+ "toolbox-multimatrix-24x24": "matrixdropdown",
15031
+ "toolbox-dynamicmatrix-24x24": "matrixdynamic",
15032
+ "toolbox-multipletext-24x24": "multipletext",
15033
+ "toolbox-panel-24x24": "panel",
15034
+ "toolbox-dynamicpanel-24x24": "paneldynamic",
15035
+ "preview-24x24": "preview",
15036
+ "toolbox-radiogroup-24x24": "radiogroup",
15037
+ "toolbox-ranking-24x24": "ranking",
15038
+ "toolbox-rating-24x24": "rating",
15039
+ "redo-24x24": "redo",
15040
+ "remove-16x16": "remove_16x16",
15041
+ "required-16x16": "required",
15042
+ "restore-24x24": "reset",
15043
+ "save-24x24": "save",
15044
+ "selectpage-24x24": "select-page",
15045
+ "settings-24x24": "settings",
15046
+ "settings-16x16": "settings_16x16",
15047
+ "toolbox-signature-24x24": "signaturepad",
15048
+ "switchon-16x16": "switch-active_16x16",
15049
+ "switchoff-16x16": "switch-inactive_16x16",
15050
+ "toolbox-tagbox-24x24": "tagbox",
15051
+ "toolbox-singleline-24x24": "text",
15052
+ "theme-24x24": "theme",
15053
+ "toolbox-24x24": "toolbox",
15054
+ "undo-24x24": "undo",
15055
+ "visible-24x24": "visible",
15056
+ "wand-24x24": "wizard"
14926
15057
  };
14927
15058
  function getIconNameFromProxy(iconName) {
14928
15059
  if (!iconName)
@@ -16512,7 +16643,9 @@ var ValidatorResult = /** @class */ (function () {
16512
16643
  }());
16513
16644
 
16514
16645
  /**
16515
- * Base SurveyJS validator class.
16646
+ * A base class for all classes that implement validators.
16647
+ *
16648
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16516
16649
  */
16517
16650
  var validator_SurveyValidator = /** @class */ (function (_super) {
16518
16651
  validator_extends(SurveyValidator, _super);
@@ -16528,6 +16661,9 @@ var validator_SurveyValidator = /** @class */ (function (_super) {
16528
16661
  : null;
16529
16662
  };
16530
16663
  Object.defineProperty(SurveyValidator.prototype, "text", {
16664
+ /**
16665
+ * An error message to display when a value fails validation.
16666
+ */
16531
16667
  get: function () {
16532
16668
  return this.getLocalizableStringText("text");
16533
16669
  },
@@ -16668,7 +16804,9 @@ var ValidatorRunner = /** @class */ (function () {
16668
16804
  }());
16669
16805
 
16670
16806
  /**
16671
- * Validate numeric values.
16807
+ * A class that implements a validator for numeric values.
16808
+ *
16809
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16672
16810
  */
16673
16811
  var validator_NumericValidator = /** @class */ (function (_super) {
16674
16812
  validator_extends(NumericValidator, _super);
@@ -16717,7 +16855,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16717
16855
  };
16718
16856
  Object.defineProperty(NumericValidator.prototype, "minValue", {
16719
16857
  /**
16720
- * The minValue property.
16858
+ * A minimum allowed numeric value.
16859
+ *
16860
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16721
16861
  */
16722
16862
  get: function () {
16723
16863
  return this.getPropertyValue("minValue");
@@ -16730,7 +16870,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16730
16870
  });
16731
16871
  Object.defineProperty(NumericValidator.prototype, "maxValue", {
16732
16872
  /**
16733
- * The maxValue property.
16873
+ * A maximum allowed numeric value.
16874
+ *
16875
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16734
16876
  */
16735
16877
  get: function () {
16736
16878
  return this.getPropertyValue("maxValue");
@@ -16745,7 +16887,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16745
16887
  }(validator_SurveyValidator));
16746
16888
 
16747
16889
  /**
16748
- * Validate text values.
16890
+ * A class that implements a validator for text values.
16891
+ *
16892
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16749
16893
  */
16750
16894
  var TextValidator = /** @class */ (function (_super) {
16751
16895
  validator_extends(TextValidator, _super);
@@ -16784,7 +16928,11 @@ var TextValidator = /** @class */ (function (_super) {
16784
16928
  };
16785
16929
  Object.defineProperty(TextValidator.prototype, "minLength", {
16786
16930
  /**
16787
- * The minLength property.
16931
+ * The minimum length of a text value measured in characters.
16932
+ *
16933
+ * Default value: 0
16934
+ *
16935
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16788
16936
  */
16789
16937
  get: function () {
16790
16938
  return this.getPropertyValue("minLength");
@@ -16797,7 +16945,11 @@ var TextValidator = /** @class */ (function (_super) {
16797
16945
  });
16798
16946
  Object.defineProperty(TextValidator.prototype, "maxLength", {
16799
16947
  /**
16800
- * The maxLength property.
16948
+ * The maximum length of a text value measured in characters.
16949
+ *
16950
+ * Default value: 0 (unlimited)
16951
+ *
16952
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16801
16953
  */
16802
16954
  get: function () {
16803
16955
  return this.getPropertyValue("maxLength");
@@ -16810,7 +16962,9 @@ var TextValidator = /** @class */ (function (_super) {
16810
16962
  });
16811
16963
  Object.defineProperty(TextValidator.prototype, "allowDigits", {
16812
16964
  /**
16813
- * The allowDigits property.
16965
+ * Specifies whether a text value can include numerical digits.
16966
+ *
16967
+ * Default value: `true`
16814
16968
  */
16815
16969
  get: function () {
16816
16970
  return this.getPropertyValue("allowDigits");
@@ -16825,7 +16979,9 @@ var TextValidator = /** @class */ (function (_super) {
16825
16979
  }(validator_SurveyValidator));
16826
16980
 
16827
16981
  /**
16828
- * Validates the number of answers.
16982
+ * 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)).
16983
+ *
16984
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16829
16985
  */
16830
16986
  var AnswerCountValidator = /** @class */ (function (_super) {
16831
16987
  validator_extends(AnswerCountValidator, _super);
@@ -16862,7 +17018,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16862
17018
  };
16863
17019
  Object.defineProperty(AnswerCountValidator.prototype, "minCount", {
16864
17020
  /**
16865
- * The minCount property.
17021
+ * A minimum number of selected answers.
17022
+ *
17023
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16866
17024
  */
16867
17025
  get: function () {
16868
17026
  return this.getPropertyValue("minCount");
@@ -16875,7 +17033,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16875
17033
  });
16876
17034
  Object.defineProperty(AnswerCountValidator.prototype, "maxCount", {
16877
17035
  /**
16878
- * The maxCount property.
17036
+ * A maximum number of selected answers.
17037
+ *
17038
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16879
17039
  */
16880
17040
  get: function () {
16881
17041
  return this.getPropertyValue("maxCount");
@@ -16890,7 +17050,7 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16890
17050
  }(validator_SurveyValidator));
16891
17051
 
16892
17052
  /**
16893
- * Use it to validate the text by regular expressions.
17053
+ * A class that implements validation using regular expressions.
16894
17054
  *
16895
17055
  * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16896
17056
  */
@@ -16928,7 +17088,9 @@ var RegexValidator = /** @class */ (function (_super) {
16928
17088
  };
16929
17089
  Object.defineProperty(RegexValidator.prototype, "regex", {
16930
17090
  /**
16931
- * The regex property.
17091
+ * A regular expression used to validate values.
17092
+ *
17093
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16932
17094
  */
16933
17095
  get: function () {
16934
17096
  return this.getPropertyValue("regex");
@@ -16939,24 +17101,39 @@ var RegexValidator = /** @class */ (function (_super) {
16939
17101
  enumerable: false,
16940
17102
  configurable: true
16941
17103
  });
16942
- Object.defineProperty(RegexValidator.prototype, "insensitive", {
17104
+ Object.defineProperty(RegexValidator.prototype, "caseInsensitive", {
17105
+ /**
17106
+ * Specifies whether uppercase and lowercase letters must be treated as distinct or equivalent when validating values.
17107
+ *
17108
+ * Default value: `false` (uppercase and lowercase letters are treated as distinct)
17109
+ */
16943
17110
  get: function () {
16944
- return this.getPropertyValue("insensitive");
17111
+ return this.getPropertyValue("caseInsensitive");
17112
+ },
17113
+ set: function (val) {
17114
+ this.setPropertyValue("caseInsensitive", val);
16945
17115
  },
17116
+ enumerable: false,
17117
+ configurable: true
17118
+ });
17119
+ Object.defineProperty(RegexValidator.prototype, "insensitive", {
17120
+ get: function () { return this.caseInsensitive; },
16946
17121
  set: function (val) {
16947
- this.setPropertyValue("insensitive", val);
17122
+ this.caseInsensitive = val;
16948
17123
  },
16949
17124
  enumerable: false,
16950
17125
  configurable: true
16951
17126
  });
16952
17127
  RegexValidator.prototype.createRegExp = function () {
16953
- return new RegExp(this.regex, this.insensitive ? "i" : "");
17128
+ return new RegExp(this.regex, this.caseInsensitive ? "i" : "");
16954
17129
  };
16955
17130
  return RegexValidator;
16956
17131
  }(validator_SurveyValidator));
16957
17132
 
16958
17133
  /**
16959
- * Validate e-mail address in the text input
17134
+ * A class that implements a validator for e-mail addresses.
17135
+ *
17136
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16960
17137
  */
16961
17138
  var EmailValidator = /** @class */ (function (_super) {
16962
17139
  validator_extends(EmailValidator, _super);
@@ -16985,7 +17162,9 @@ var EmailValidator = /** @class */ (function (_super) {
16985
17162
  }(validator_SurveyValidator));
16986
17163
 
16987
17164
  /**
16988
- * Show error if expression returns false
17165
+ * A class that implements validation using [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
17166
+ *
17167
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16989
17168
  */
16990
17169
  var validator_ExpressionValidator = /** @class */ (function (_super) {
16991
17170
  validator_extends(ExpressionValidator, _super);
@@ -17064,7 +17243,9 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
17064
17243
  };
17065
17244
  Object.defineProperty(ExpressionValidator.prototype, "expression", {
17066
17245
  /**
17067
- * The expression property.
17246
+ * A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `false`, validation fails.
17247
+ *
17248
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
17068
17249
  */
17069
17250
  get: function () {
17070
17251
  return this.getPropertyValue("expression");
@@ -17092,7 +17273,7 @@ Serializer.addClass("textvalidator", [{ name: "minLength:number", default: 0 },
17092
17273
  Serializer.addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
17093
17274
  return new AnswerCountValidator();
17094
17275
  }, "surveyvalidator");
17095
- Serializer.addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
17276
+ Serializer.addClass("regexvalidator", ["regex", { name: "caseInsensitive:boolean", alternativeName: "insensitive" }], function () {
17096
17277
  return new RegexValidator();
17097
17278
  }, "surveyvalidator");
17098
17279
  Serializer.addClass("emailvalidator", [], function () {
@@ -17322,6 +17503,188 @@ var RendererFactory = /** @class */ (function () {
17322
17503
  }());
17323
17504
 
17324
17505
 
17506
+ // CONCATENATED MODULE: ./packages/survey-core/src/utils/text-area.ts
17507
+
17508
+ var text_area_TextAreaModel = /** @class */ (function () {
17509
+ function TextAreaModel(options) {
17510
+ var _this = this;
17511
+ this.options = options;
17512
+ this.onPropertyChangedCallback = function () {
17513
+ if (_this.element) {
17514
+ _this.element.value = _this.getTextValue();
17515
+ if (_this.autoGrow) {
17516
+ increaseHeightByContent(_this.element);
17517
+ }
17518
+ }
17519
+ };
17520
+ this.question.registerFunctionOnPropertyValueChanged(this.options.propertyName, this.onPropertyChangedCallback, "__textarea");
17521
+ }
17522
+ TextAreaModel.prototype.setElement = function (element) {
17523
+ if (!!element) {
17524
+ this.element = element;
17525
+ }
17526
+ };
17527
+ TextAreaModel.prototype.getTextValue = function () {
17528
+ if (!!this.options.getTextValue)
17529
+ return this.options.getTextValue();
17530
+ return "";
17531
+ };
17532
+ TextAreaModel.prototype.onTextAreaChange = function (event) {
17533
+ if (!!this.options.onTextAreaChange)
17534
+ this.options.onTextAreaChange(event);
17535
+ };
17536
+ TextAreaModel.prototype.onTextAreaInput = function (event) {
17537
+ if (!!this.options.onTextAreaInput)
17538
+ this.options.onTextAreaInput(event);
17539
+ if (this.element && this.autoGrow) {
17540
+ increaseHeightByContent(this.element);
17541
+ }
17542
+ };
17543
+ TextAreaModel.prototype.onTextAreaKeyDown = function (event) {
17544
+ if (!!this.options.onTextAreaKeyDown)
17545
+ this.options.onTextAreaKeyDown(event);
17546
+ };
17547
+ TextAreaModel.prototype.onTextAreaBlur = function (event) {
17548
+ this.onTextAreaChange(event);
17549
+ if (!!this.options.onTextAreaBlur)
17550
+ this.options.onTextAreaBlur(event);
17551
+ };
17552
+ TextAreaModel.prototype.onTextAreaFocus = function (event) {
17553
+ if (!!this.options.onTextAreaFocus)
17554
+ this.options.onTextAreaFocus(event);
17555
+ };
17556
+ Object.defineProperty(TextAreaModel.prototype, "question", {
17557
+ get: function () {
17558
+ return this.options.question;
17559
+ },
17560
+ enumerable: false,
17561
+ configurable: true
17562
+ });
17563
+ Object.defineProperty(TextAreaModel.prototype, "id", {
17564
+ get: function () {
17565
+ return this.options.id();
17566
+ },
17567
+ enumerable: false,
17568
+ configurable: true
17569
+ });
17570
+ Object.defineProperty(TextAreaModel.prototype, "placeholder", {
17571
+ get: function () {
17572
+ return this.options.placeholder();
17573
+ },
17574
+ enumerable: false,
17575
+ configurable: true
17576
+ });
17577
+ Object.defineProperty(TextAreaModel.prototype, "className", {
17578
+ get: function () {
17579
+ return this.options.className();
17580
+ },
17581
+ enumerable: false,
17582
+ configurable: true
17583
+ });
17584
+ Object.defineProperty(TextAreaModel.prototype, "maxLength", {
17585
+ get: function () {
17586
+ if (this.options.maxLength)
17587
+ return this.options.maxLength();
17588
+ },
17589
+ enumerable: false,
17590
+ configurable: true
17591
+ });
17592
+ Object.defineProperty(TextAreaModel.prototype, "autoGrow", {
17593
+ get: function () {
17594
+ if (this.options.autoGrow)
17595
+ return this.options.autoGrow();
17596
+ },
17597
+ enumerable: false,
17598
+ configurable: true
17599
+ });
17600
+ Object.defineProperty(TextAreaModel.prototype, "rows", {
17601
+ get: function () {
17602
+ if (this.options.rows)
17603
+ return this.options.rows();
17604
+ },
17605
+ enumerable: false,
17606
+ configurable: true
17607
+ });
17608
+ Object.defineProperty(TextAreaModel.prototype, "cols", {
17609
+ get: function () {
17610
+ if (this.options.cols)
17611
+ return this.options.cols();
17612
+ },
17613
+ enumerable: false,
17614
+ configurable: true
17615
+ });
17616
+ Object.defineProperty(TextAreaModel.prototype, "isDisabledAttr", {
17617
+ get: function () {
17618
+ return this.options.isDisabledAttr();
17619
+ },
17620
+ enumerable: false,
17621
+ configurable: true
17622
+ });
17623
+ Object.defineProperty(TextAreaModel.prototype, "isReadOnlyAttr", {
17624
+ get: function () {
17625
+ if (this.options.isReadOnlyAttr)
17626
+ return this.options.isReadOnlyAttr();
17627
+ },
17628
+ enumerable: false,
17629
+ configurable: true
17630
+ });
17631
+ Object.defineProperty(TextAreaModel.prototype, "ariaRequired", {
17632
+ get: function () {
17633
+ if (this.options.ariaRequired)
17634
+ return this.options.ariaRequired();
17635
+ },
17636
+ enumerable: false,
17637
+ configurable: true
17638
+ });
17639
+ Object.defineProperty(TextAreaModel.prototype, "ariaLabel", {
17640
+ get: function () {
17641
+ if (this.options.ariaLabel)
17642
+ return this.options.ariaLabel();
17643
+ },
17644
+ enumerable: false,
17645
+ configurable: true
17646
+ });
17647
+ Object.defineProperty(TextAreaModel.prototype, "ariaInvalid", {
17648
+ get: function () {
17649
+ if (this.options.ariaInvalid)
17650
+ return this.options.ariaInvalid();
17651
+ },
17652
+ enumerable: false,
17653
+ configurable: true
17654
+ });
17655
+ Object.defineProperty(TextAreaModel.prototype, "ariaLabelledBy", {
17656
+ get: function () {
17657
+ if (this.options.ariaLabelledBy)
17658
+ return this.options.ariaLabelledBy();
17659
+ },
17660
+ enumerable: false,
17661
+ configurable: true
17662
+ });
17663
+ Object.defineProperty(TextAreaModel.prototype, "ariaDescribedBy", {
17664
+ get: function () {
17665
+ if (this.options.ariaDescribedBy)
17666
+ return this.options.ariaDescribedBy();
17667
+ },
17668
+ enumerable: false,
17669
+ configurable: true
17670
+ });
17671
+ Object.defineProperty(TextAreaModel.prototype, "ariaErrormessage", {
17672
+ get: function () {
17673
+ if (this.options.ariaErrormessage)
17674
+ return this.options.ariaErrormessage();
17675
+ },
17676
+ enumerable: false,
17677
+ configurable: true
17678
+ });
17679
+ TextAreaModel.prototype.dispose = function () {
17680
+ if (this.question) {
17681
+ this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName, "__textarea");
17682
+ }
17683
+ };
17684
+ return TextAreaModel;
17685
+ }());
17686
+
17687
+
17325
17688
  // CONCATENATED MODULE: ./packages/survey-core/src/question.ts
17326
17689
  var question_extends = (undefined && undefined.__extends) || (function () {
17327
17690
  var extendStatics = function (d, b) {
@@ -17359,6 +17722,7 @@ var question_decorate = (undefined && undefined.__decorate) || function (decorat
17359
17722
 
17360
17723
 
17361
17724
 
17725
+
17362
17726
  var TriggerExpressionInfo = /** @class */ (function () {
17363
17727
  function TriggerExpressionInfo(name, canRun, doComplete) {
17364
17728
  this.name = name;
@@ -17401,6 +17765,7 @@ var question_Question = /** @class */ (function (_super) {
17401
17765
  _this.createNewArray("validators", function (validator) {
17402
17766
  validator.errorOwner = _this;
17403
17767
  });
17768
+ _this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
17404
17769
  _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
17405
17770
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
17406
17771
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
@@ -17441,6 +17806,26 @@ var question_Question = /** @class */ (function (_super) {
17441
17806
  Question.getQuestionId = function () {
17442
17807
  return "sq_" + Question.questionCounter++;
17443
17808
  };
17809
+ Question.prototype.getCommentTextAreaOptions = function () {
17810
+ var _this = this;
17811
+ var options = {
17812
+ question: this,
17813
+ id: function () { return _this.commentId; },
17814
+ propertyName: "comment",
17815
+ className: function () { return _this.cssClasses.comment; },
17816
+ placeholder: function () { return _this.renderedCommentPlaceholder; },
17817
+ isDisabledAttr: function () { return _this.isInputReadOnly || false; },
17818
+ rows: function () { return _this.commentAreaRows; },
17819
+ autoGrow: function () { return _this.autoGrowComment; },
17820
+ maxLength: function () { return _this.getOthersMaxLength(); },
17821
+ ariaRequired: function () { return _this.a11y_input_ariaRequired; },
17822
+ ariaLabel: function () { return _this.a11y_input_ariaLabel; },
17823
+ getTextValue: function () { return _this.comment; },
17824
+ onTextAreaChange: function (e) { _this.onCommentChange(e); },
17825
+ onTextAreaInput: function (e) { _this.onCommentInput(e); },
17826
+ };
17827
+ return options;
17828
+ };
17444
17829
  Question.prototype.isReadOnlyRenderDiv = function () {
17445
17830
  return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
17446
17831
  };
@@ -18363,13 +18748,6 @@ var question_Question = /** @class */ (function (_super) {
18363
18748
  configurable: true
18364
18749
  });
18365
18750
  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
18751
  };
18374
18752
  Question.prototype.onCommentInput = function (event) {
18375
18753
  if (this.isInputTextUpdate) {
@@ -19466,11 +19844,11 @@ var question_Question = /** @class */ (function (_super) {
19466
19844
  });
19467
19845
  Object.defineProperty(Question.prototype, "resetValueIf", {
19468
19846
  /**
19469
- * A Boolean expression. If it evaluates to `true`, the question value is reset to [default](#defaultValue).
19847
+ * 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
19848
  *
19471
19849
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19472
19850
  *
19473
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
19851
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
19474
19852
  * @see setValueIf
19475
19853
  */
19476
19854
  get: function () {
@@ -19484,11 +19862,11 @@ var question_Question = /** @class */ (function (_super) {
19484
19862
  });
19485
19863
  Object.defineProperty(Question.prototype, "setValueIf", {
19486
19864
  /**
19487
- * A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
19865
+ * 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
19866
  *
19489
19867
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19490
19868
  *
19491
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
19869
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
19492
19870
  * @see resetValueIf
19493
19871
  */
19494
19872
  get: function () {
@@ -19502,11 +19880,11 @@ var question_Question = /** @class */ (function (_super) {
19502
19880
  });
19503
19881
  Object.defineProperty(Question.prototype, "setValueExpression", {
19504
19882
  /**
19505
- * An expression used to calculate the question value.
19883
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the question value.
19506
19884
  *
19507
19885
  * 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
19886
  *
19509
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
19887
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
19510
19888
  * @see defaultValueExpression
19511
19889
  * @see resetValueIf
19512
19890
  */
@@ -22445,7 +22823,6 @@ var martixBase_decorate = (undefined && undefined.__decorate) || function (decor
22445
22823
 
22446
22824
 
22447
22825
 
22448
-
22449
22826
  /**
22450
22827
  * A base class for all matrix question types.
22451
22828
  */
@@ -22456,7 +22833,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22456
22833
  _this.generatedVisibleRows = null;
22457
22834
  _this.generatedTotalRow = null;
22458
22835
  _this.filteredRows = null;
22459
- _this.filteredColumns = null;
22460
22836
  _this.columns = _this.createColumnValues();
22461
22837
  _this.rows = _this.createItemValues("rows");
22462
22838
  return _this;
@@ -22516,11 +22892,19 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22516
22892
  });
22517
22893
  Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleColumns", {
22518
22894
  get: function () {
22519
- return !!this.filteredColumns ? this.filteredColumns : this.columns;
22895
+ var _this = this;
22896
+ var res = [];
22897
+ this.columns.forEach(function (col) { if (_this.isColumnVisible(col)) {
22898
+ res.push(col);
22899
+ } });
22900
+ return res;
22520
22901
  },
22521
22902
  enumerable: false,
22522
22903
  configurable: true
22523
22904
  });
22905
+ QuestionMatrixBaseModel.prototype.isColumnVisible = function (column) {
22906
+ return column.isVisible;
22907
+ };
22524
22908
  Object.defineProperty(QuestionMatrixBaseModel.prototype, "rows", {
22525
22909
  /**
22526
22910
  * An array of matrix rows.
@@ -22535,7 +22919,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22535
22919
  set: function (newValue) {
22536
22920
  var newRows = this.processRowsOnSet(newValue);
22537
22921
  this.setPropertyValue("rows", newRows);
22538
- this.filterItems();
22539
22922
  },
22540
22923
  enumerable: false,
22541
22924
  configurable: true
@@ -22574,7 +22957,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22574
22957
  },
22575
22958
  set: function (val) {
22576
22959
  this.setPropertyValue("rowsVisibleIf", val);
22577
- this.filterItems();
22960
+ if (!this.isLoadingFromJsonValue) {
22961
+ this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22962
+ }
22578
22963
  },
22579
22964
  enumerable: false,
22580
22965
  configurable: true
@@ -22595,7 +22980,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22595
22980
  },
22596
22981
  set: function (val) {
22597
22982
  this.setPropertyValue("columnsVisibleIf", val);
22598
- this.filterItems();
22983
+ if (!this.isLoadingFromJson) {
22984
+ this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22985
+ }
22599
22986
  },
22600
22987
  enumerable: false,
22601
22988
  configurable: true
@@ -22604,15 +22991,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22604
22991
  _super.prototype.runCondition.call(this, values, properties);
22605
22992
  this.runItemsCondition(values, properties);
22606
22993
  };
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
22994
  QuestionMatrixBaseModel.prototype.onColumnsChanged = function () { };
22617
22995
  QuestionMatrixBaseModel.prototype.onRowsChanged = function () {
22618
22996
  this.updateVisibilityBasedOnRows();
@@ -22627,7 +23005,7 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22627
23005
  var res = _super.prototype.isVisibleCore.call(this);
22628
23006
  if (!res || !this.hideIfRowsEmpty)
22629
23007
  return res;
22630
- return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
23008
+ return this.visibleRows.length > 0;
22631
23009
  };
22632
23010
  QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
22633
23011
  return !this.survey || !this.survey.areInvisibleElementsShowing;
@@ -22636,22 +23014,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22636
23014
  return true;
22637
23015
  };
22638
23016
  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
23017
  var hasChanges = this.hasRowsAsItems() && this.runConditionsForRows(values, properties);
22647
23018
  var hasColumnsChanged = this.runConditionsForColumns(values, properties);
22648
23019
  hasChanges = hasColumnsChanged || hasChanges;
22649
23020
  if (hasChanges) {
22650
- if (this.isClearValueOnHidden && (!!this.filteredColumns || !!this.filteredRows)) {
22651
- this.clearIncorrectValues();
22652
- }
22653
- if (!!oldVisibleRows) {
22654
- this.restoreNewVisibleRowsValues(oldVisibleRows);
23021
+ if (this.isClearValueOnHidden && hasColumnsChanged) {
23022
+ this.clearInvisibleColumnValues();
22655
23023
  }
22656
23024
  this.clearGeneratedRows();
22657
23025
  if (hasColumnsChanged) {
@@ -22659,16 +23027,15 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22659
23027
  }
22660
23028
  this.onRowsChanged();
22661
23029
  }
22662
- return hasChanges;
22663
23030
  };
23031
+ QuestionMatrixBaseModel.prototype.isRowsFiltered = function () { return !!this.filteredRows; };
22664
23032
  QuestionMatrixBaseModel.prototype.clearGeneratedRows = function () {
22665
23033
  this.generatedVisibleRows = null;
22666
23034
  };
23035
+ QuestionMatrixBaseModel.prototype.createRowsVisibleIfRunner = function () { return null; };
22667
23036
  QuestionMatrixBaseModel.prototype.runConditionsForRows = function (values, properties) {
22668
23037
  var showInvisibile = !!this.survey && this.survey.areInvisibleElementsShowing;
22669
- var runner = !showInvisibile && !!this.rowsVisibleIf
22670
- ? new ConditionRunner(this.rowsVisibleIf)
22671
- : null;
23038
+ var runner = !showInvisibile ? this.createRowsVisibleIfRunner() : null;
22672
23039
  this.filteredRows = [];
22673
23040
  var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
22674
23041
  itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
@@ -22679,73 +23046,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22679
23046
  };
22680
23047
  QuestionMatrixBaseModel.prototype.runConditionsForColumns = function (values, properties) {
22681
23048
  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
- }
23049
+ var runner = useColumnsExpression && !!this.columnsVisibleIf ? new ConditionRunner(this.columnsVisibleIf) : null;
23050
+ return itemvalue_ItemValue.runConditionsForItems(this.columns, undefined, runner, values, properties, this.shouldRunColumnExpression());
22748
23051
  };
23052
+ QuestionMatrixBaseModel.prototype.clearInvisibleColumnValues = function () { };
23053
+ QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () { };
22749
23054
  QuestionMatrixBaseModel.prototype.needResponsiveWidth = function () {
22750
23055
  //TODO: make it mor intelligent
22751
23056
  return true;
@@ -24954,6 +25259,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
24954
25259
  _this.colOwnerValue = null;
24955
25260
  _this.indexValue = -1;
24956
25261
  _this._hasVisibleCell = true;
25262
+ _this.isColumnsVisibleIf = true;
24957
25263
  _this.previousChoicesId = undefined;
24958
25264
  _this.createLocalizableString("totalFormat", _this);
24959
25265
  _this.createLocalizableString("cellHint", _this);
@@ -26653,8 +26959,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26653
26959
  this.headerRow.cells.push(this.createHeaderCell(null));
26654
26960
  }
26655
26961
  if (this.matrix.isColumnLayoutHorizontal) {
26656
- for (var i = 0; i < this.matrix.visibleColumns.length; i++) {
26657
- var column = this.matrix.visibleColumns[i];
26962
+ for (var i = 0; i < this.matrix.columns.length; i++) {
26963
+ var column = this.matrix.columns[i];
26658
26964
  if (!column.isColumnVisible)
26659
26965
  continue;
26660
26966
  if (this.matrix.IsMultiplyColumn(column)) {
@@ -27286,6 +27592,7 @@ var question_matrixdropdownbase_extends = (undefined && undefined.__extends) ||
27286
27592
 
27287
27593
 
27288
27594
 
27595
+
27289
27596
  var question_matrixdropdownbase_MatrixDropdownCell = /** @class */ (function () {
27290
27597
  function MatrixDropdownCell(column, row, data) {
27291
27598
  this.column = column;
@@ -27455,6 +27762,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27455
27762
  var _this = this;
27456
27763
  this.isSettingValue = false;
27457
27764
  this.detailPanelValue = null;
27765
+ this.visibleValue = true;
27458
27766
  this.cells = [];
27459
27767
  this.isCreatingDetailPanel = false;
27460
27768
  this.data = data;
@@ -27500,6 +27808,24 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27500
27808
  });
27501
27809
  MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
27502
27810
  MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
27811
+ Object.defineProperty(MatrixDropdownRowModelBase.prototype, "isVisible", {
27812
+ get: function () { return this.visible && this.isItemVisible(); },
27813
+ enumerable: false,
27814
+ configurable: true
27815
+ });
27816
+ Object.defineProperty(MatrixDropdownRowModelBase.prototype, "visible", {
27817
+ get: function () { return this.visibleValue; },
27818
+ set: function (val) {
27819
+ var _a;
27820
+ if (this.visible !== val) {
27821
+ this.visibleValue = val;
27822
+ (_a = this.data) === null || _a === void 0 ? void 0 : _a.onRowVisibilityChanged(this);
27823
+ }
27824
+ },
27825
+ enumerable: false,
27826
+ configurable: true
27827
+ });
27828
+ MatrixDropdownRowModelBase.prototype.isItemVisible = function () { return true; };
27503
27829
  Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
27504
27830
  get: function () {
27505
27831
  var result = {};
@@ -27657,15 +27983,23 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27657
27983
  res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
27658
27984
  res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
27659
27985
  };
27660
- MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
27986
+ MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties, rowsVisibleIf) {
27661
27987
  if (!!this.data) {
27662
- values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
27988
+ values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.getFilteredData();
27663
27989
  }
27664
27990
  var rowIndex = this.rowIndex;
27665
27991
  this.applyRowVariablesToValues(values, rowIndex);
27666
27992
  var newProps = helpers_Helpers.createCopy(properties);
27667
27993
  newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
27668
27994
  var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
27995
+ if (!!rowsVisibleIf) {
27996
+ values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
27997
+ this.setRowsVisibleIfValues(values);
27998
+ this.visible = new ConditionRunner(rowsVisibleIf).run(values, properties);
27999
+ }
28000
+ else {
28001
+ this.visible = true;
28002
+ }
27669
28003
  for (var i = 0; i < this.cells.length; i++) {
27670
28004
  if (i > 0) {
27671
28005
  mergeValues(this.value, rowValues);
@@ -27680,6 +28014,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27680
28014
  this.onQuestionReadOnlyChanged();
27681
28015
  }
27682
28016
  };
28017
+ MatrixDropdownRowModelBase.prototype.setRowsVisibleIfValues = function (values) { };
27683
28018
  MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
27684
28019
  var res = [];
27685
28020
  this.questions.forEach(function (q) {
@@ -28123,12 +28458,12 @@ var question_matrixdropdownbase_MatrixDropdownTotalRowModel = /** @class */ (fun
28123
28458
  this.data.onTotalValueChanged();
28124
28459
  }
28125
28460
  };
28126
- MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties) {
28461
+ MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties, rowsVisibleIf) {
28127
28462
  var counter = 0;
28128
28463
  var prevValue;
28129
28464
  do {
28130
28465
  prevValue = helpers_Helpers.getUnbindValue(this.value);
28131
- _super.prototype.runCondition.call(this, values, properties);
28466
+ _super.prototype.runCondition.call(this, values, properties, "");
28132
28467
  counter++;
28133
28468
  } while (!helpers_Helpers.isTwoValueEquals(prevValue, this.value) && counter < 3);
28134
28469
  };
@@ -28459,6 +28794,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28459
28794
  };
28460
28795
  QuestionMatrixDropdownModelBase.prototype.onPointerDown = function (pointerDownEvent, row) { };
28461
28796
  QuestionMatrixDropdownModelBase.prototype.onRowsChanged = function () {
28797
+ this.clearVisibleRows();
28462
28798
  this.resetRenderedTable();
28463
28799
  _super.prototype.onRowsChanged.call(this);
28464
28800
  };
@@ -28512,6 +28848,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28512
28848
  this.fireCallback(this.onRenderedTableResetCallback);
28513
28849
  };
28514
28850
  QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
28851
+ this.clearVisibleRows();
28515
28852
  if (!this.generatedVisibleRows)
28516
28853
  return;
28517
28854
  for (var i = 0; i < this.generatedVisibleRows.length; i++) {
@@ -28554,8 +28891,8 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28554
28891
  cellQuestion: null,
28555
28892
  value: null,
28556
28893
  };
28557
- for (var i = 0; i < this.visibleColumns.length; i++) {
28558
- options.column = this.visibleColumns[i];
28894
+ for (var i = 0; i < this.columns.length; i++) {
28895
+ options.column = this.columns[i];
28559
28896
  options.columnName = options.column.name;
28560
28897
  var cell = row.cells[i];
28561
28898
  options.cell = cell;
@@ -28810,25 +29147,40 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28810
29147
  return false;
28811
29148
  };
28812
29149
  QuestionMatrixDropdownModelBase.prototype.runCellsCondition = function (values, properties) {
28813
- if (!this.generatedVisibleRows)
28814
- return;
28815
- var newValues = this.getRowConditionValues(values);
28816
29150
  var rows = this.generatedVisibleRows;
28817
- for (var i = 0; i < rows.length; i++) {
28818
- rows[i].runCondition(newValues, properties);
29151
+ if (!!rows) {
29152
+ var newValues = this.getRowConditionValues(values);
29153
+ for (var i = 0; i < rows.length; i++) {
29154
+ rows[i].runCondition(newValues, properties, this.rowsVisibleIf);
29155
+ }
28819
29156
  }
28820
29157
  this.checkColumnsVisibility();
28821
29158
  this.checkColumnsRenderedRequired();
28822
29159
  };
29160
+ QuestionMatrixDropdownModelBase.prototype.runConditionsForColumns = function (values, properties) {
29161
+ var _this = this;
29162
+ this.columns.forEach(function (column) {
29163
+ if (!_this.columnsVisibleIf) {
29164
+ column.isColumnsVisibleIf = true;
29165
+ }
29166
+ else {
29167
+ var condition = new ConditionRunner(_this.columnsVisibleIf);
29168
+ values["item"] = column.name;
29169
+ column.isColumnsVisibleIf = condition.run(values, properties) === true;
29170
+ }
29171
+ });
29172
+ return false;
29173
+ };
28823
29174
  QuestionMatrixDropdownModelBase.prototype.checkColumnsVisibility = function () {
28824
29175
  if (this.isDesignMode)
28825
29176
  return;
28826
29177
  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)
29178
+ for (var i = 0; i < this.columns.length; i++) {
29179
+ var column = this.columns[i];
29180
+ var isCellsVisibilty = !!column.visibleIf || column.isFilteredMultipleColumns;
29181
+ if (!isCellsVisibilty && !this.columnsVisibleIf && column.isColumnVisible)
28830
29182
  continue;
28831
- hasChanged = this.isColumnVisibilityChanged(column) || hasChanged;
29183
+ hasChanged = this.isColumnVisibilityChanged(column, isCellsVisibilty) || hasChanged;
28832
29184
  }
28833
29185
  if (hasChanged) {
28834
29186
  this.resetRenderedTable();
@@ -28836,9 +29188,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28836
29188
  };
28837
29189
  QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
28838
29190
  var rows = this.generatedVisibleRows;
28839
- for (var i = 0; i < this.visibleColumns.length; i++) {
28840
- var column = this.visibleColumns[i];
28841
- if (!column.requiredIf)
29191
+ if (!rows)
29192
+ return;
29193
+ for (var i = 0; i < this.columns.length; i++) {
29194
+ var column = this.columns[i];
29195
+ if (!column.requiredIf || !column.isColumnVisible)
28842
29196
  continue;
28843
29197
  var required = rows.length > 0;
28844
29198
  for (var j = 0; j < rows.length; j++) {
@@ -28850,26 +29204,29 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28850
29204
  column.updateIsRenderedRequired(required);
28851
29205
  }
28852
29206
  };
28853
- QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column) {
29207
+ QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column, checkCellsVisiblity) {
28854
29208
  var curVis = column.isColumnVisible;
28855
- var isMultipleColumnsVisibility = column.isFilteredMultipleColumns;
29209
+ var hasVisCell = !checkCellsVisiblity;
29210
+ var rows = this.generatedVisibleRows;
29211
+ var checkRows = checkCellsVisiblity && rows;
29212
+ var isMultipleColumnsVisibility = checkRows && column.isFilteredMultipleColumns;
28856
29213
  var curVisibleChoices = isMultipleColumnsVisibility ? column.getVisibleChoicesInCell : [];
28857
29214
  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);
29215
+ if (checkRows) {
29216
+ for (var i = 0; i < rows.length; i++) {
29217
+ var cell = rows[i].cells[column.index];
29218
+ var q = cell === null || cell === void 0 ? void 0 : cell.question;
29219
+ if (!!q && q.isVisible) {
29220
+ hasVisCell = true;
29221
+ if (isMultipleColumnsVisibility) {
29222
+ this.updateNewVisibleChoices(q, newVisibleChoices);
29223
+ }
29224
+ else
29225
+ break;
28867
29226
  }
28868
- else
28869
- break;
28870
29227
  }
28871
29228
  }
28872
- column.hasVisibleCell = hasVisCell;
29229
+ column.hasVisibleCell = hasVisCell && column.isColumnsVisibleIf;
28873
29230
  if (isMultipleColumnsVisibility) {
28874
29231
  column.setVisibleChoicesInCell(newVisibleChoices);
28875
29232
  if (!helpers_Helpers.isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
@@ -29044,20 +29401,46 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29044
29401
  this.columns.push(column);
29045
29402
  return column;
29046
29403
  };
29404
+ QuestionMatrixDropdownModelBase.prototype.clearVisibleRows = function () {
29405
+ this.visibleRowsArray = null;
29406
+ };
29407
+ QuestionMatrixDropdownModelBase.prototype.isColumnVisible = function (column) {
29408
+ return column.isColumnVisible;
29409
+ };
29047
29410
  QuestionMatrixDropdownModelBase.prototype.getVisibleRows = function () {
29048
- var _this = this;
29049
29411
  if (this.isUpdateLocked)
29050
29412
  return null;
29051
- if (!this.generatedVisibleRows) {
29413
+ if (this.isGenereatingRows)
29414
+ return [];
29415
+ if (!!this.visibleRowsArray)
29416
+ return this.visibleRowsArray;
29417
+ this.generateVisibleRowsIfNeeded();
29418
+ this.visibleRowsArray = this.getVisibleFromGenerated(this.generatedVisibleRows);
29419
+ return this.visibleRowsArray;
29420
+ };
29421
+ QuestionMatrixDropdownModelBase.prototype.generateVisibleRowsIfNeeded = function () {
29422
+ var _this = this;
29423
+ if (!this.isUpdateLocked && !this.generatedVisibleRows && !this.generatedVisibleRows) {
29424
+ this.isGenereatingRows = true;
29052
29425
  this.generatedVisibleRows = this.generateRows();
29426
+ this.isGenereatingRows = false;
29053
29427
  this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
29054
29428
  if (this.data) {
29055
29429
  this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
29056
29430
  }
29057
- this.updateValueOnRowsGeneration(this.generatedVisibleRows);
29058
- this.updateIsAnswered();
29431
+ if (!!this.generatedVisibleRows) {
29432
+ this.updateValueOnRowsGeneration(this.generatedVisibleRows);
29433
+ this.updateIsAnswered();
29434
+ }
29059
29435
  }
29060
- return this.generatedVisibleRows;
29436
+ };
29437
+ QuestionMatrixDropdownModelBase.prototype.getVisibleFromGenerated = function (rows) {
29438
+ var res = [];
29439
+ if (!rows)
29440
+ return res;
29441
+ rows.forEach(function (row) { if (row.isVisible)
29442
+ res.push(row); });
29443
+ return res.length === rows.length ? rows : res;
29061
29444
  };
29062
29445
  QuestionMatrixDropdownModelBase.prototype.updateValueOnRowsGeneration = function (rows) {
29063
29446
  var oldValue = this.createNewValue(true);
@@ -29645,7 +30028,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29645
30028
  !this.generatedVisibleRows)
29646
30029
  return;
29647
30030
  this.isDoingonAnyValueChanged = true;
29648
- var rows = this.visibleRows;
30031
+ var rows = this.generatedVisibleRows;
29649
30032
  for (var i = 0; i < rows.length; i++) {
29650
30033
  rows[i].onAnyValueChanged(name, questionName);
29651
30034
  }
@@ -29694,6 +30077,19 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29694
30077
  enumerable: false,
29695
30078
  configurable: true
29696
30079
  });
30080
+ Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasInvisibleRows", {
30081
+ get: function () {
30082
+ return !!this.visibleRowsArray && this.visibleRowsArray.length !== this.generatedVisibleRows.length;
30083
+ },
30084
+ enumerable: false,
30085
+ configurable: true
30086
+ });
30087
+ QuestionMatrixDropdownModelBase.prototype.getFilteredData = function () {
30088
+ if (this.isEmpty() || !this.generatedVisibleRows || !this.hasInvisibleRows)
30089
+ return this.value;
30090
+ return this.getFilteredDataCore();
30091
+ };
30092
+ QuestionMatrixDropdownModelBase.prototype.getFilteredDataCore = function () { return this.value; };
29697
30093
  QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
29698
30094
  if (!this.survey && !this.cellValueChangingCallback)
29699
30095
  return !!rowValue ? rowValue[columnName] : null;
@@ -29884,6 +30280,26 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29884
30280
  return null;
29885
30281
  };
29886
30282
  QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
30283
+ QuestionMatrixDropdownModelBase.prototype.onRowVisibilityChanged = function (row) {
30284
+ this.clearVisibleRows();
30285
+ this.resetRenderedTable();
30286
+ };
30287
+ QuestionMatrixDropdownModelBase.prototype.clearValueIfInvisibleCore = function (reason) {
30288
+ _super.prototype.clearValueIfInvisibleCore.call(this, reason);
30289
+ this.clearInvisibleValuesInRows();
30290
+ };
30291
+ QuestionMatrixDropdownModelBase.prototype.clearInvisibleValuesInRows = function () {
30292
+ var _a;
30293
+ if (this.isEmpty() || !this.isRowsFiltered)
30294
+ return;
30295
+ var sharedQuestions = ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.questionsByValueName(this.getValueName())) || [];
30296
+ if (sharedQuestions.length < 2) {
30297
+ this.value = this.getFilteredData();
30298
+ }
30299
+ };
30300
+ QuestionMatrixDropdownModelBase.prototype.isRowsFiltered = function () {
30301
+ return _super.prototype.isRowsFiltered.call(this) || (this.visibleRows !== this.generatedVisibleRows);
30302
+ };
29887
30303
  QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
29888
30304
  if (index >= this.visibleRows.length)
29889
30305
  return null;
@@ -29967,7 +30383,6 @@ Serializer.addClass("matrixdropdownbase", [
29967
30383
  visible: false,
29968
30384
  isLightSerializable: false,
29969
30385
  },
29970
- { name: "columnsVisibleIf", visible: false },
29971
30386
  {
29972
30387
  name: "detailPanelMode",
29973
30388
  choices: ["none", "underRow", "underRowSingle"],
@@ -30053,8 +30468,13 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
30053
30468
  enumerable: false,
30054
30469
  configurable: true
30055
30470
  });
30471
+ MatrixDropdownRowModel.prototype.isItemVisible = function () { return this.item.isVisible; };
30056
30472
  MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
30057
30473
  MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
30474
+ MatrixDropdownRowModel.prototype.setRowsVisibleIfValues = function (values) {
30475
+ values["item"] = this.item.value;
30476
+ values["choice"] = this.item.value;
30477
+ };
30058
30478
  return MatrixDropdownRowModel;
30059
30479
  }(question_matrixdropdownbase_MatrixDropdownRowModelBase));
30060
30480
 
@@ -30070,11 +30490,11 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30070
30490
  _this.defaultValuesInRows = {};
30071
30491
  _this.createLocalizableString("totalText", _this, true);
30072
30492
  _this.registerPropertyChangedHandlers(["rows"], function () {
30493
+ if (!_this.generatedVisibleRows)
30494
+ return;
30073
30495
  _this.clearGeneratedRows();
30074
30496
  _this.resetRenderedTable();
30075
- if (!_this.filterItems()) {
30076
- _this.onRowsChanged();
30077
- }
30497
+ _this.getVisibleRows();
30078
30498
  _this.clearIncorrectValues();
30079
30499
  });
30080
30500
  _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
@@ -30165,30 +30585,29 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30165
30585
  return helpers_Helpers.isValueObject(val, true);
30166
30586
  };
30167
30587
  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;
30588
+ if (!this.isEmpty()) {
30589
+ this.getVisibleRows();
30590
+ var newVal = {};
30591
+ var val = this.value;
30592
+ for (var key in val) {
30593
+ var row = this.getRowByKey(key);
30594
+ if (!!row && row.isVisible) {
30595
+ newVal[key] = val[key];
30596
+ }
30182
30597
  }
30183
- }
30184
- if (isChanged) {
30185
30598
  this.value = newVal;
30186
30599
  }
30187
30600
  _super.prototype.clearIncorrectValues.call(this);
30188
30601
  };
30189
- QuestionMatrixDropdownModel.prototype.clearValueIfInvisibleCore = function (reason) {
30190
- _super.prototype.clearValueIfInvisibleCore.call(this, reason);
30191
- this.clearInvisibleValuesInRows();
30602
+ QuestionMatrixDropdownModel.prototype.getRowByKey = function (val) {
30603
+ var rows = this.generatedVisibleRows;
30604
+ if (!rows)
30605
+ return null;
30606
+ for (var i = 0; i < rows.length; i++) {
30607
+ if (rows[i].rowName === val)
30608
+ return rows[i];
30609
+ }
30610
+ return null;
30192
30611
  };
30193
30612
  QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
30194
30613
  var _this = this;
@@ -30215,7 +30634,7 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30215
30634
  };
30216
30635
  QuestionMatrixDropdownModel.prototype.generateRows = function () {
30217
30636
  var result = new Array();
30218
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
30637
+ var rows = this.rows;
30219
30638
  if (!rows || rows.length === 0)
30220
30639
  return result;
30221
30640
  var val = this.value;
@@ -30232,6 +30651,17 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30232
30651
  QuestionMatrixDropdownModel.prototype.createMatrixRow = function (item, value) {
30233
30652
  return new MatrixDropdownRowModel(item.value, item, this, value);
30234
30653
  };
30654
+ QuestionMatrixDropdownModel.prototype.getFilteredDataCore = function () {
30655
+ var res = {};
30656
+ var val = this.createValueCopy();
30657
+ this.generatedVisibleRows.forEach(function (row) {
30658
+ var rowVal = val[row.rowName];
30659
+ if (row.isVisible && !helpers_Helpers.isValueEmpty(rowVal)) {
30660
+ res[row.rowName] = rowVal;
30661
+ }
30662
+ });
30663
+ return res;
30664
+ };
30235
30665
  QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
30236
30666
  keys.push("rows");
30237
30667
  };
@@ -31067,6 +31497,7 @@ var question_matrixdynamic_extends = (undefined && undefined.__extends) || (func
31067
31497
 
31068
31498
 
31069
31499
 
31500
+
31070
31501
  var MatrixDynamicRowModel = /** @class */ (function (_super) {
31071
31502
  question_matrixdynamic_extends(MatrixDynamicRowModel, _super);
31072
31503
  function MatrixDynamicRowModel(index, data, value) {
@@ -31142,7 +31573,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31142
31573
  _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
31143
31574
  _this.updateShowTableAndAddRow();
31144
31575
  });
31145
- _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.clearRowsAndResetRenderedTable(); });
31576
+ _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
31146
31577
  _this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
31147
31578
  return _this;
31148
31579
  }
@@ -31291,7 +31722,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31291
31722
  };
31292
31723
  QuestionMatrixDynamicModel.prototype.initDataUI = function () {
31293
31724
  if (!this.generatedVisibleRows) {
31294
- this.visibleRows;
31725
+ this.getVisibleRows();
31295
31726
  }
31296
31727
  };
31297
31728
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
@@ -31320,6 +31751,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31320
31751
  }
31321
31752
  if (this.generatedVisibleRows || prevValue == 0) {
31322
31753
  if (!this.generatedVisibleRows) {
31754
+ this.clearGeneratedRows();
31323
31755
  this.generatedVisibleRows = [];
31324
31756
  }
31325
31757
  this.generatedVisibleRows.splice(val);
@@ -32012,6 +32444,20 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32012
32444
  _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
32013
32445
  this.setRowCountValueFromData = false;
32014
32446
  };
32447
+ QuestionMatrixDynamicModel.prototype.getFilteredDataCore = function () {
32448
+ var res = [];
32449
+ var val = this.createValueCopy();
32450
+ if (!Array.isArray(val))
32451
+ return res;
32452
+ var rows = this.generatedVisibleRows;
32453
+ for (var i = 0; i < rows.length && i < val.length; i++) {
32454
+ var rowVal = val[i];
32455
+ if (rows[i].isVisible && !helpers_Helpers.isValueEmpty(rowVal)) {
32456
+ res.push(rowVal);
32457
+ }
32458
+ }
32459
+ return res;
32460
+ };
32015
32461
  QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
32016
32462
  if (!val || !Array.isArray(val))
32017
32463
  return;
@@ -32036,7 +32482,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32036
32482
  }
32037
32483
  else {
32038
32484
  this.clearGeneratedRows();
32039
- this.generatedVisibleRows = this.visibleRows;
32485
+ this.getVisibleRows();
32040
32486
  this.onRowsChanged();
32041
32487
  }
32042
32488
  this.setRowCountValueFromData = false;
@@ -32112,7 +32558,6 @@ var QuestionMatrixDynamicRenderedTable = /** @class */ (function (_super) {
32112
32558
  return QuestionMatrixDynamicRenderedTable;
32113
32559
  }(question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable));
32114
32560
  Serializer.addClass("matrixdynamic", [
32115
- { name: "rowsVisibleIf:condition", visible: false },
32116
32561
  { name: "allowAddRows:boolean", default: true },
32117
32562
  { name: "allowRemoveRows:boolean", default: true },
32118
32563
  { name: "rowCount:number", default: 2, minValue: 0, isBindable: true },
@@ -32342,6 +32787,7 @@ var defaultV2Css = {
32342
32787
  emptyHeaderRoot: "sd-page__empty-header",
32343
32788
  title: "sd-title sd-page__title",
32344
32789
  description: "sd-description sd-page__description",
32790
+ number: "sd-page__num",
32345
32791
  errorsContainer: "sd-page__errbox"
32346
32792
  },
32347
32793
  pageTitle: "sd-title sd-page__title",
@@ -36406,12 +36852,27 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36406
36852
  return this.parent.getQuestionErrorLocation();
36407
36853
  return this.survey ? this.survey.questionErrorLocation : "top";
36408
36854
  };
36855
+ //ITitleOwner
36856
+ PanelModelBase.prototype.getTitleOwner = function () { return this; };
36409
36857
  Object.defineProperty(PanelModelBase.prototype, "no", {
36410
- //ITitleOwner
36411
36858
  get: function () { return ""; },
36412
36859
  enumerable: false,
36413
36860
  configurable: true
36414
36861
  });
36862
+ Object.defineProperty(PanelModelBase.prototype, "cssTitleNumber", {
36863
+ get: function () {
36864
+ return this.cssClasses.panel.number;
36865
+ },
36866
+ enumerable: false,
36867
+ configurable: true
36868
+ });
36869
+ Object.defineProperty(PanelModelBase.prototype, "cssRequiredText", {
36870
+ get: function () {
36871
+ return this.cssClasses.panel.requiredText;
36872
+ },
36873
+ enumerable: false,
36874
+ configurable: true
36875
+ });
36415
36876
  Object.defineProperty(PanelModelBase.prototype, "cssError", {
36416
36877
  get: function () {
36417
36878
  return this.getCssError(this.cssClasses);
@@ -36577,7 +37038,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
36577
37038
  enumerable: false,
36578
37039
  configurable: true
36579
37040
  });
36580
- PanelModel.prototype.getTitleOwner = function () { return this; };
36581
37041
  Object.defineProperty(PanelModel.prototype, "showNumber", {
36582
37042
  /**
36583
37043
  * Specifies whether to show the panel number in the title.
@@ -37279,11 +37739,6 @@ var page_PageModel = /** @class */ (function (_super) {
37279
37739
  * @see maxTimeToFinish
37280
37740
  */
37281
37741
  _this.timeSpent = 0;
37282
- _this.locTitle.onGetTextCallback = function (text) {
37283
- if (_this.canShowPageNumber() && text)
37284
- return _this.num + ". " + text;
37285
- return text;
37286
- };
37287
37742
  _this.createLocalizableString("navigationDescription", _this, true);
37288
37743
  _this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
37289
37744
  return _this;
@@ -37301,6 +37756,27 @@ var page_PageModel = /** @class */ (function (_super) {
37301
37756
  enumerable: false,
37302
37757
  configurable: true
37303
37758
  });
37759
+ Object.defineProperty(PageModel.prototype, "no", {
37760
+ get: function () {
37761
+ return this.canShowPageNumber() ? this.num + ". " : "";
37762
+ },
37763
+ enumerable: false,
37764
+ configurable: true
37765
+ });
37766
+ Object.defineProperty(PageModel.prototype, "cssTitleNumber", {
37767
+ get: function () {
37768
+ return this.cssClasses.page.number;
37769
+ },
37770
+ enumerable: false,
37771
+ configurable: true
37772
+ });
37773
+ Object.defineProperty(PageModel.prototype, "cssRequiredText", {
37774
+ get: function () {
37775
+ return "";
37776
+ },
37777
+ enumerable: false,
37778
+ configurable: true
37779
+ });
37304
37780
  PageModel.prototype.canShowPageNumber = function () {
37305
37781
  return this.survey && this.survey.showPageNumbers;
37306
37782
  };
@@ -38075,7 +38551,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38075
38551
  *
38076
38552
  * For information on event handler parameters, refer to descriptions within the interface.
38077
38553
  *
38078
- * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle)).
38554
+ * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
38079
38555
  * @see triggers
38080
38556
  * @see runTriggers
38081
38557
  */
@@ -46813,6 +47289,7 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
46813
47289
 
46814
47290
 
46815
47291
 
47292
+
46816
47293
  /**
46817
47294
  * 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
47295
  */
@@ -46850,6 +47327,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46850
47327
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
46851
47328
  _this.onVisibleChanged();
46852
47329
  });
47330
+ _this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
46853
47331
  _this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
46854
47332
  _this.setNewRestfulProperty();
46855
47333
  var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
@@ -46880,6 +47358,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46880
47358
  enumerable: false,
46881
47359
  configurable: true
46882
47360
  });
47361
+ QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
47362
+ var _this = this;
47363
+ var options = {
47364
+ question: this,
47365
+ id: function () { return _this.otherId; },
47366
+ propertyName: "otherValue",
47367
+ className: function () { return _this.cssClasses.other; },
47368
+ placeholder: function () { return _this.otherPlaceholder; },
47369
+ isDisabledAttr: function () { return _this.isInputReadOnly || false; },
47370
+ rows: function () { return _this.commentAreaRows; },
47371
+ maxLength: function () { return _this.getOthersMaxLength(); },
47372
+ autoGrow: function () { return _this.survey && _this.survey.autoGrowComment; },
47373
+ ariaRequired: function () { return _this.ariaRequired || _this.a11y_input_ariaRequired; },
47374
+ ariaLabel: function () { return _this.ariaLabel || _this.a11y_input_ariaLabel; },
47375
+ getTextValue: function () { return _this.otherValue; },
47376
+ onTextAreaChange: function (e) { _this.onOtherValueChange(e); },
47377
+ onTextAreaInput: function (e) { _this.onOtherValueInput(e); },
47378
+ };
47379
+ return options;
47380
+ };
46883
47381
  QuestionSelectBase.prototype.getType = function () {
46884
47382
  return "selectbase";
46885
47383
  };
@@ -48839,8 +49337,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48839
49337
  get: function () {
48840
49338
  var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
48841
49339
  var res = [];
48842
- for (var i = 0; i < count; i++)
48843
- this.renderedChoices[i] && res.push(this.renderedChoices[i]);
49340
+ for (var i = 0; i < count; i++) {
49341
+ if (this.renderedChoices[i]) {
49342
+ res.push(this.renderedChoices[i]);
49343
+ }
49344
+ }
48844
49345
  return res;
48845
49346
  },
48846
49347
  enumerable: false,
@@ -48851,8 +49352,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48851
49352
  var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
48852
49353
  var res = [];
48853
49354
  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]);
49355
+ for (var i = 0; i < count; i++) {
49356
+ if (this.renderedChoices[items.length - count + i]) {
49357
+ res.push(this.renderedChoices[items.length - count + i]);
49358
+ }
49359
+ }
48856
49360
  return res;
48857
49361
  },
48858
49362
  enumerable: false,
@@ -49079,9 +49583,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
49079
49583
  return classes;
49080
49584
  };
49081
49585
  question_baseselect_decorate([
49082
- jsonobject_property({ onSet: function (newVal, target) {
49586
+ jsonobject_property({
49587
+ onSet: function (newVal, target) {
49083
49588
  target.onSelectedItemValuesChangedHandler(newVal);
49084
- } })
49589
+ }
49590
+ })
49085
49591
  ], QuestionSelectBase.prototype, "selectedItemValues", void 0);
49086
49592
  question_baseselect_decorate([
49087
49593
  jsonobject_property()
@@ -51422,6 +51928,7 @@ var question_matrix_extends = (undefined && undefined.__extends) || (function ()
51422
51928
 
51423
51929
 
51424
51930
 
51931
+
51425
51932
  var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
51426
51933
  question_matrix_extends(MatrixRowModel, _super);
51427
51934
  function MatrixRowModel(item, fullName, data, value) {
@@ -51709,9 +52216,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51709
52216
  _this.onColumnsChanged();
51710
52217
  });
51711
52218
  _this.registerPropertyChangedHandlers(["rows"], function () {
51712
- if (!_this.filterItems()) {
51713
- _this.onRowsChanged();
51714
- }
52219
+ _this.runCondition(_this.getDataFilteredValues(), _this.getDataFilteredProperties());
52220
+ _this.onRowsChanged();
51715
52221
  });
51716
52222
  _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
51717
52223
  _this.updateVisibilityBasedOnRows();
@@ -51881,21 +52387,31 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51881
52387
  }
51882
52388
  return res;
51883
52389
  };
51884
- QuestionMatrixModel.prototype.runItemsCondition = function (values, properties) {
52390
+ QuestionMatrixModel.prototype.runCondition = function (values, properties) {
51885
52391
  itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
51886
- return _super.prototype.runItemsCondition.call(this, values, properties);
52392
+ _super.prototype.runCondition.call(this, values, properties);
52393
+ };
52394
+ QuestionMatrixModel.prototype.createRowsVisibleIfRunner = function () {
52395
+ return !!this.rowsVisibleIf ? new ConditionRunner(this.rowsVisibleIf) : null;
52396
+ };
52397
+ QuestionMatrixModel.prototype.onRowsChanged = function () {
52398
+ this.clearGeneratedRows();
52399
+ _super.prototype.onRowsChanged.call(this);
51887
52400
  };
51888
52401
  QuestionMatrixModel.prototype.getVisibleRows = function () {
52402
+ if (!!this.generatedVisibleRows)
52403
+ return this.generatedVisibleRows;
51889
52404
  var result = new Array();
51890
52405
  var val = this.value;
51891
52406
  if (!val)
51892
52407
  val = {};
51893
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
52408
+ var rows = this.filteredRows || this.rows;
51894
52409
  for (var i = 0; i < rows.length; i++) {
51895
52410
  var row = rows[i];
51896
52411
  if (this.isValueEmpty(row.value))
51897
52412
  continue;
51898
- result.push(this.createMatrixRow(row, this.id + "_" + row.value.toString().replace(/\s/g, "_"), val[row.value]));
52413
+ var rowId = this.id + "_" + row.value.toString().replace(/\s/g, "_");
52414
+ result.push(this.createMatrixRow(row, rowId, val[row.value]));
51899
52415
  }
51900
52416
  this.generatedVisibleRows = result;
51901
52417
  return result;
@@ -51911,6 +52427,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51911
52427
  QuestionMatrixModel.prototype.endLoadingFromJson = function () {
51912
52428
  _super.prototype.endLoadingFromJson.call(this);
51913
52429
  this.rows = this.sortVisibleRows(this.rows);
52430
+ this.onRowsChanged();
52431
+ this.onColumnsChanged();
51914
52432
  };
51915
52433
  QuestionMatrixModel.prototype.isNewValueCorrect = function (val) {
51916
52434
  return helpers_Helpers.isValueObject(val, true);
@@ -52143,11 +52661,47 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
52143
52661
  json["type"] = question.getType();
52144
52662
  return json;
52145
52663
  };
52664
+ QuestionMatrixModel.prototype.clearIncorrectValues = function () {
52665
+ this.clearInvisibleValuesInRowsAndColumns(true, true, true);
52666
+ _super.prototype.clearIncorrectValues.call(this);
52667
+ };
52146
52668
  QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function (reason) {
52147
52669
  _super.prototype.clearValueIfInvisibleCore.call(this, reason);
52148
- if (this.hasRows) {
52149
- this.clearInvisibleValuesInRows();
52670
+ this.clearInvisibleValuesInRowsAndColumns(true, true, false);
52671
+ };
52672
+ QuestionMatrixModel.prototype.clearInvisibleColumnValues = function () {
52673
+ this.clearInvisibleValuesInRowsAndColumns(false, true, false);
52674
+ };
52675
+ QuestionMatrixModel.prototype.clearInvisibleValuesInRows = function () {
52676
+ this.clearInvisibleValuesInRowsAndColumns(true, false, false);
52677
+ };
52678
+ QuestionMatrixModel.prototype.clearInvisibleValuesInRowsAndColumns = function (inRows, inColumns, inCorrectRows) {
52679
+ if (this.isEmpty())
52680
+ return;
52681
+ var updatedData = this.getUnbindValue(this.value);
52682
+ var newData = {};
52683
+ var rows = this.rows;
52684
+ for (var i = 0; i < rows.length; i++) {
52685
+ var key = rows[i].value;
52686
+ if (!!updatedData[key]) {
52687
+ if (inRows && !rows[i].isVisible || inColumns && !this.getVisibleColumnByValue(updatedData[key])) {
52688
+ delete updatedData[key];
52689
+ }
52690
+ else {
52691
+ newData[key] = updatedData[key];
52692
+ }
52693
+ }
52150
52694
  }
52695
+ if (inCorrectRows) {
52696
+ updatedData = newData;
52697
+ }
52698
+ if (this.isTwoValueEquals(updatedData, this.value))
52699
+ return;
52700
+ this.value = updatedData;
52701
+ };
52702
+ QuestionMatrixModel.prototype.getVisibleColumnByValue = function (val) {
52703
+ var col = itemvalue_ItemValue.getItemByValue(this.columns, val);
52704
+ return !!col && col.isVisible ? col : null;
52151
52705
  };
52152
52706
  QuestionMatrixModel.prototype.getFirstInputElementId = function () {
52153
52707
  var rows = this.generatedVisibleRows;
@@ -53053,6 +53607,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
53053
53607
  }
53054
53608
  var valName = this.getValidatorTitle();
53055
53609
  var emailValidator = new EmailValidator();
53610
+ emailValidator.errorOwner = this;
53056
53611
  if (this.inputType === "email" &&
53057
53612
  !this.validators.some(function (v) { return v.getType() === "emailvalidator"; })) {
53058
53613
  var validateResult = emailValidator.validate(this.value, valName);
@@ -57842,6 +58397,8 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
57842
58397
 
57843
58398
 
57844
58399
 
58400
+
58401
+
57845
58402
  /**
57846
58403
  * A class that describes the Long Text question type.
57847
58404
  *
@@ -57849,9 +58406,46 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
57849
58406
  */
57850
58407
  var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
57851
58408
  question_comment_extends(QuestionCommentModel, _super);
57852
- function QuestionCommentModel() {
57853
- return _super !== null && _super.apply(this, arguments) || this;
58409
+ function QuestionCommentModel(name) {
58410
+ var _this_1 = _super.call(this, name) || this;
58411
+ _this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
58412
+ return _this_1;
57854
58413
  }
58414
+ QuestionCommentModel.prototype.getTextAreaOptions = function () {
58415
+ var _this_1 = this;
58416
+ var _this = this;
58417
+ var updateQuestionValue = function (newValue) {
58418
+ if (!helpers_Helpers.isTwoValueEquals(_this.value, newValue, false, true, false)) {
58419
+ _this.value = newValue;
58420
+ }
58421
+ };
58422
+ var options = {
58423
+ question: this,
58424
+ id: function () { return _this_1.inputId; },
58425
+ propertyName: "value",
58426
+ className: function () { return _this_1.className; },
58427
+ placeholder: function () { return _this_1.renderedPlaceholder; },
58428
+ isDisabledAttr: function () { return _this_1.isDisabledAttr; },
58429
+ isReadOnlyAttr: function () { return _this_1.isReadOnlyAttr; },
58430
+ autoGrow: function () { return _this_1.renderedAutoGrow; },
58431
+ maxLength: function () { return _this_1.getMaxLength(); },
58432
+ rows: function () { return _this_1.rows; },
58433
+ cols: function () { return _this_1.cols; },
58434
+ ariaRequired: function () { return _this_1.a11y_input_ariaRequired; },
58435
+ ariaLabel: function () { return _this_1.a11y_input_ariaLabel; },
58436
+ ariaLabelledBy: function () { return _this_1.a11y_input_ariaLabelledBy; },
58437
+ ariaDescribedBy: function () { return _this_1.a11y_input_ariaDescribedBy; },
58438
+ ariaInvalid: function () { return _this_1.a11y_input_ariaInvalid; },
58439
+ ariaErrormessage: function () { return _this_1.a11y_input_ariaErrormessage; },
58440
+ getTextValue: function () { return _this_1.value; },
58441
+ onTextAreaChange: function (e) { updateQuestionValue(e.target.value); },
58442
+ onTextAreaInput: function (event) { _this_1.onInput(event); },
58443
+ onTextAreaKeyDown: function (event) { _this_1.onKeyDown(event); },
58444
+ onTextAreaFocus: function (event) { _this_1.onFocus(event); },
58445
+ onTextAreaBlur: function (event) { _this_1.onBlur(event); }
58446
+ };
58447
+ return options;
58448
+ };
57855
58449
  Object.defineProperty(QuestionCommentModel.prototype, "rows", {
57856
58450
  /**
57857
58451
  * Specifies the visible height of the comment area, measured in lines.
@@ -57957,9 +58551,9 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
57957
58551
  _super.prototype.afterRenderQuestionElement.call(this, el);
57958
58552
  };
57959
58553
  QuestionCommentModel.prototype.updateElement = function () {
57960
- var _this = this;
58554
+ var _this_1 = this;
57961
58555
  if (this.element && this.renderedAutoGrow) {
57962
- setTimeout(function () { return increaseHeightByContent(_this.element); }, 1);
58556
+ setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
57963
58557
  }
57964
58558
  };
57965
58559
  QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
@@ -69446,8 +70040,8 @@ Serializer.addClass("currencymask", [
69446
70040
 
69447
70041
  var Version;
69448
70042
  var ReleaseDate;
69449
- Version = "" + "1.12.1";
69450
- ReleaseDate = "" + "2024-09-10";
70043
+ Version = "" + "1.12.2";
70044
+ ReleaseDate = "" + "2024-09-16";
69451
70045
  function checkLibraryVersion(ver, libraryName) {
69452
70046
  if (Version != ver) {
69453
70047
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -69612,6 +70206,7 @@ function checkPrefix(prefix) {
69612
70206
 
69613
70207
 
69614
70208
 
70209
+
69615
70210
 
69616
70211
 
69617
70212
  //Uncomment to include the "date" question type.
@@ -70506,6 +71101,7 @@ var modernCss = {
70506
71101
  page: {
70507
71102
  root: "sv-page sv-body__page",
70508
71103
  title: "sv-title sv-page__title",
71104
+ number: "sv-page__num",
70509
71105
  description: "sv-description sv-page__description",
70510
71106
  },
70511
71107
  pageTitle: "sv-title sv-page__title",
@@ -75156,43 +75752,43 @@ var japaneseSurveyStrings = {
75156
75752
  otherItemText: "その他(説明)",
75157
75753
  noneItemText: "なし",
75158
75754
  refuseItemText: "回答を拒否する",
75159
- dontKnowItemText: "わかりません",
75755
+ dontKnowItemText: "わからない",
75160
75756
  selectAllItemText: "すべて選択",
75161
- progressText: "{0}/{1}",
75757
+ progressText: "ページ{0}/{1}",
75162
75758
  indexText: "{1}の{0}",
75163
75759
  panelDynamicProgressText: "{1}の{0}を記録する",
75164
75760
  panelDynamicTabTextFormat: "Panel {panelIndex}",
75165
- questionsProgressText: "{0}/{1}の質問に回答しました。",
75166
- emptySurvey: "この調査に表示できるページや質問はありません",
75167
- completingSurvey: "調査を完了してくれてありがとうございました",
75168
- completingSurveyBefore: "当社の記録によると、この調査はすでに完了しています。",
75169
- loadingSurvey: "調査をダウンロード中",
75761
+ questionsProgressText: "{0}/{1}問回答済",
75762
+ emptySurvey: "アンケートに表示可能な要素がありません。",
75763
+ completingSurvey: "アンケートにご協力いただき、ありがとうございます。",
75764
+ completingSurveyBefore: "このアンケートはすでに回答済みです。",
75765
+ loadingSurvey: "アンケートを読み込んでいます...",
75170
75766
  placeholder: "選択",
75171
- ratingOptionsCaption: "選ぶ。。。",
75172
- value: "値打ち",
75173
- requiredError: "質問にお答え下さい",
75174
- requiredErrorInPanel: "最低でも1つの質問に答えてください。",
75175
- requiredInAllRowsError: "質問には全列で回答してください。",
75176
- eachRowUniqueError: "各行には一意の値が必要です。",
75767
+ ratingOptionsCaption: "選択。。。",
75768
+ value: "",
75769
+ requiredError: "回答が必要です",
75770
+ requiredErrorInPanel: "回答が必要です:少なくとも1つの質問に答えてください。",
75771
+ requiredInAllRowsError: "回答が必要です:すべての行の質問に答えてください。",
75772
+ eachRowUniqueError: "各行に一意の値を入力してください。",
75177
75773
  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'を返すべきです。",
75774
+ minError: "値は {0} 以上である必要があります",
75775
+ maxError: "値は {0} 以下である必要があります",
75776
+ textMinLength: "少なくとも {0} 文字を入力してください。",
75777
+ textMaxLength: "{0} 文字以内で入力してください。",
75778
+ textMinMaxLength: "{0} 文字以上 {1} 文字以内で入力してください。",
75779
+ minRowCountError: "少なくとも {0} 行を入力してください。",
75780
+ minSelectError: "少なくとも {0} 個のオプションを選択してください。",
75781
+ maxSelectError: "{0} 個以下の選択肢を選択してください。",
75782
+ numericMinMax: "'{0}' {1} 以上 {2} 以下である必要があります",
75783
+ numericMin: "'{0}' {1} 以上である必要があります",
75784
+ numericMax: "'{0}' {1} 以下である必要があります",
75785
+ invalidEmail: "有効なメールアドレスを入力してください。",
75786
+ invalidExpression: "式: {0} 'true' を返す必要があります。",
75191
75787
  urlRequestError: "リクエストはエラー '{0}' を返しました。{1}",
75192
75788
  urlGetChoicesError: "リクエストが空のデータを返したか、'path' プロパティが正しくありません。",
75193
75789
  exceedMaxSize: "ファイルのサイズは{0}を超えてはいけません",
75194
75790
  noUploadFilesHandler: "ファイルはアップロードできません。「onUploadFiles」イベントのハンドラーを追加してください。",
75195
- otherRequiredError: "その他の値を入力してください。",
75791
+ otherRequiredError: "回答が必要です:他の値を入力してください。",
75196
75792
  uploadingFile: "ファイルをアップロード中です。しばらくしてから再度お試し下さい",
75197
75793
  loadingFile: "読み込み中",
75198
75794
  chooseFile: "ファイルを選択",
@@ -75202,20 +75798,20 @@ var japaneseSurveyStrings = {
75202
75798
  keyDuplicationError: "この値は一意でなければなりません。",
75203
75799
  addColumn: "列の追加",
75204
75800
  addRow: "追加行",
75205
- removeRow: "除去",
75206
- emptyRowsText: "行はありません。",
75801
+ removeRow: "削除",
75802
+ emptyRowsText: "行がありません。",
75207
75803
  addPanel: "新規追加",
75208
- removePanel: "除去",
75804
+ removePanel: "削除",
75209
75805
  showDetails: "詳細を表示",
75210
- hideDetails: "詳細を隠す",
75211
- choices_Item: "品目",
75212
- matrix_column: "コラム",
75806
+ hideDetails: "詳細を非表示",
75807
+ choices_Item: "項目",
75808
+ matrix_column: "",
75213
75809
  matrix_row: "行",
75214
75810
  multipletext_itemname: "テキスト",
75215
- savingData: "結果はサーバーに保存されています...。",
75811
+ savingData: "結果を保存中...。",
75216
75812
  savingDataError: "エラーが発生し、結果を保存できませんでした。",
75217
- savingDataSuccess: "結果は無事に保存されました",
75218
- savingExceedSize: "回答は 64 KB を超えています。ファイルのサイズを小さくしてもう一度お試しいただくか、アンケートの所有者にお問い合わせください。",
75813
+ savingDataSuccess: "結果が正常に保存されました",
75814
+ savingExceedSize: "回答は 64 KB を超えています。ファイルのサイズを小さくしてもう一度お試しいただくか、アンケートの作成者にお問い合わせください。",
75219
75815
  saveAgainButton: "もう一度試してみてください。",
75220
75816
  timerMin: "僅少",
75221
75817
  timerSec: "セック",
@@ -75230,23 +75826,23 @@ var japaneseSurveyStrings = {
75230
75826
  signaturePlaceHolderReadOnly: "署名なし",
75231
75827
  chooseFileCaption: "ファイルを選択",
75232
75828
  takePhotoCaption: "写真を撮る",
75233
- photoPlaceholder: "下のボタンをクリックして、カメラを使用して写真を撮ります。",
75234
- fileOrPhotoPlaceholder: "アップロードするファイルをドラッグアンドドロップまたは選択するか、カメラを使用して写真を撮ります。",
75235
- replaceFileCaption: "ファイルの置換",
75829
+ photoPlaceholder: "下のボタンをクリックしてカメラで写真を撮影してください。",
75830
+ fileOrPhotoPlaceholder: "ファイルをドラッグ&ドロップまたは選択してアップロードするか、カメラで写真を撮影してください。",
75831
+ replaceFileCaption: "ファイルを置換",
75236
75832
  removeFileCaption: "このファイルを削除",
75237
- booleanCheckedLabel: "",
75238
- booleanUncheckedLabel: "",
75833
+ booleanCheckedLabel: "はい",
75834
+ booleanUncheckedLabel: "いいえ",
75239
75835
  confirmRemoveFile: "このファイルを削除してもよろしいですか?{0}?",
75240
75836
  confirmRemoveAllFiles: "すべてのファイルを削除してもよろしいですか?",
75241
- questionTitlePatternText: "質問名",
75837
+ questionTitlePatternText: "質問のタイトル",
75242
75838
  modalCancelButtonText: "キャンセル",
75243
75839
  modalApplyButtonText: "申し込む",
75244
75840
  filterStringPlaceholder: "検索するタイプ...",
75245
75841
  emptyMessage: "表示するデータがありません",
75246
75842
  noEntriesText: "エントリはまだありません。\n下のボタンをクリックして、新しいエントリを追加します。",
75247
75843
  noEntriesReadonlyText: "エントリはありません。",
75248
- tabTitlePlaceholder: "新規パネル",
75249
- more: "もっとその",
75844
+ tabTitlePlaceholder: "新しいパネル",
75845
+ more: "続きを見る",
75250
75846
  tagboxDoneButtonCaption: "わかりました",
75251
75847
  selectToRankEmptyRankedAreaText: "すべての選択肢がランク付けされます",
75252
75848
  selectToRankEmptyUnrankedAreaText: "ここに選択肢をドラッグアンドドロップしてランク付けします",
@@ -80630,28 +81226,27 @@ var title_content_TitleContent = /** @class */ (function (_super) {
80630
81226
  };
80631
81227
  var spans = [];
80632
81228
  if (element.isRequireTextOnStart) {
80633
- spans.push(this.renderRequireText(element, cssClasses));
81229
+ spans.push(this.renderRequireText(element));
80634
81230
  spans.push(getSpaceSpan("req-sp"));
80635
81231
  }
80636
81232
  var questionNumber = element.no;
80637
81233
  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));
81234
+ 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
81235
  spans.push(getSpaceSpan("num-sp"));
80641
81236
  }
80642
81237
  if (element.isRequireTextBeforeTitle) {
80643
- spans.push(this.renderRequireText(element, cssClasses));
81238
+ spans.push(this.renderRequireText(element));
80644
81239
  spans.push(getSpaceSpan("req-sp"));
80645
81240
  }
80646
81241
  spans.push(reactquestion_element_SurveyElementBase.renderLocString(element.locTitle, null, "q_title"));
80647
81242
  if (element.isRequireTextAfterTitle) {
80648
81243
  spans.push(getSpaceSpan("req-sp"));
80649
- spans.push(this.renderRequireText(element, cssClasses));
81244
+ spans.push(this.renderRequireText(element));
80650
81245
  }
80651
81246
  return spans;
80652
81247
  };
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));
81248
+ TitleContent.prototype.renderRequireText = function (element) {
81249
+ 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
81250
  };
80656
81251
  return TitleContent;
80657
81252
  }(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component));
@@ -80827,6 +81422,56 @@ ReactElementFactory.Instance.registerElement("sv-character-counter", function (p
80827
81422
  return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(character_counter_CharacterCounterComponent, props);
80828
81423
  });
80829
81424
 
81425
+ // CONCATENATED MODULE: ./packages/survey-react-ui/src/components/text-area.tsx
81426
+ var text_area_extends = (undefined && undefined.__extends) || (function () {
81427
+ var extendStatics = function (d, b) {
81428
+ extendStatics = Object.setPrototypeOf ||
81429
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
81430
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
81431
+ return extendStatics(d, b);
81432
+ };
81433
+ return function (d, b) {
81434
+ if (typeof b !== "function" && b !== null)
81435
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
81436
+ extendStatics(d, b);
81437
+ function __() { this.constructor = d; }
81438
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
81439
+ };
81440
+ })();
81441
+
81442
+
81443
+
81444
+ var text_area_TextAreaComponent = /** @class */ (function (_super) {
81445
+ text_area_extends(TextAreaComponent, _super);
81446
+ function TextAreaComponent(props) {
81447
+ var _this = _super.call(this, props) || this;
81448
+ _this.initialValue = _this.viewModel.getTextValue() || "";
81449
+ return _this;
81450
+ }
81451
+ Object.defineProperty(TextAreaComponent.prototype, "viewModel", {
81452
+ get: function () {
81453
+ return this.props.viewModel;
81454
+ },
81455
+ enumerable: false,
81456
+ configurable: true
81457
+ });
81458
+ TextAreaComponent.prototype.canRender = function () {
81459
+ return !!this.viewModel.question;
81460
+ };
81461
+ TextAreaComponent.prototype.renderElement = function () {
81462
+ var _this = this;
81463
+ 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 } }));
81464
+ };
81465
+ TextAreaComponent.prototype.componentWillUnmount = function () {
81466
+ this.viewModel.dispose();
81467
+ };
81468
+ return TextAreaComponent;
81469
+ }(reactquestion_element_SurveyElementBase));
81470
+
81471
+ ReactElementFactory.Instance.registerElement("sv-text-area", function (props) {
81472
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(text_area_TextAreaComponent, props);
81473
+ });
81474
+
80830
81475
  // CONCATENATED MODULE: ./packages/survey-react-ui/src/reactquestion_comment.tsx
80831
81476
  var reactquestion_comment_extends = (undefined && undefined.__extends) || (function () {
80832
81477
  var extendStatics = function (d, b) {
@@ -80853,31 +81498,21 @@ var reactquestion_comment_SurveyQuestionComment = /** @class */ (function (_supe
80853
81498
  function SurveyQuestionComment(props) {
80854
81499
  return _super.call(this, props) || this;
80855
81500
  }
81501
+ SurveyQuestionComment.prototype.renderCharacterCounter = function () {
81502
+ var counter = null;
81503
+ if (!!this.question.getMaxLength()) {
81504
+ counter = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](character_counter_CharacterCounterComponent, { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter });
81505
+ }
81506
+ return counter;
81507
+ };
80856
81508
  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
81509
  if (this.question.isReadOnlyRenderDiv()) {
80876
81510
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", null, this.question.value);
80877
81511
  }
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;
81512
+ var counter = this.renderCharacterCounter();
81513
+ var textAreaModel = this.props.question.textAreaModel;
80879
81514
  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 } }),
81515
+ external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](text_area_TextAreaComponent, { viewModel: textAreaModel }),
80881
81516
  counter));
80882
81517
  };
80883
81518
  return SurveyQuestionComment;
@@ -80887,61 +81522,22 @@ var reactquestion_comment_SurveyQuestionCommentItem = /** @class */ (function (_
80887
81522
  reactquestion_comment_extends(SurveyQuestionCommentItem, _super);
80888
81523
  function SurveyQuestionCommentItem(props) {
80889
81524
  var _this = _super.call(this, props) || this;
80890
- _this.state = { comment: _this.getComment() || "" };
81525
+ _this.textAreaModel = _this.getTextAreaModel();
80891
81526
  return _this;
80892
81527
  }
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
81528
  SurveyQuestionCommentItem.prototype.canRender = function () {
80916
81529
  return !!this.props.question;
80917
81530
  };
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;
81531
+ SurveyQuestionCommentItem.prototype.getTextAreaModel = function () {
81532
+ return this.props.question.commentTextAreaModel;
80935
81533
  };
80936
81534
  SurveyQuestionCommentItem.prototype.renderElement = function () {
80937
- var _this = this;
80938
81535
  var question = this.props.question;
80939
- var className = this.props.otherCss || this.cssClasses.comment;
80940
81536
  if (question.isReadOnlyRenderDiv()) {
80941
- var comment = this.getComment() || "";
81537
+ var comment = this.textAreaModel.getTextValue() || "";
80942
81538
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", null, comment);
80943
81539
  }
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 } }));
81540
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](text_area_TextAreaComponent, { viewModel: this.textAreaModel }));
80945
81541
  };
80946
81542
  return SurveyQuestionCommentItem;
80947
81543
  }(ReactSurveyElement));
@@ -80951,23 +81547,8 @@ var SurveyQuestionOtherValueItem = /** @class */ (function (_super) {
80951
81547
  function SurveyQuestionOtherValueItem() {
80952
81548
  return _super !== null && _super.apply(this, arguments) || this;
80953
81549
  }
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;
81550
+ SurveyQuestionOtherValueItem.prototype.getTextAreaModel = function () {
81551
+ return this.props.question.otherTextAreaModel;
80971
81552
  };
80972
81553
  return SurveyQuestionOtherValueItem;
80973
81554
  }(reactquestion_comment_SurveyQuestionCommentItem));