survey-react 1.11.14 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.14
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)
@@ -1914,6 +1915,18 @@ var helpers_Helpers = /** @class */ (function () {
1914
1915
  }
1915
1916
  return len1 === len2 ? 0 : (len1 < len2 ? -1 : 1);
1916
1917
  };
1918
+ Helpers.isUrlYoutubeVideo = function (url) {
1919
+ if (!url)
1920
+ return false;
1921
+ var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
1922
+ url = url.toLowerCase();
1923
+ url = url.replace(/^https?:\/\//, "");
1924
+ for (var i = 0; i < youtubeDomains.length; i++) {
1925
+ if (url.indexOf(youtubeDomains[i] + "/") === 0)
1926
+ return true;
1927
+ }
1928
+ return false;
1929
+ };
1917
1930
  return Helpers;
1918
1931
  }());
1919
1932
 
@@ -9665,6 +9678,8 @@ var base_Base = /** @class */ (function () {
9665
9678
  name: name,
9666
9679
  oldValue: oldValue,
9667
9680
  newValue: newValue,
9681
+ arrayChanges: arrayChanges,
9682
+ target: target
9668
9683
  });
9669
9684
  this.doPropertyValueChangedCallback(name, oldValue, newValue, arrayChanges, this);
9670
9685
  this.checkConditionPropertyChanged(name);
@@ -10180,6 +10195,8 @@ var base_Base = /** @class */ (function () {
10180
10195
  this.onElementRenderedEventEnabled = true;
10181
10196
  };
10182
10197
  Base.prototype.disableOnElementRenderedEvent = function () {
10198
+ var _a;
10199
+ (_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: true });
10183
10200
  this.onElementRenderedEventEnabled = false;
10184
10201
  };
10185
10202
  Object.defineProperty(Base.prototype, "onElementRerendered", {
@@ -10191,7 +10208,7 @@ var base_Base = /** @class */ (function () {
10191
10208
  });
10192
10209
  Base.prototype.afterRerender = function () {
10193
10210
  var _a;
10194
- (_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, undefined);
10211
+ (_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: false });
10195
10212
  };
10196
10213
  Base.currentDependencis = undefined;
10197
10214
  return Base;
@@ -10306,6 +10323,10 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
10306
10323
  function ResponsivityManager(container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) {
10307
10324
  var _this = this;
10308
10325
  if (dotsItemSize === void 0) { dotsItemSize = null; }
10326
+ if (delayedUpdateFunction === void 0) { delayedUpdateFunction = function (callback) { if (queueMicrotask)
10327
+ queueMicrotask(callback);
10328
+ else
10329
+ callback(); }; }
10309
10330
  this.container = container;
10310
10331
  this.model = model;
10311
10332
  this.itemsSelector = itemsSelector;
@@ -10323,8 +10344,9 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
10323
10344
  return DomDocumentHelper.getComputedStyle(elt);
10324
10345
  };
10325
10346
  this.model.updateCallback = function (isResetInitialized) {
10326
- if (isResetInitialized)
10347
+ if (isResetInitialized) {
10327
10348
  _this.isInitialized = false;
10349
+ }
10328
10350
  setTimeout(function () { _this.process(); }, 1);
10329
10351
  };
10330
10352
  if (typeof ResizeObserver !== "undefined") {
@@ -10363,16 +10385,6 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
10363
10385
  (currentAction.needSeparator ? this.separatorSize : 0)
10364
10386
  : currentAction.maxDimension;
10365
10387
  };
10366
- ResponsivityManager.prototype.getRenderedVisibleActionsCount = function () {
10367
- var _this = this;
10368
- var count = 0;
10369
- this.container.querySelectorAll(this.itemsSelector).forEach(function (item) {
10370
- if (_this.calcItemSize(item) > 0) {
10371
- count++;
10372
- }
10373
- });
10374
- return count;
10375
- };
10376
10388
  ResponsivityManager.prototype.calcItemsSizes = function () {
10377
10389
  var _this = this;
10378
10390
  if (this.isInitialized)
@@ -10416,16 +10428,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
10416
10428
  _this.isInitialized = true;
10417
10429
  processResponsiveness_1();
10418
10430
  };
10419
- if (this.getRenderedVisibleActionsCount() < this.model.visibleActions.length) {
10420
- if (this.delayedUpdateFunction) {
10421
- this.delayedUpdateFunction(callback);
10422
- }
10423
- else if (queueMicrotask) {
10424
- queueMicrotask(callback);
10425
- }
10426
- else {
10427
- callback();
10428
- }
10431
+ if (this.delayedUpdateFunction) {
10432
+ this.delayedUpdateFunction(callback);
10429
10433
  }
10430
10434
  else {
10431
10435
  callback();
@@ -12337,7 +12341,6 @@ var animation_AnimationUtils = /** @class */ (function () {
12337
12341
  var animationsCount = this.getAnimationsCount(element);
12338
12342
  var onEndCallback = function (isCancel) {
12339
12343
  if (isCancel === void 0) { isCancel = true; }
12340
- _this.afterAnimationRun(element, options);
12341
12344
  callback(isCancel);
12342
12345
  clearTimeout(cancelTimeout);
12343
12346
  _this.removeCancelCallback(onEndCallback);
@@ -12356,7 +12359,6 @@ var animation_AnimationUtils = /** @class */ (function () {
12356
12359
  }, this.getAnimationDuration(element) + 10);
12357
12360
  }
12358
12361
  else {
12359
- this.afterAnimationRun(element, options);
12360
12362
  callback(true);
12361
12363
  }
12362
12364
  };
@@ -12391,6 +12393,7 @@ var animation_AnimationUtils = /** @class */ (function () {
12391
12393
  element.classList.remove(cssClass);
12392
12394
  });
12393
12395
  }
12396
+ this.afterAnimationRun(element, options);
12394
12397
  };
12395
12398
  AnimationUtils.prototype.onNextRender = function (callback, isCancel) {
12396
12399
  var _this = this;
@@ -12513,7 +12516,7 @@ var animation_AnimationProperty = /** @class */ (function () {
12513
12516
  this.update = update;
12514
12517
  this.getCurrentValue = getCurrentValue;
12515
12518
  this._debouncedSync = debounce(function (newValue) {
12516
- _this.animation.cancel();
12519
+ _this.cancelAnimations();
12517
12520
  try {
12518
12521
  _this._sync(newValue);
12519
12522
  }
@@ -12546,8 +12549,13 @@ var animation_AnimationProperty = /** @class */ (function () {
12546
12549
  rerenderEvent.remove(nextRenderCallback_1);
12547
12550
  _this.cancelCallback = undefined;
12548
12551
  };
12549
- var nextRenderCallback_1 = function () {
12550
- callback();
12552
+ var nextRenderCallback_1 = function (_, options) {
12553
+ if (options.isCancel) {
12554
+ onCancel && onCancel();
12555
+ }
12556
+ else {
12557
+ callback();
12558
+ }
12551
12559
  clear_1();
12552
12560
  };
12553
12561
  this.cancelCallback = function () {
@@ -12568,6 +12576,9 @@ var animation_AnimationProperty = /** @class */ (function () {
12568
12576
  };
12569
12577
  AnimationProperty.prototype.cancel = function () {
12570
12578
  this._debouncedSync.cancel();
12579
+ this.cancelAnimations();
12580
+ };
12581
+ AnimationProperty.prototype.cancelAnimations = function () {
12571
12582
  this.cancelCallback && this.cancelCallback();
12572
12583
  this.animation.cancel();
12573
12584
  };
@@ -12613,7 +12624,8 @@ var animation_AnimationGroup = /** @class */ (function (_super) {
12613
12624
  AnimationGroup.prototype._sync = function (newValue) {
12614
12625
  var _this = this;
12615
12626
  var _a, _b;
12616
- var oldValue = this.getCurrentValue();
12627
+ newValue = [].concat(newValue);
12628
+ var oldValue = [].concat(this.getCurrentValue());
12617
12629
  var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
12618
12630
  var _c = compareArrays(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; })), addedItems = _c.addedItems, deletedItems = _c.deletedItems, reorderedItems = _c.reorderedItems, mergedItems = _c.mergedItems;
12619
12631
  if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
@@ -12887,7 +12899,7 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
12887
12899
  });
12888
12900
  SurveyElementCore.prototype.getIsTitleRenderedAsString = function () { return !this.isTitleOwner; };
12889
12901
  survey_element_decorate([
12890
- jsonobject_property()
12902
+ jsonobject_property({})
12891
12903
  ], SurveyElementCore.prototype, "hasDescription", void 0);
12892
12904
  survey_element_decorate([
12893
12905
  jsonobject_property({
@@ -13477,6 +13489,14 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13477
13489
  enumerable: false,
13478
13490
  configurable: true
13479
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
+ });
13480
13500
  SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
13481
13501
  SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
13482
13502
  Object.defineProperty(SurveyElement.prototype, "cssError", {
@@ -14056,17 +14076,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14056
14076
  var _this = this;
14057
14077
  var beforeRunAnimation = function (el) {
14058
14078
  _this.isAnimatingCollapseExpand = true;
14059
- el.style.setProperty("--animation-height", el.offsetHeight + "px");
14079
+ prepareElementForVerticalAnimation(el);
14060
14080
  };
14061
14081
  var afterRunAnimation = function (el) {
14062
14082
  _this.isAnimatingCollapseExpand = false;
14083
+ cleanHtmlElementAfterAnimation(el);
14063
14084
  };
14064
14085
  return {
14065
14086
  getRerenderEvent: function () { return _this.onElementRerendered; },
14066
14087
  getEnterOptions: function () {
14067
14088
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
14068
14089
  return {
14069
- cssClass: cssClasses.contentFadeIn,
14090
+ cssClass: cssClasses.contentEnter,
14070
14091
  onBeforeRunAnimation: beforeRunAnimation,
14071
14092
  onAfterRunAnimation: function (el) {
14072
14093
  afterRunAnimation(el);
@@ -14076,8 +14097,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14076
14097
  },
14077
14098
  getLeaveOptions: function () {
14078
14099
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
14079
- return {
14080
- cssClass: cssClasses.contentFadeOut,
14100
+ return { cssClass: cssClasses.contentLeave,
14081
14101
  onBeforeRunAnimation: beforeRunAnimation,
14082
14102
  onAfterRunAnimation: afterRunAnimation
14083
14103
  };
@@ -14909,10 +14929,142 @@ function navigateToUrl(url) {
14909
14929
  function wrapUrlForBackgroundImage(url) {
14910
14930
  return !!url ? ["url(", url, ")"].join("") : "";
14911
14931
  }
14932
+ // new-name: old-name
14933
+ var renamedIcons = {
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"
15057
+ };
14912
15058
  function getIconNameFromProxy(iconName) {
14913
15059
  if (!iconName)
14914
15060
  return iconName;
14915
15061
  var proxyName = settings.customIcons[iconName];
15062
+ if (!proxyName) {
15063
+ var oldName = renamedIcons[iconName];
15064
+ if (!!oldName) {
15065
+ proxyName = settings.customIcons[oldName];
15066
+ }
15067
+ }
14916
15068
  return !!proxyName ? proxyName : iconName;
14917
15069
  }
14918
15070
  function createSvg(size, width, height, iconName, svgElem, title) {
@@ -15307,6 +15459,53 @@ function compareArrays(oldValue, newValue, getKey) {
15307
15459
  });
15308
15460
  return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
15309
15461
  }
15462
+ function getVerticalDimensions(el) {
15463
+ if (DomDocumentHelper.isAvailable()) {
15464
+ var _a = DomDocumentHelper.getComputedStyle(el), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, borderTopWidth = _a.borderTopWidth, borderBottomWidth = _a.borderBottomWidth, marginTop = _a.marginTop, marginBottom = _a.marginBottom, boxSizing = _a.boxSizing;
15465
+ var heightTo = el.offsetHeight + "px";
15466
+ if (boxSizing == "content-box") {
15467
+ var heightPx_1 = el.offsetHeight;
15468
+ [borderBottomWidth, borderTopWidth, paddingBottom, paddingTop].forEach(function (style) {
15469
+ heightPx_1 -= parseFloat(style);
15470
+ });
15471
+ heightTo = heightPx_1 + "px";
15472
+ }
15473
+ return {
15474
+ paddingTop: paddingTop,
15475
+ paddingBottom: paddingBottom,
15476
+ borderTopWidth: borderTopWidth,
15477
+ borderBottomWidth: borderBottomWidth,
15478
+ marginTop: marginTop,
15479
+ marginBottom: marginBottom,
15480
+ heightFrom: "0px",
15481
+ heightTo: heightTo
15482
+ };
15483
+ }
15484
+ else {
15485
+ return undefined;
15486
+ }
15487
+ }
15488
+ function setPropertiesOnElementForAnimation(el, styles, prefix) {
15489
+ var _a;
15490
+ if (prefix === void 0) { prefix = "--animation-"; }
15491
+ el["__sv_created_properties"] = (_a = el["__sv_created_properties"]) !== null && _a !== void 0 ? _a : [];
15492
+ Object.keys(styles).forEach(function (key) {
15493
+ var propertyName = "" + prefix + key.split(/\.?(?=[A-Z])/).join("-").toLowerCase();
15494
+ el.style.setProperty(propertyName, styles[key]);
15495
+ el["__sv_created_properties"].push(propertyName);
15496
+ });
15497
+ }
15498
+ function prepareElementForVerticalAnimation(el) {
15499
+ setPropertiesOnElementForAnimation(el, getVerticalDimensions(el));
15500
+ }
15501
+ function cleanHtmlElementAfterAnimation(el) {
15502
+ if (Array.isArray(el["__sv_created_properties"])) {
15503
+ el["__sv_created_properties"].forEach(function (propertyName) {
15504
+ el.style.removeProperty(propertyName);
15505
+ });
15506
+ delete el["__sv_created_properties"];
15507
+ }
15508
+ }
15310
15509
  function roundTo2Decimals(number) {
15311
15510
  return Math.round(number * 100) / 100;
15312
15511
  }
@@ -16444,7 +16643,9 @@ var ValidatorResult = /** @class */ (function () {
16444
16643
  }());
16445
16644
 
16446
16645
  /**
16447
- * 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))
16448
16649
  */
16449
16650
  var validator_SurveyValidator = /** @class */ (function (_super) {
16450
16651
  validator_extends(SurveyValidator, _super);
@@ -16460,6 +16661,9 @@ var validator_SurveyValidator = /** @class */ (function (_super) {
16460
16661
  : null;
16461
16662
  };
16462
16663
  Object.defineProperty(SurveyValidator.prototype, "text", {
16664
+ /**
16665
+ * An error message to display when a value fails validation.
16666
+ */
16463
16667
  get: function () {
16464
16668
  return this.getLocalizableStringText("text");
16465
16669
  },
@@ -16600,7 +16804,9 @@ var ValidatorRunner = /** @class */ (function () {
16600
16804
  }());
16601
16805
 
16602
16806
  /**
16603
- * 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))
16604
16810
  */
16605
16811
  var validator_NumericValidator = /** @class */ (function (_super) {
16606
16812
  validator_extends(NumericValidator, _super);
@@ -16649,7 +16855,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16649
16855
  };
16650
16856
  Object.defineProperty(NumericValidator.prototype, "minValue", {
16651
16857
  /**
16652
- * The minValue property.
16858
+ * A minimum allowed numeric value.
16859
+ *
16860
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16653
16861
  */
16654
16862
  get: function () {
16655
16863
  return this.getPropertyValue("minValue");
@@ -16662,7 +16870,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16662
16870
  });
16663
16871
  Object.defineProperty(NumericValidator.prototype, "maxValue", {
16664
16872
  /**
16665
- * The maxValue property.
16873
+ * A maximum allowed numeric value.
16874
+ *
16875
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16666
16876
  */
16667
16877
  get: function () {
16668
16878
  return this.getPropertyValue("maxValue");
@@ -16677,7 +16887,9 @@ var validator_NumericValidator = /** @class */ (function (_super) {
16677
16887
  }(validator_SurveyValidator));
16678
16888
 
16679
16889
  /**
16680
- * 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))
16681
16893
  */
16682
16894
  var TextValidator = /** @class */ (function (_super) {
16683
16895
  validator_extends(TextValidator, _super);
@@ -16716,7 +16928,11 @@ var TextValidator = /** @class */ (function (_super) {
16716
16928
  };
16717
16929
  Object.defineProperty(TextValidator.prototype, "minLength", {
16718
16930
  /**
16719
- * 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))
16720
16936
  */
16721
16937
  get: function () {
16722
16938
  return this.getPropertyValue("minLength");
@@ -16729,7 +16945,11 @@ var TextValidator = /** @class */ (function (_super) {
16729
16945
  });
16730
16946
  Object.defineProperty(TextValidator.prototype, "maxLength", {
16731
16947
  /**
16732
- * 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))
16733
16953
  */
16734
16954
  get: function () {
16735
16955
  return this.getPropertyValue("maxLength");
@@ -16742,7 +16962,9 @@ var TextValidator = /** @class */ (function (_super) {
16742
16962
  });
16743
16963
  Object.defineProperty(TextValidator.prototype, "allowDigits", {
16744
16964
  /**
16745
- * The allowDigits property.
16965
+ * Specifies whether a text value can include numerical digits.
16966
+ *
16967
+ * Default value: `true`
16746
16968
  */
16747
16969
  get: function () {
16748
16970
  return this.getPropertyValue("allowDigits");
@@ -16757,7 +16979,9 @@ var TextValidator = /** @class */ (function (_super) {
16757
16979
  }(validator_SurveyValidator));
16758
16980
 
16759
16981
  /**
16760
- * 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))
16761
16985
  */
16762
16986
  var AnswerCountValidator = /** @class */ (function (_super) {
16763
16987
  validator_extends(AnswerCountValidator, _super);
@@ -16794,7 +17018,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16794
17018
  };
16795
17019
  Object.defineProperty(AnswerCountValidator.prototype, "minCount", {
16796
17020
  /**
16797
- * The minCount property.
17021
+ * A minimum number of selected answers.
17022
+ *
17023
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16798
17024
  */
16799
17025
  get: function () {
16800
17026
  return this.getPropertyValue("minCount");
@@ -16807,7 +17033,9 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16807
17033
  });
16808
17034
  Object.defineProperty(AnswerCountValidator.prototype, "maxCount", {
16809
17035
  /**
16810
- * The maxCount property.
17036
+ * A maximum number of selected answers.
17037
+ *
17038
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16811
17039
  */
16812
17040
  get: function () {
16813
17041
  return this.getPropertyValue("maxCount");
@@ -16822,7 +17050,7 @@ var AnswerCountValidator = /** @class */ (function (_super) {
16822
17050
  }(validator_SurveyValidator));
16823
17051
 
16824
17052
  /**
16825
- * Use it to validate the text by regular expressions.
17053
+ * A class that implements validation using regular expressions.
16826
17054
  *
16827
17055
  * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
16828
17056
  */
@@ -16860,7 +17088,9 @@ var RegexValidator = /** @class */ (function (_super) {
16860
17088
  };
16861
17089
  Object.defineProperty(RegexValidator.prototype, "regex", {
16862
17090
  /**
16863
- * 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))
16864
17094
  */
16865
17095
  get: function () {
16866
17096
  return this.getPropertyValue("regex");
@@ -16871,24 +17101,39 @@ var RegexValidator = /** @class */ (function (_super) {
16871
17101
  enumerable: false,
16872
17102
  configurable: true
16873
17103
  });
16874
- 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
+ */
16875
17110
  get: function () {
16876
- return this.getPropertyValue("insensitive");
17111
+ return this.getPropertyValue("caseInsensitive");
16877
17112
  },
16878
17113
  set: function (val) {
16879
- this.setPropertyValue("insensitive", val);
17114
+ this.setPropertyValue("caseInsensitive", val);
17115
+ },
17116
+ enumerable: false,
17117
+ configurable: true
17118
+ });
17119
+ Object.defineProperty(RegexValidator.prototype, "insensitive", {
17120
+ get: function () { return this.caseInsensitive; },
17121
+ set: function (val) {
17122
+ this.caseInsensitive = val;
16880
17123
  },
16881
17124
  enumerable: false,
16882
17125
  configurable: true
16883
17126
  });
16884
17127
  RegexValidator.prototype.createRegExp = function () {
16885
- return new RegExp(this.regex, this.insensitive ? "i" : "");
17128
+ return new RegExp(this.regex, this.caseInsensitive ? "i" : "");
16886
17129
  };
16887
17130
  return RegexValidator;
16888
17131
  }(validator_SurveyValidator));
16889
17132
 
16890
17133
  /**
16891
- * 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))
16892
17137
  */
16893
17138
  var EmailValidator = /** @class */ (function (_super) {
16894
17139
  validator_extends(EmailValidator, _super);
@@ -16917,7 +17162,9 @@ var EmailValidator = /** @class */ (function (_super) {
16917
17162
  }(validator_SurveyValidator));
16918
17163
 
16919
17164
  /**
16920
- * 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))
16921
17168
  */
16922
17169
  var validator_ExpressionValidator = /** @class */ (function (_super) {
16923
17170
  validator_extends(ExpressionValidator, _super);
@@ -16996,7 +17243,9 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
16996
17243
  };
16997
17244
  Object.defineProperty(ExpressionValidator.prototype, "expression", {
16998
17245
  /**
16999
- * 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))
17000
17249
  */
17001
17250
  get: function () {
17002
17251
  return this.getPropertyValue("expression");
@@ -17024,7 +17273,7 @@ Serializer.addClass("textvalidator", [{ name: "minLength:number", default: 0 },
17024
17273
  Serializer.addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
17025
17274
  return new AnswerCountValidator();
17026
17275
  }, "surveyvalidator");
17027
- Serializer.addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
17276
+ Serializer.addClass("regexvalidator", ["regex", { name: "caseInsensitive:boolean", alternativeName: "insensitive" }], function () {
17028
17277
  return new RegexValidator();
17029
17278
  }, "surveyvalidator");
17030
17279
  Serializer.addClass("emailvalidator", [], function () {
@@ -17254,6 +17503,188 @@ var RendererFactory = /** @class */ (function () {
17254
17503
  }());
17255
17504
 
17256
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
+
17257
17688
  // CONCATENATED MODULE: ./packages/survey-core/src/question.ts
17258
17689
  var question_extends = (undefined && undefined.__extends) || (function () {
17259
17690
  var extendStatics = function (d, b) {
@@ -17291,6 +17722,7 @@ var question_decorate = (undefined && undefined.__decorate) || function (decorat
17291
17722
 
17292
17723
 
17293
17724
 
17725
+
17294
17726
  var TriggerExpressionInfo = /** @class */ (function () {
17295
17727
  function TriggerExpressionInfo(name, canRun, doComplete) {
17296
17728
  this.name = name;
@@ -17333,6 +17765,7 @@ var question_Question = /** @class */ (function (_super) {
17333
17765
  _this.createNewArray("validators", function (validator) {
17334
17766
  validator.errorOwner = _this;
17335
17767
  });
17768
+ _this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
17336
17769
  _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
17337
17770
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
17338
17771
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
@@ -17373,6 +17806,26 @@ var question_Question = /** @class */ (function (_super) {
17373
17806
  Question.getQuestionId = function () {
17374
17807
  return "sq_" + Question.questionCounter++;
17375
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
+ };
17376
17829
  Question.prototype.isReadOnlyRenderDiv = function () {
17377
17830
  return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
17378
17831
  };
@@ -18295,13 +18748,6 @@ var question_Question = /** @class */ (function (_super) {
18295
18748
  configurable: true
18296
18749
  });
18297
18750
  Question.prototype.updateCommentElements = function () {
18298
- if (!this.autoGrowComment || !Array.isArray(this.commentElements))
18299
- return;
18300
- for (var i = 0; i < this.commentElements.length; i++) {
18301
- var el = this.commentElements[i];
18302
- if (el)
18303
- increaseHeightByContent(el);
18304
- }
18305
18751
  };
18306
18752
  Question.prototype.onCommentInput = function (event) {
18307
18753
  if (this.isInputTextUpdate) {
@@ -19398,11 +19844,11 @@ var question_Question = /** @class */ (function (_super) {
19398
19844
  });
19399
19845
  Object.defineProperty(Question.prototype, "resetValueIf", {
19400
19846
  /**
19401
- * 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).
19402
19848
  *
19403
19849
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19404
19850
  *
19405
- * [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))
19406
19852
  * @see setValueIf
19407
19853
  */
19408
19854
  get: function () {
@@ -19416,11 +19862,11 @@ var question_Question = /** @class */ (function (_super) {
19416
19862
  });
19417
19863
  Object.defineProperty(Question.prototype, "setValueIf", {
19418
19864
  /**
19419
- * 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).
19420
19866
  *
19421
19867
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
19422
19868
  *
19423
- * [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))
19424
19870
  * @see resetValueIf
19425
19871
  */
19426
19872
  get: function () {
@@ -19434,11 +19880,11 @@ var question_Question = /** @class */ (function (_super) {
19434
19880
  });
19435
19881
  Object.defineProperty(Question.prototype, "setValueExpression", {
19436
19882
  /**
19437
- * 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.
19438
19884
  *
19439
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`.
19440
19886
  *
19441
- * [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))
19442
19888
  * @see defaultValueExpression
19443
19889
  * @see resetValueIf
19444
19890
  */
@@ -19834,7 +20280,7 @@ var question_Question = /** @class */ (function (_super) {
19834
20280
  Question.prototype.hasErrors = function (fireCallback, rec) {
19835
20281
  if (fireCallback === void 0) { fireCallback = true; }
19836
20282
  if (rec === void 0) { rec = null; }
19837
- var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true);
20283
+ var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true, fireCallback);
19838
20284
  if (fireCallback) {
19839
20285
  if (!!this.survey) {
19840
20286
  this.survey.beforeSettingQuestionErrors(this, errors);
@@ -19909,18 +20355,18 @@ var question_Question = /** @class */ (function (_super) {
19909
20355
  if (index !== -1)
19910
20356
  errors.splice(index, 1);
19911
20357
  };
19912
- Question.prototype.checkForErrors = function (isOnValueChanged) {
20358
+ Question.prototype.checkForErrors = function (isOnValueChanged, fireCallback) {
19913
20359
  var qErrors = new Array();
19914
20360
  if (this.isVisible && this.canCollectErrors()) {
19915
- this.collectErrors(qErrors, isOnValueChanged);
20361
+ this.collectErrors(qErrors, isOnValueChanged, fireCallback);
19916
20362
  }
19917
20363
  return qErrors;
19918
20364
  };
19919
20365
  Question.prototype.canCollectErrors = function () {
19920
20366
  return !this.isReadOnly || settings.readOnly.enableValidation;
19921
20367
  };
19922
- Question.prototype.collectErrors = function (qErrors, isOnValueChanged) {
19923
- this.onCheckForErrors(qErrors, isOnValueChanged);
20368
+ Question.prototype.collectErrors = function (qErrors, isOnValueChanged, fireCallback) {
20369
+ this.onCheckForErrors(qErrors, isOnValueChanged, fireCallback);
19924
20370
  if (qErrors.length > 0 || !this.canRunValidators(isOnValueChanged))
19925
20371
  return;
19926
20372
  var errors = this.runValidators();
@@ -19946,7 +20392,7 @@ var question_Question = /** @class */ (function (_super) {
19946
20392
  return this.validateValueCallback();
19947
20393
  return this.survey ? this.survey.validateQuestion(this) : null;
19948
20394
  };
19949
- Question.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
20395
+ Question.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
19950
20396
  var _this = this;
19951
20397
  if ((!isOnValueChanged || this.isOldAnswered) && this.hasRequiredError()) {
19952
20398
  var err = new AnswerRequiredError(this.requiredErrorText, this);
@@ -21172,6 +21618,12 @@ var itemvalue_ItemValue = /** @class */ (function (_super) {
21172
21618
  ItemValue.prototype.setComponent = function (val) {
21173
21619
  this.componentValue = val;
21174
21620
  };
21621
+ ItemValue.prototype.setRootElement = function (val) {
21622
+ this._htmlElement = val;
21623
+ };
21624
+ ItemValue.prototype.getRootElement = function () {
21625
+ return this._htmlElement;
21626
+ };
21175
21627
  ItemValue.prototype.getEnabled = function () {
21176
21628
  return this.isEnabled;
21177
21629
  };
@@ -21943,52 +22395,32 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
21943
22395
  }
21944
22396
  return res;
21945
22397
  };
22398
+ ChoicesRestful.prototype.getAllPropertiesNames = function () {
22399
+ var res = new Array();
22400
+ Serializer.getPropertiesByObj(this).forEach(function (prop) { return res.push(prop.name); });
22401
+ this.getCustomPropertiesNames().forEach(function (prop) { return res.push(prop); });
22402
+ return res;
22403
+ };
21946
22404
  ChoicesRestful.prototype.setData = function (json) {
21947
- this.clear();
21948
- if (json.url)
21949
- this.url = json.url;
21950
- if (json.path)
21951
- this.path = json.path;
21952
- if (json.valueName)
21953
- this.valueName = json.valueName;
21954
- if (json.titleName)
21955
- this.titleName = json.titleName;
21956
- if (json.imageLinkName)
21957
- this.imageLinkName = json.imageLinkName;
21958
- if (json.allowEmptyResponse !== undefined)
21959
- this.allowEmptyResponse = json.allowEmptyResponse;
21960
- if (json.attachOriginalItems !== undefined)
21961
- this.attachOriginalItems = json.attachOriginalItems;
21962
- var properties = this.getCustomPropertiesNames();
21963
- for (var i = 0; i < properties.length; i++) {
21964
- if (json[properties[i]])
21965
- this[properties[i]] = json[properties[i]];
21966
- }
22405
+ var _this = this;
22406
+ if (!json)
22407
+ json = {};
22408
+ this.getAllPropertiesNames().forEach(function (name) {
22409
+ _this[name] = json[name];
22410
+ });
21967
22411
  };
21968
22412
  ChoicesRestful.prototype.getData = function () {
21969
- if (this.isEmpty)
21970
- return null;
22413
+ var _this = this;
21971
22414
  var res = {};
21972
- if (this.url)
21973
- res["url"] = this.url;
21974
- if (this.path)
21975
- res["path"] = this.path;
21976
- if (this.valueName)
21977
- res["valueName"] = this.valueName;
21978
- if (this.titleName)
21979
- res["titleName"] = this.titleName;
21980
- if (this.imageLinkName)
21981
- res["imageLinkName"] = this.imageLinkName;
21982
- if (this.allowEmptyResponse)
21983
- res["allowEmptyResponse"] = this.allowEmptyResponse;
21984
- if (this.attachOriginalItems)
21985
- res["attachOriginalItems"] = this.attachOriginalItems;
21986
- var properties = this.getCustomPropertiesNames();
21987
- for (var i = 0; i < properties.length; i++) {
21988
- if (this[properties[i]])
21989
- res[properties[i]] = this[properties[i]];
21990
- }
21991
- return res;
22415
+ var hasValue = false;
22416
+ this.getAllPropertiesNames().forEach(function (name) {
22417
+ var val = _this[name];
22418
+ if (!_this.isValueEmpty(val) && val !== _this.getDefaultPropertyValue(name)) {
22419
+ res[name] = val;
22420
+ hasValue = true;
22421
+ }
22422
+ });
22423
+ return hasValue ? res : null;
21992
22424
  };
21993
22425
  Object.defineProperty(ChoicesRestful.prototype, "url", {
21994
22426
  /**
@@ -22145,16 +22577,7 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
22145
22577
  configurable: true
22146
22578
  });
22147
22579
  ChoicesRestful.prototype.clear = function () {
22148
- this.url = undefined;
22149
- this.path = undefined;
22150
- this.valueName = undefined;
22151
- this.titleName = undefined;
22152
- this.imageLinkName = undefined;
22153
- var properties = this.getCustomPropertiesNames();
22154
- for (var i = 0; i < properties.length; i++) {
22155
- if (this[properties[i]])
22156
- this[properties[i]] = "";
22157
- }
22580
+ this.setData(undefined);
22158
22581
  };
22159
22582
  ChoicesRestful.prototype.beforeSendRequest = function () {
22160
22583
  this.isRunningValue = true;
@@ -22400,7 +22823,6 @@ var martixBase_decorate = (undefined && undefined.__decorate) || function (decor
22400
22823
 
22401
22824
 
22402
22825
 
22403
-
22404
22826
  /**
22405
22827
  * A base class for all matrix question types.
22406
22828
  */
@@ -22411,7 +22833,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22411
22833
  _this.generatedVisibleRows = null;
22412
22834
  _this.generatedTotalRow = null;
22413
22835
  _this.filteredRows = null;
22414
- _this.filteredColumns = null;
22415
22836
  _this.columns = _this.createColumnValues();
22416
22837
  _this.rows = _this.createItemValues("rows");
22417
22838
  return _this;
@@ -22471,11 +22892,19 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22471
22892
  });
22472
22893
  Object.defineProperty(QuestionMatrixBaseModel.prototype, "visibleColumns", {
22473
22894
  get: function () {
22474
- 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;
22475
22901
  },
22476
22902
  enumerable: false,
22477
22903
  configurable: true
22478
22904
  });
22905
+ QuestionMatrixBaseModel.prototype.isColumnVisible = function (column) {
22906
+ return column.isVisible;
22907
+ };
22479
22908
  Object.defineProperty(QuestionMatrixBaseModel.prototype, "rows", {
22480
22909
  /**
22481
22910
  * An array of matrix rows.
@@ -22490,7 +22919,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22490
22919
  set: function (newValue) {
22491
22920
  var newRows = this.processRowsOnSet(newValue);
22492
22921
  this.setPropertyValue("rows", newRows);
22493
- this.filterItems();
22494
22922
  },
22495
22923
  enumerable: false,
22496
22924
  configurable: true
@@ -22529,7 +22957,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22529
22957
  },
22530
22958
  set: function (val) {
22531
22959
  this.setPropertyValue("rowsVisibleIf", val);
22532
- this.filterItems();
22960
+ if (!this.isLoadingFromJsonValue) {
22961
+ this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22962
+ }
22533
22963
  },
22534
22964
  enumerable: false,
22535
22965
  configurable: true
@@ -22550,7 +22980,9 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22550
22980
  },
22551
22981
  set: function (val) {
22552
22982
  this.setPropertyValue("columnsVisibleIf", val);
22553
- this.filterItems();
22983
+ if (!this.isLoadingFromJson) {
22984
+ this.runCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22985
+ }
22554
22986
  },
22555
22987
  enumerable: false,
22556
22988
  configurable: true
@@ -22559,15 +22991,6 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22559
22991
  _super.prototype.runCondition.call(this, values, properties);
22560
22992
  this.runItemsCondition(values, properties);
22561
22993
  };
22562
- QuestionMatrixBaseModel.prototype.filterItems = function () {
22563
- if (this.areInvisibleElementsShowing) {
22564
- this.onRowsChanged();
22565
- return false;
22566
- }
22567
- if (this.isLoadingFromJson || !this.data)
22568
- return false;
22569
- return this.runItemsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
22570
- };
22571
22994
  QuestionMatrixBaseModel.prototype.onColumnsChanged = function () { };
22572
22995
  QuestionMatrixBaseModel.prototype.onRowsChanged = function () {
22573
22996
  this.updateVisibilityBasedOnRows();
@@ -22582,7 +23005,7 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22582
23005
  var res = _super.prototype.isVisibleCore.call(this);
22583
23006
  if (!res || !this.hideIfRowsEmpty)
22584
23007
  return res;
22585
- return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
23008
+ return this.visibleRows.length > 0;
22586
23009
  };
22587
23010
  QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
22588
23011
  return !this.survey || !this.survey.areInvisibleElementsShowing;
@@ -22591,22 +23014,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22591
23014
  return true;
22592
23015
  };
22593
23016
  QuestionMatrixBaseModel.prototype.runItemsCondition = function (values, properties) {
22594
- var oldVisibleRows = null;
22595
- if (!!this.filteredRows && !helpers_Helpers.isValueEmpty(this.defaultValue)) {
22596
- oldVisibleRows = [];
22597
- for (var i = 0; i < this.filteredRows.length; i++) {
22598
- oldVisibleRows.push(this.filteredRows[i]);
22599
- }
22600
- }
22601
23017
  var hasChanges = this.hasRowsAsItems() && this.runConditionsForRows(values, properties);
22602
23018
  var hasColumnsChanged = this.runConditionsForColumns(values, properties);
22603
23019
  hasChanges = hasColumnsChanged || hasChanges;
22604
23020
  if (hasChanges) {
22605
- if (this.isClearValueOnHidden && (!!this.filteredColumns || !!this.filteredRows)) {
22606
- this.clearIncorrectValues();
22607
- }
22608
- if (!!oldVisibleRows) {
22609
- this.restoreNewVisibleRowsValues(oldVisibleRows);
23021
+ if (this.isClearValueOnHidden && hasColumnsChanged) {
23022
+ this.clearInvisibleColumnValues();
22610
23023
  }
22611
23024
  this.clearGeneratedRows();
22612
23025
  if (hasColumnsChanged) {
@@ -22614,16 +23027,15 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22614
23027
  }
22615
23028
  this.onRowsChanged();
22616
23029
  }
22617
- return hasChanges;
22618
23030
  };
23031
+ QuestionMatrixBaseModel.prototype.isRowsFiltered = function () { return !!this.filteredRows; };
22619
23032
  QuestionMatrixBaseModel.prototype.clearGeneratedRows = function () {
22620
23033
  this.generatedVisibleRows = null;
22621
23034
  };
23035
+ QuestionMatrixBaseModel.prototype.createRowsVisibleIfRunner = function () { return null; };
22622
23036
  QuestionMatrixBaseModel.prototype.runConditionsForRows = function (values, properties) {
22623
23037
  var showInvisibile = !!this.survey && this.survey.areInvisibleElementsShowing;
22624
- var runner = !showInvisibile && !!this.rowsVisibleIf
22625
- ? new ConditionRunner(this.rowsVisibleIf)
22626
- : null;
23038
+ var runner = !showInvisibile ? this.createRowsVisibleIfRunner() : null;
22627
23039
  this.filteredRows = [];
22628
23040
  var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
22629
23041
  itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
@@ -22634,73 +23046,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22634
23046
  };
22635
23047
  QuestionMatrixBaseModel.prototype.runConditionsForColumns = function (values, properties) {
22636
23048
  var useColumnsExpression = !!this.survey && !this.survey.areInvisibleElementsShowing;
22637
- var runner = useColumnsExpression && !!this.columnsVisibleIf
22638
- ? new ConditionRunner(this.columnsVisibleIf)
22639
- : null;
22640
- this.filteredColumns = [];
22641
- var hasChanged = itemvalue_ItemValue.runConditionsForItems(this.columns, this.filteredColumns, runner, values, properties, this.shouldRunColumnExpression());
22642
- if (this.filteredColumns.length === this.columns.length) {
22643
- this.filteredColumns = null;
22644
- }
22645
- return hasChanged;
22646
- };
22647
- QuestionMatrixBaseModel.prototype.clearIncorrectValues = function () {
22648
- var val = this.value;
22649
- if (!val)
22650
- return;
22651
- var newVal = null;
22652
- var isChanged = false;
22653
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
22654
- var columns = !!this.filteredColumns ? this.filteredColumns : this.columns;
22655
- for (var key in val) {
22656
- if (itemvalue_ItemValue.getItemByValue(rows, key) &&
22657
- itemvalue_ItemValue.getItemByValue(columns, val[key])) {
22658
- if (newVal == null)
22659
- newVal = {};
22660
- newVal[key] = val[key];
22661
- }
22662
- else {
22663
- isChanged = true;
22664
- }
22665
- }
22666
- if (isChanged) {
22667
- this.value = newVal;
22668
- }
22669
- _super.prototype.clearIncorrectValues.call(this);
22670
- };
22671
- QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () {
22672
- if (this.isEmpty())
22673
- return;
22674
- var newData = this.getUnbindValue(this.value);
22675
- var rows = this.rows;
22676
- for (var i = 0; i < rows.length; i++) {
22677
- var key = rows[i].value;
22678
- if (!!newData[key] && !rows[i].isVisible) {
22679
- delete newData[key];
22680
- }
22681
- }
22682
- if (this.isTwoValueEquals(newData, this.value))
22683
- return;
22684
- this.value = newData;
22685
- };
22686
- QuestionMatrixBaseModel.prototype.restoreNewVisibleRowsValues = function (oldVisibleRows) {
22687
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
22688
- var val = this.defaultValue;
22689
- var newValue = this.getUnbindValue(this.value);
22690
- var isChanged = false;
22691
- for (var key in val) {
22692
- if (itemvalue_ItemValue.getItemByValue(rows, key) &&
22693
- !itemvalue_ItemValue.getItemByValue(oldVisibleRows, key)) {
22694
- if (newValue == null)
22695
- newValue = {};
22696
- newValue[key] = val[key];
22697
- isChanged = true;
22698
- }
22699
- }
22700
- if (isChanged) {
22701
- this.value = newValue;
22702
- }
23049
+ var runner = useColumnsExpression && !!this.columnsVisibleIf ? new ConditionRunner(this.columnsVisibleIf) : null;
23050
+ return itemvalue_ItemValue.runConditionsForItems(this.columns, undefined, runner, values, properties, this.shouldRunColumnExpression());
22703
23051
  };
23052
+ QuestionMatrixBaseModel.prototype.clearInvisibleColumnValues = function () { };
23053
+ QuestionMatrixBaseModel.prototype.clearInvisibleValuesInRows = function () { };
22704
23054
  QuestionMatrixBaseModel.prototype.needResponsiveWidth = function () {
22705
23055
  //TODO: make it mor intelligent
22706
23056
  return true;
@@ -23402,8 +23752,8 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
23402
23752
  _super.prototype.setNewValue.call(this, newValue);
23403
23753
  this.updateElementCss();
23404
23754
  };
23405
- QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
23406
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
23755
+ QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
23756
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
23407
23757
  if (!!this.customQuestion) {
23408
23758
  var text = this.customQuestion.onGetErrorText(this);
23409
23759
  if (!!text) {
@@ -24909,6 +25259,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
24909
25259
  _this.colOwnerValue = null;
24910
25260
  _this.indexValue = -1;
24911
25261
  _this._hasVisibleCell = true;
25262
+ _this.isColumnsVisibleIf = true;
24912
25263
  _this.previousChoicesId = undefined;
24913
25264
  _this.createLocalizableString("totalFormat", _this);
24914
25265
  _this.createLocalizableString("cellHint", _this);
@@ -25738,7 +26089,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
25738
26089
  this.templateQuestion.locOwner = this;
25739
26090
  this.addProperties(curCellType);
25740
26091
  this.templateQuestion.onPropertyChanged.add(function (sender, options) {
25741
- _this.propertyValueChanged(options.name, options.oldValue, options.newValue);
26092
+ _this.propertyValueChanged(options.name, options.oldValue, options.newValue, options.arrayChanges, options.target);
25742
26093
  });
25743
26094
  this.templateQuestion.onItemValuePropertyChanged.add(function (sender, options) {
25744
26095
  _this.doItemValuePropertyChanged(options.propertyName, options.obj, options.name, options.newValue, options.oldValue);
@@ -25781,7 +26132,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
25781
26132
  delete json["choices"];
25782
26133
  }
25783
26134
  delete json["itemComponent"];
25784
- if (this.jsonObj) {
26135
+ if (this.jsonObj && json.type === "rating") {
25785
26136
  Object.keys(this.jsonObj).forEach(function (prop) {
25786
26137
  json[prop] = _this.jsonObj[prop];
25787
26138
  });
@@ -25808,8 +26159,8 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
25808
26159
  };
25809
26160
  }
25810
26161
  };
25811
- MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue) {
25812
- _super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
26162
+ MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
26163
+ _super.prototype.propertyValueChanged.call(this, name, oldValue, newValue, arrayChanges, target);
25813
26164
  if (name === "isRequired") {
25814
26165
  this.updateIsRenderedRequired(newValue);
25815
26166
  }
@@ -25993,6 +26344,7 @@ var question_matrixdropdownrendered_spreadArray = (undefined && undefined.__spre
25993
26344
 
25994
26345
 
25995
26346
 
26347
+
25996
26348
  var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
25997
26349
  function QuestionMatrixDropdownRenderedCell() {
25998
26350
  this.minWidth = "";
@@ -26323,9 +26675,14 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26323
26675
  };
26324
26676
  QuestionMatrixDropdownRenderedTable.prototype.getRenderedRowsAnimationOptions = function () {
26325
26677
  var _this = this;
26326
- var beforeAnimationRun = function (el) {
26678
+ var onBeforeRunAnimation = function (el) {
26679
+ el.querySelectorAll(":scope > td > *").forEach(function (el) {
26680
+ prepareElementForVerticalAnimation(el);
26681
+ });
26682
+ };
26683
+ var onAfterRunAnimation = function (el) {
26327
26684
  el.querySelectorAll(":scope > td > *").forEach(function (el) {
26328
- el.style.setProperty("--animation-height", el.offsetHeight + "px");
26685
+ cleanHtmlElementAfterAnimation(el);
26329
26686
  });
26330
26687
  };
26331
26688
  return {
@@ -26337,10 +26694,10 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26337
26694
  return el.getRootElement();
26338
26695
  },
26339
26696
  getLeaveOptions: function () {
26340
- return { cssClass: _this.cssClasses.rowFadeOut, onBeforeRunAnimation: beforeAnimationRun };
26697
+ return { cssClass: _this.cssClasses.rowLeave, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
26341
26698
  },
26342
- getEnterOptions: function () {
26343
- return { cssClass: _this.cssClasses.rowFadeIn, onBeforeRunAnimation: beforeAnimationRun };
26699
+ getEnterOptions: function (_, info) {
26700
+ return { cssClass: _this.cssClasses.rowEnter, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
26344
26701
  }
26345
26702
  };
26346
26703
  };
@@ -26602,8 +26959,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26602
26959
  this.headerRow.cells.push(this.createHeaderCell(null));
26603
26960
  }
26604
26961
  if (this.matrix.isColumnLayoutHorizontal) {
26605
- for (var i = 0; i < this.matrix.visibleColumns.length; i++) {
26606
- var column = this.matrix.visibleColumns[i];
26962
+ for (var i = 0; i < this.matrix.columns.length; i++) {
26963
+ var column = this.matrix.columns[i];
26607
26964
  if (!column.isColumnVisible)
26608
26965
  continue;
26609
26966
  if (this.matrix.IsMultiplyColumn(column)) {
@@ -27235,6 +27592,7 @@ var question_matrixdropdownbase_extends = (undefined && undefined.__extends) ||
27235
27592
 
27236
27593
 
27237
27594
 
27595
+
27238
27596
  var question_matrixdropdownbase_MatrixDropdownCell = /** @class */ (function () {
27239
27597
  function MatrixDropdownCell(column, row, data) {
27240
27598
  this.column = column;
@@ -27404,6 +27762,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27404
27762
  var _this = this;
27405
27763
  this.isSettingValue = false;
27406
27764
  this.detailPanelValue = null;
27765
+ this.visibleValue = true;
27407
27766
  this.cells = [];
27408
27767
  this.isCreatingDetailPanel = false;
27409
27768
  this.data = data;
@@ -27449,6 +27808,24 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27449
27808
  });
27450
27809
  MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
27451
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; };
27452
27829
  Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
27453
27830
  get: function () {
27454
27831
  var result = {};
@@ -27606,15 +27983,23 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27606
27983
  res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
27607
27984
  res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
27608
27985
  };
27609
- MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
27986
+ MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties, rowsVisibleIf) {
27610
27987
  if (!!this.data) {
27611
- values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
27988
+ values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.getFilteredData();
27612
27989
  }
27613
27990
  var rowIndex = this.rowIndex;
27614
27991
  this.applyRowVariablesToValues(values, rowIndex);
27615
27992
  var newProps = helpers_Helpers.createCopy(properties);
27616
27993
  newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
27617
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
+ }
27618
28003
  for (var i = 0; i < this.cells.length; i++) {
27619
28004
  if (i > 0) {
27620
28005
  mergeValues(this.value, rowValues);
@@ -27629,6 +28014,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
27629
28014
  this.onQuestionReadOnlyChanged();
27630
28015
  }
27631
28016
  };
28017
+ MatrixDropdownRowModelBase.prototype.setRowsVisibleIfValues = function (values) { };
27632
28018
  MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
27633
28019
  var res = [];
27634
28020
  this.questions.forEach(function (q) {
@@ -28072,12 +28458,12 @@ var question_matrixdropdownbase_MatrixDropdownTotalRowModel = /** @class */ (fun
28072
28458
  this.data.onTotalValueChanged();
28073
28459
  }
28074
28460
  };
28075
- MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties) {
28461
+ MatrixDropdownTotalRowModel.prototype.runCondition = function (values, properties, rowsVisibleIf) {
28076
28462
  var counter = 0;
28077
28463
  var prevValue;
28078
28464
  do {
28079
28465
  prevValue = helpers_Helpers.getUnbindValue(this.value);
28080
- _super.prototype.runCondition.call(this, values, properties);
28466
+ _super.prototype.runCondition.call(this, values, properties, "");
28081
28467
  counter++;
28082
28468
  } while (!helpers_Helpers.isTwoValueEquals(prevValue, this.value) && counter < 3);
28083
28469
  };
@@ -28408,6 +28794,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28408
28794
  };
28409
28795
  QuestionMatrixDropdownModelBase.prototype.onPointerDown = function (pointerDownEvent, row) { };
28410
28796
  QuestionMatrixDropdownModelBase.prototype.onRowsChanged = function () {
28797
+ this.clearVisibleRows();
28411
28798
  this.resetRenderedTable();
28412
28799
  _super.prototype.onRowsChanged.call(this);
28413
28800
  };
@@ -28461,6 +28848,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28461
28848
  this.fireCallback(this.onRenderedTableResetCallback);
28462
28849
  };
28463
28850
  QuestionMatrixDropdownModelBase.prototype.clearGeneratedRows = function () {
28851
+ this.clearVisibleRows();
28464
28852
  if (!this.generatedVisibleRows)
28465
28853
  return;
28466
28854
  for (var i = 0; i < this.generatedVisibleRows.length; i++) {
@@ -28503,8 +28891,8 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28503
28891
  cellQuestion: null,
28504
28892
  value: null,
28505
28893
  };
28506
- for (var i = 0; i < this.visibleColumns.length; i++) {
28507
- options.column = this.visibleColumns[i];
28894
+ for (var i = 0; i < this.columns.length; i++) {
28895
+ options.column = this.columns[i];
28508
28896
  options.columnName = options.column.name;
28509
28897
  var cell = row.cells[i];
28510
28898
  options.cell = cell;
@@ -28759,25 +29147,40 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28759
29147
  return false;
28760
29148
  };
28761
29149
  QuestionMatrixDropdownModelBase.prototype.runCellsCondition = function (values, properties) {
28762
- if (!this.generatedVisibleRows)
28763
- return;
28764
- var newValues = this.getRowConditionValues(values);
28765
29150
  var rows = this.generatedVisibleRows;
28766
- for (var i = 0; i < rows.length; i++) {
28767
- 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
+ }
28768
29156
  }
28769
29157
  this.checkColumnsVisibility();
28770
29158
  this.checkColumnsRenderedRequired();
28771
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
+ };
28772
29174
  QuestionMatrixDropdownModelBase.prototype.checkColumnsVisibility = function () {
28773
29175
  if (this.isDesignMode)
28774
29176
  return;
28775
29177
  var hasChanged = false;
28776
- for (var i = 0; i < this.visibleColumns.length; i++) {
28777
- var column = this.visibleColumns[i];
28778
- 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)
28779
29182
  continue;
28780
- hasChanged = this.isColumnVisibilityChanged(column) || hasChanged;
29183
+ hasChanged = this.isColumnVisibilityChanged(column, isCellsVisibilty) || hasChanged;
28781
29184
  }
28782
29185
  if (hasChanged) {
28783
29186
  this.resetRenderedTable();
@@ -28785,9 +29188,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28785
29188
  };
28786
29189
  QuestionMatrixDropdownModelBase.prototype.checkColumnsRenderedRequired = function () {
28787
29190
  var rows = this.generatedVisibleRows;
28788
- for (var i = 0; i < this.visibleColumns.length; i++) {
28789
- var column = this.visibleColumns[i];
28790
- 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)
28791
29196
  continue;
28792
29197
  var required = rows.length > 0;
28793
29198
  for (var j = 0; j < rows.length; j++) {
@@ -28799,26 +29204,29 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28799
29204
  column.updateIsRenderedRequired(required);
28800
29205
  }
28801
29206
  };
28802
- QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column) {
29207
+ QuestionMatrixDropdownModelBase.prototype.isColumnVisibilityChanged = function (column, checkCellsVisiblity) {
28803
29208
  var curVis = column.isColumnVisible;
28804
- var isMultipleColumnsVisibility = column.isFilteredMultipleColumns;
29209
+ var hasVisCell = !checkCellsVisiblity;
29210
+ var rows = this.generatedVisibleRows;
29211
+ var checkRows = checkCellsVisiblity && rows;
29212
+ var isMultipleColumnsVisibility = checkRows && column.isFilteredMultipleColumns;
28805
29213
  var curVisibleChoices = isMultipleColumnsVisibility ? column.getVisibleChoicesInCell : [];
28806
29214
  var newVisibleChoices = new Array();
28807
- var hasVisCell = false;
28808
- var rows = this.generatedVisibleRows;
28809
- for (var i = 0; i < rows.length; i++) {
28810
- var cell = rows[i].cells[column.index];
28811
- var q = cell === null || cell === void 0 ? void 0 : cell.question;
28812
- if (!!q && q.isVisible) {
28813
- hasVisCell = true;
28814
- if (isMultipleColumnsVisibility) {
28815
- 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;
28816
29226
  }
28817
- else
28818
- break;
28819
29227
  }
28820
29228
  }
28821
- column.hasVisibleCell = hasVisCell;
29229
+ column.hasVisibleCell = hasVisCell && column.isColumnsVisibleIf;
28822
29230
  if (isMultipleColumnsVisibility) {
28823
29231
  column.setVisibleChoicesInCell(newVisibleChoices);
28824
29232
  if (!helpers_Helpers.isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
@@ -28993,20 +29401,46 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28993
29401
  this.columns.push(column);
28994
29402
  return column;
28995
29403
  };
29404
+ QuestionMatrixDropdownModelBase.prototype.clearVisibleRows = function () {
29405
+ this.visibleRowsArray = null;
29406
+ };
29407
+ QuestionMatrixDropdownModelBase.prototype.isColumnVisible = function (column) {
29408
+ return column.isColumnVisible;
29409
+ };
28996
29410
  QuestionMatrixDropdownModelBase.prototype.getVisibleRows = function () {
28997
- var _this = this;
28998
29411
  if (this.isUpdateLocked)
28999
29412
  return null;
29000
- 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;
29001
29425
  this.generatedVisibleRows = this.generateRows();
29426
+ this.isGenereatingRows = false;
29002
29427
  this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
29003
29428
  if (this.data) {
29004
29429
  this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
29005
29430
  }
29006
- this.updateValueOnRowsGeneration(this.generatedVisibleRows);
29007
- this.updateIsAnswered();
29431
+ if (!!this.generatedVisibleRows) {
29432
+ this.updateValueOnRowsGeneration(this.generatedVisibleRows);
29433
+ this.updateIsAnswered();
29434
+ }
29008
29435
  }
29009
- 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;
29010
29444
  };
29011
29445
  QuestionMatrixDropdownModelBase.prototype.updateValueOnRowsGeneration = function (rows) {
29012
29446
  var oldValue = this.createNewValue(true);
@@ -29594,7 +30028,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29594
30028
  !this.generatedVisibleRows)
29595
30029
  return;
29596
30030
  this.isDoingonAnyValueChanged = true;
29597
- var rows = this.visibleRows;
30031
+ var rows = this.generatedVisibleRows;
29598
30032
  for (var i = 0; i < rows.length; i++) {
29599
30033
  rows[i].onAnyValueChanged(name, questionName);
29600
30034
  }
@@ -29643,6 +30077,19 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29643
30077
  enumerable: false,
29644
30078
  configurable: true
29645
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; };
29646
30093
  QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
29647
30094
  if (!this.survey && !this.cellValueChangingCallback)
29648
30095
  return !!rowValue ? rowValue[columnName] : null;
@@ -29833,6 +30280,26 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29833
30280
  return null;
29834
30281
  };
29835
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
+ };
29836
30303
  QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
29837
30304
  if (index >= this.visibleRows.length)
29838
30305
  return null;
@@ -29916,7 +30383,6 @@ Serializer.addClass("matrixdropdownbase", [
29916
30383
  visible: false,
29917
30384
  isLightSerializable: false,
29918
30385
  },
29919
- { name: "columnsVisibleIf", visible: false },
29920
30386
  {
29921
30387
  name: "detailPanelMode",
29922
30388
  choices: ["none", "underRow", "underRowSingle"],
@@ -30002,8 +30468,13 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
30002
30468
  enumerable: false,
30003
30469
  configurable: true
30004
30470
  });
30471
+ MatrixDropdownRowModel.prototype.isItemVisible = function () { return this.item.isVisible; };
30005
30472
  MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
30006
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
+ };
30007
30478
  return MatrixDropdownRowModel;
30008
30479
  }(question_matrixdropdownbase_MatrixDropdownRowModelBase));
30009
30480
 
@@ -30019,11 +30490,11 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30019
30490
  _this.defaultValuesInRows = {};
30020
30491
  _this.createLocalizableString("totalText", _this, true);
30021
30492
  _this.registerPropertyChangedHandlers(["rows"], function () {
30493
+ if (!_this.generatedVisibleRows)
30494
+ return;
30022
30495
  _this.clearGeneratedRows();
30023
30496
  _this.resetRenderedTable();
30024
- if (!_this.filterItems()) {
30025
- _this.onRowsChanged();
30026
- }
30497
+ _this.getVisibleRows();
30027
30498
  _this.clearIncorrectValues();
30028
30499
  });
30029
30500
  _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
@@ -30114,30 +30585,29 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30114
30585
  return helpers_Helpers.isValueObject(val, true);
30115
30586
  };
30116
30587
  QuestionMatrixDropdownModel.prototype.clearIncorrectValues = function () {
30117
- var val = this.value;
30118
- if (!val)
30119
- return;
30120
- var newVal = null;
30121
- var isChanged = false;
30122
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
30123
- for (var key in val) {
30124
- if (itemvalue_ItemValue.getItemByValue(rows, key)) {
30125
- if (newVal == null)
30126
- newVal = {};
30127
- newVal[key] = val[key];
30128
- }
30129
- else {
30130
- 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
+ }
30131
30597
  }
30132
- }
30133
- if (isChanged) {
30134
30598
  this.value = newVal;
30135
30599
  }
30136
30600
  _super.prototype.clearIncorrectValues.call(this);
30137
30601
  };
30138
- QuestionMatrixDropdownModel.prototype.clearValueIfInvisibleCore = function (reason) {
30139
- _super.prototype.clearValueIfInvisibleCore.call(this, reason);
30140
- 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;
30141
30611
  };
30142
30612
  QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
30143
30613
  var _this = this;
@@ -30164,7 +30634,7 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30164
30634
  };
30165
30635
  QuestionMatrixDropdownModel.prototype.generateRows = function () {
30166
30636
  var result = new Array();
30167
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
30637
+ var rows = this.rows;
30168
30638
  if (!rows || rows.length === 0)
30169
30639
  return result;
30170
30640
  var val = this.value;
@@ -30181,6 +30651,17 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
30181
30651
  QuestionMatrixDropdownModel.prototype.createMatrixRow = function (item, value) {
30182
30652
  return new MatrixDropdownRowModel(item.value, item, this, value);
30183
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
+ };
30184
30665
  QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
30185
30666
  keys.push("rows");
30186
30667
  };
@@ -30683,13 +31164,17 @@ var core_DragDropCore = /** @class */ (function () {
30683
31164
  DragDropCore.prototype.afterDragOver = function (dropTargetNode) { };
30684
31165
  DragDropCore.prototype.findDropTargetNodeFromPoint = function (clientX, clientY) {
30685
31166
  var displayProp = this.domAdapter.draggedElementShortcut.style.display;
30686
- //this.domAdapter.draggedElementShortcut.hidden = true;
30687
31167
  this.domAdapter.draggedElementShortcut.style.display = "none";
30688
31168
  if (!DomDocumentHelper.isAvailable())
30689
31169
  return null;
30690
- var dragOverNode = this.domAdapter.documentOrShadowRoot.elementFromPoint(clientX, clientY);
30691
- // this.domAdapter.draggedElementShortcut.hidden = false;
31170
+ var dragOverNodes = this.domAdapter.documentOrShadowRoot.elementsFromPoint(clientX, clientY);
30692
31171
  this.domAdapter.draggedElementShortcut.style.display = displayProp || "block";
31172
+ var index = 0;
31173
+ var dragOverNode = dragOverNodes[index];
31174
+ while (dragOverNode && dragOverNode.className && typeof dragOverNode.className.indexOf == "function" && dragOverNode.className.indexOf("sv-drag-target-skipped") != -1) {
31175
+ index++;
31176
+ dragOverNode = dragOverNodes[index];
31177
+ }
30693
31178
  if (!dragOverNode)
30694
31179
  return null;
30695
31180
  return this.findDropTargetNodeByDragOverNode(dragOverNode);
@@ -31012,6 +31497,7 @@ var question_matrixdynamic_extends = (undefined && undefined.__extends) || (func
31012
31497
 
31013
31498
 
31014
31499
 
31500
+
31015
31501
  var MatrixDynamicRowModel = /** @class */ (function (_super) {
31016
31502
  question_matrixdynamic_extends(MatrixDynamicRowModel, _super);
31017
31503
  function MatrixDynamicRowModel(index, data, value) {
@@ -31087,7 +31573,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31087
31573
  _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
31088
31574
  _this.updateShowTableAndAddRow();
31089
31575
  });
31090
- _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.clearRowsAndResetRenderedTable(); });
31576
+ _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
31091
31577
  _this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
31092
31578
  return _this;
31093
31579
  }
@@ -31236,7 +31722,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31236
31722
  };
31237
31723
  QuestionMatrixDynamicModel.prototype.initDataUI = function () {
31238
31724
  if (!this.generatedVisibleRows) {
31239
- this.visibleRows;
31725
+ this.getVisibleRows();
31240
31726
  }
31241
31727
  };
31242
31728
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
@@ -31265,6 +31751,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31265
31751
  }
31266
31752
  if (this.generatedVisibleRows || prevValue == 0) {
31267
31753
  if (!this.generatedVisibleRows) {
31754
+ this.clearGeneratedRows();
31268
31755
  this.generatedVisibleRows = [];
31269
31756
  }
31270
31757
  this.generatedVisibleRows.splice(val);
@@ -31865,8 +32352,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31865
32352
  enumerable: false,
31866
32353
  configurable: true
31867
32354
  });
31868
- QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
31869
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
32355
+ QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
32356
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
31870
32357
  if (!isOnValueChanged && this.hasErrorInMinRows()) {
31871
32358
  errors.push(new error_MinRowCountError(this.minRowCount, this));
31872
32359
  }
@@ -31957,6 +32444,20 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31957
32444
  _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
31958
32445
  this.setRowCountValueFromData = false;
31959
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
+ };
31960
32461
  QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
31961
32462
  if (!val || !Array.isArray(val))
31962
32463
  return;
@@ -31981,7 +32482,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31981
32482
  }
31982
32483
  else {
31983
32484
  this.clearGeneratedRows();
31984
- this.generatedVisibleRows = this.visibleRows;
32485
+ this.getVisibleRows();
31985
32486
  this.onRowsChanged();
31986
32487
  }
31987
32488
  this.setRowCountValueFromData = false;
@@ -32057,7 +32558,6 @@ var QuestionMatrixDynamicRenderedTable = /** @class */ (function (_super) {
32057
32558
  return QuestionMatrixDynamicRenderedTable;
32058
32559
  }(question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable));
32059
32560
  Serializer.addClass("matrixdynamic", [
32060
- { name: "rowsVisibleIf:condition", visible: false },
32061
32561
  { name: "allowAddRows:boolean", default: true },
32062
32562
  { name: "allowRemoveRows:boolean", default: true },
32063
32563
  { name: "rowCount:number", default: 2, minValue: 0, isBindable: true },
@@ -32173,10 +32673,10 @@ var defaultV2Css = {
32173
32673
  edit: "sd-btn sd-btn--small",
32174
32674
  },
32175
32675
  panel: {
32176
- contentFadeIn: "sd-element__content--fade-in",
32177
- contentFadeOut: "sd-element__content--fade-out",
32178
- fadeIn: "sd-element-wrapper--fade-in",
32179
- fadeOut: "sd-element-wrapper--fade-out",
32676
+ contentEnter: "sd-element__content--enter",
32677
+ contentLeave: "sd-element__content--leave",
32678
+ enter: "sd-element-wrapper--enter",
32679
+ leave: "sd-element-wrapper--leave",
32180
32680
  asPage: "sd-panel--as-page",
32181
32681
  number: "sd-element__num",
32182
32682
  title: "sd-title sd-element__title sd-panel__title",
@@ -32237,8 +32737,8 @@ var defaultV2Css = {
32237
32737
  footerButtonsContainer: "sd-paneldynamic__buttons-container",
32238
32738
  panelsContainer: "sd-paneldynamic__panels-container",
32239
32739
  panelWrapperInRow: "sd-paneldynamic__panel-wrapper--in-row",
32240
- panelWrapperFadeIn: "sd-paneldynamic__panel-wrapper--fade-in",
32241
- panelWrapperFadeOut: "sd-paneldynamic__panel-wrapper--fade-out",
32740
+ panelWrapperEnter: "sd-paneldynamic__panel-wrapper--enter",
32741
+ panelWrapperLeave: "sd-paneldynamic__panel-wrapper--leave",
32242
32742
  panelWrapperList: "sd-paneldynamic__panel-wrapper--list",
32243
32743
  progressBtnIcon: "icon-progressbuttonv2",
32244
32744
  noEntriesPlaceholder: "sd-paneldynamic__placeholder sd-question__placeholder",
@@ -32287,6 +32787,7 @@ var defaultV2Css = {
32287
32787
  emptyHeaderRoot: "sd-page__empty-header",
32288
32788
  title: "sd-title sd-page__title",
32289
32789
  description: "sd-description sd-page__description",
32790
+ number: "sd-page__num",
32290
32791
  errorsContainer: "sd-page__errbox"
32291
32792
  },
32292
32793
  pageTitle: "sd-title sd-page__title",
@@ -32294,16 +32795,17 @@ var defaultV2Css = {
32294
32795
  row: "sd-row sd-clearfix",
32295
32796
  rowMultiple: "sd-row--multiple",
32296
32797
  rowCompact: "sd-row--compact",
32297
- rowFadeIn: "sd-row--fade-in",
32298
- rowDelayedFadeIn: "sd-row--delayed-fade-in",
32299
- rowFadeOut: "sd-row--fade-out",
32798
+ rowEnter: "sd-row--enter",
32799
+ rowDelayedEnter: "sd-row--delayed-enter",
32800
+ rowLeave: "sd-row--leave",
32801
+ rowReplace: "sd-row--replace",
32300
32802
  pageRow: "sd-page__row",
32301
32803
  question: {
32302
- contentFadeIn: "sd-element__content--fade-in",
32303
- contentFadeOut: "sd-element__content--fade-out",
32804
+ contentEnter: "sd-element__content--enter",
32805
+ contentLeave: "sd-element__content--leave",
32806
+ enter: "sd-element-wrapper--enter",
32807
+ leave: "sd-element-wrapper--leave",
32304
32808
  mobile: "sd-question--mobile",
32305
- fadeIn: "sd-element-wrapper--fade-in",
32306
- fadeOut: "sd-element-wrapper--fade-out",
32307
32809
  mainRoot: "sd-element sd-question sd-row__question",
32308
32810
  flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
32309
32811
  withFrame: "sd-element--with-frame",
@@ -32389,6 +32891,8 @@ var defaultV2Css = {
32389
32891
  rootRow: "sd-selectbase--row",
32390
32892
  rootMultiColumn: "sd-selectbase--multi-column",
32391
32893
  item: "sd-item sd-checkbox sd-selectbase__item",
32894
+ itemEnter: "sd-item--enter",
32895
+ itemLeave: "sd-item--leave",
32392
32896
  itemOnError: "sd-item--error",
32393
32897
  itemSelectAll: "sd-checkbox--selectall",
32394
32898
  itemNone: "sd-checkbox--none",
@@ -32419,6 +32923,8 @@ var defaultV2Css = {
32419
32923
  itemInline: "sd-selectbase__item--inline",
32420
32924
  label: "sd-selectbase__label",
32421
32925
  labelChecked: "",
32926
+ itemEnter: "sd-item--enter",
32927
+ itemLeave: "sd-item--leave",
32422
32928
  itemDisabled: "sd-item--disabled sd-radio--disabled",
32423
32929
  itemReadOnly: "sd-item--readonly sd-radio--readonly",
32424
32930
  itemPreview: "sd-item--preview sd-radio--preview",
@@ -32527,6 +33033,8 @@ var defaultV2Css = {
32527
33033
  other: "sd-input sd-comment sd-selectbase__other",
32528
33034
  onError: "sd-input--error",
32529
33035
  label: "sd-selectbase__label",
33036
+ itemEnter: "sd-item--enter",
33037
+ itemLeave: "sd-item--leave",
32530
33038
  item: "sd-item sd-radio sd-selectbase__item",
32531
33039
  itemDisabled: "sd-item--disabled sd-radio--disabled",
32532
33040
  itemChecked: "sd-item--checked sd-radio--checked",
@@ -32630,8 +33138,9 @@ var defaultV2Css = {
32630
33138
  errorsCellBottom: "sd-table__cell--error-bottom",
32631
33139
  itemCell: "sd-table__cell--item",
32632
33140
  row: "sd-table__row",
32633
- rowFadeIn: "sd-table__row--fade-in",
32634
- rowFadeOut: "sd-table__row--fade-out",
33141
+ rowDelayedEnter: "sd-table__row--delayed-enter",
33142
+ rowEnter: "sd-table__row--enter",
33143
+ rowLeave: "sd-table__row--leave",
32635
33144
  expandedRow: "sd-table__row--expanded",
32636
33145
  rowHasPanel: "sd-table__row--has-panel",
32637
33146
  rowHasEndActions: "sd-table__row--has-end-actions",
@@ -32671,8 +33180,9 @@ var defaultV2Css = {
32671
33180
  cell: "sd-table__cell",
32672
33181
  cellResponsiveTitle: "sd-table__responsive-title",
32673
33182
  row: "sd-table__row",
32674
- rowFadeIn: "sd-table__row--fade-in",
32675
- rowFadeOut: "sd-table__row--fade-out",
33183
+ rowDelayedEnter: "sd-table__row--delayed-enter",
33184
+ rowEnter: "sd-table__row--enter",
33185
+ rowLeave: "sd-table__row--leave",
32676
33186
  rowHasPanel: "sd-table__row--has-panel",
32677
33187
  rowHasEndActions: "sd-table__row--has-end-actions",
32678
33188
  expandedRow: "sd-table__row--expanded",
@@ -32958,6 +33468,8 @@ var defaultV2Css = {
32958
33468
  itemHover: "sd-item--allowhover sd-checkbox--allowhover",
32959
33469
  itemControl: "sd-visuallyhidden sd-item__control sd-checkbox__control",
32960
33470
  itemDecorator: "sd-item__svg sd-checkbox__svg",
33471
+ itemEnter: "sd-item--enter",
33472
+ itemLeave: "sd-item--leave",
32961
33473
  cleanButton: "sd-tagbox_clean-button sd-dropdown_clean-button",
32962
33474
  cleanButtonSvg: "sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",
32963
33475
  cleanButtonIconId: "icon-clear",
@@ -33746,7 +34258,7 @@ var header_Cover = /** @class */ (function (_super) {
33746
34258
  enumerable: false,
33747
34259
  configurable: true
33748
34260
  });
33749
- Cover.prototype.propertyValueChanged = function (name, oldValue, newValue) {
34261
+ Cover.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
33750
34262
  _super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
33751
34263
  if (name === "backgroundColor" || name === "backgroundImage" || name === "overlapEnabled") {
33752
34264
  this.updateHeaderClasses();
@@ -34357,8 +34869,8 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
34357
34869
  QuestionRowModel.prototype.getVisibleElementsAnimationOptions = function () {
34358
34870
  var _this = this;
34359
34871
  var beforeRunAnimation = function (el) {
34360
- el.style.setProperty("--animation-height", el.offsetHeight + "px");
34361
- el.style.setProperty("--animation-width", getElementWidth(el) + "px");
34872
+ prepareElementForVerticalAnimation(el);
34873
+ setPropertiesOnElementForAnimation(el, { width: getElementWidth(el) + "px" });
34362
34874
  };
34363
34875
  return {
34364
34876
  getRerenderEvent: function () { return _this.onElementRerendered; },
@@ -34369,16 +34881,18 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
34369
34881
  var surveyElement = element;
34370
34882
  var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
34371
34883
  return {
34372
- cssClass: cssClasses.fadeOut,
34373
- onBeforeRunAnimation: beforeRunAnimation
34884
+ cssClass: cssClasses.leave,
34885
+ onBeforeRunAnimation: beforeRunAnimation,
34886
+ onAfterRunAnimation: cleanHtmlElementAfterAnimation
34374
34887
  };
34375
34888
  },
34376
34889
  getEnterOptions: function (element) {
34377
34890
  var surveyElement = element;
34378
34891
  var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
34379
34892
  return {
34380
- cssClass: cssClasses.fadeIn,
34381
- onBeforeRunAnimation: beforeRunAnimation
34893
+ cssClass: cssClasses.enter,
34894
+ onBeforeRunAnimation: beforeRunAnimation,
34895
+ onAfterRunAnimation: cleanHtmlElementAfterAnimation
34382
34896
  };
34383
34897
  }
34384
34898
  };
@@ -34583,24 +35097,22 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34583
35097
  };
34584
35098
  PanelModelBase.prototype.getRowsAnimationOptions = function () {
34585
35099
  var _this = this;
34586
- var beforeRunAnimation = function (el) {
34587
- el.style.setProperty("--animation-height", el.offsetHeight + "px");
34588
- };
34589
35100
  return {
34590
35101
  getRerenderEvent: function () { return _this.onElementRerendered; },
34591
35102
  isAnimationEnabled: function () { return _this.animationAllowed; },
34592
35103
  getAnimatedElement: function (row) { return row.getRootElement(); },
34593
- getLeaveOptions: function (_) {
34594
- return {
34595
- cssClass: _this.cssClasses.rowFadeOut,
34596
- onBeforeRunAnimation: beforeRunAnimation
35104
+ getLeaveOptions: function (row, info) {
35105
+ return { cssClass: _this.cssClasses.rowLeave,
35106
+ onBeforeRunAnimation: prepareElementForVerticalAnimation,
35107
+ onAfterRunAnimation: cleanHtmlElementAfterAnimation,
34597
35108
  };
34598
35109
  },
34599
35110
  getEnterOptions: function (_, animationInfo) {
34600
35111
  var cssClasses = _this.cssClasses;
34601
35112
  return {
34602
- cssClass: new CssClassBuilder().append(cssClasses.rowFadeIn).append(cssClasses.rowDelayedFadeIn, animationInfo.isDeletingRunning).toString(),
34603
- onBeforeRunAnimation: beforeRunAnimation
35113
+ cssClass: new CssClassBuilder().append(cssClasses.rowEnter).append(cssClasses.rowDelayedEnter, animationInfo.isDeletingRunning).toString(),
35114
+ onBeforeRunAnimation: prepareElementForVerticalAnimation,
35115
+ onAfterRunAnimation: cleanHtmlElementAfterAnimation
34604
35116
  };
34605
35117
  }
34606
35118
  };
@@ -34878,7 +35390,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34878
35390
  configurable: true
34879
35391
  });
34880
35392
  PanelModelBase.prototype.calcCssClasses = function (css) {
34881
- var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "", rowMultiple: "", pageRow: "", rowCompact: "" };
35393
+ var classes = { panel: {}, error: {}, row: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowMultiple: "", pageRow: "", rowCompact: "" };
34882
35394
  this.copyCssClasses(classes.panel, css.panel);
34883
35395
  this.copyCssClasses(classes.error, css.error);
34884
35396
  if (!!css.pageRow) {
@@ -34890,14 +35402,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34890
35402
  if (!!css.row) {
34891
35403
  classes.row = css.row;
34892
35404
  }
34893
- if (!!css.rowFadeIn) {
34894
- classes.rowFadeIn = css.rowFadeIn;
35405
+ if (!!css.rowEnter) {
35406
+ classes.rowEnter = css.rowEnter;
34895
35407
  }
34896
- if (!!css.rowFadeOut) {
34897
- classes.rowFadeOut = css.rowFadeOut;
35408
+ if (!!css.rowLeave) {
35409
+ classes.rowLeave = css.rowLeave;
34898
35410
  }
34899
- if (!!css.rowDelayedFadeIn) {
34900
- classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
35411
+ if (!!css.rowDelayedEnter) {
35412
+ classes.rowDelayedEnter = css.rowDelayedEnter;
34901
35413
  }
34902
35414
  if (!!css.rowMultiple) {
34903
35415
  classes.rowMultiple = css.rowMultiple;
@@ -35905,6 +36417,20 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35905
36417
  }
35906
36418
  }
35907
36419
  };
36420
+ PanelModelBase.prototype.disableLazyRenderingBeforeElement = function (el) {
36421
+ var row = el ? this.findRowByElement(el) : undefined;
36422
+ var index = el ? this.rows.indexOf(row) : this.rows.length - 1;
36423
+ for (var i = index; i >= 0; i--) {
36424
+ var currentRow = this.rows[i];
36425
+ if (currentRow.isNeedRender) {
36426
+ break;
36427
+ }
36428
+ else {
36429
+ currentRow.isNeedRender = true;
36430
+ currentRow.stopLazyRendering();
36431
+ }
36432
+ }
36433
+ };
35908
36434
  PanelModelBase.prototype.findRowByElement = function (el) {
35909
36435
  var rows = this.rows;
35910
36436
  for (var i = 0; i < rows.length; i++) {
@@ -36326,12 +36852,27 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36326
36852
  return this.parent.getQuestionErrorLocation();
36327
36853
  return this.survey ? this.survey.questionErrorLocation : "top";
36328
36854
  };
36855
+ //ITitleOwner
36856
+ PanelModelBase.prototype.getTitleOwner = function () { return this; };
36329
36857
  Object.defineProperty(PanelModelBase.prototype, "no", {
36330
- //ITitleOwner
36331
36858
  get: function () { return ""; },
36332
36859
  enumerable: false,
36333
36860
  configurable: true
36334
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
+ });
36335
36876
  Object.defineProperty(PanelModelBase.prototype, "cssError", {
36336
36877
  get: function () {
36337
36878
  return this.getCssError(this.cssClasses);
@@ -36393,6 +36934,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
36393
36934
  function PanelModel(name) {
36394
36935
  if (name === void 0) { name = ""; }
36395
36936
  var _this = _super.call(this, name) || this;
36937
+ _this.forcusFirstQuestionOnExpand = true;
36396
36938
  _this.createNewArray("footerActions");
36397
36939
  _this.registerPropertyChangedHandlers(["width"], function () {
36398
36940
  if (!!_this.parent) {
@@ -36496,7 +37038,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
36496
37038
  enumerable: false,
36497
37039
  configurable: true
36498
37040
  });
36499
- PanelModel.prototype.getTitleOwner = function () { return this; };
36500
37041
  Object.defineProperty(PanelModel.prototype, "showNumber", {
36501
37042
  /**
36502
37043
  * Specifies whether to show the panel number in the title.
@@ -36810,8 +37351,16 @@ var panel_PanelModel = /** @class */ (function (_super) {
36810
37351
  enumerable: false,
36811
37352
  configurable: true
36812
37353
  });
37354
+ PanelModel.prototype.expand = function (focusFirstQuestion) {
37355
+ if (focusFirstQuestion === void 0) { focusFirstQuestion = true; }
37356
+ this.forcusFirstQuestionOnExpand = focusFirstQuestion;
37357
+ _super.prototype.expand.call(this);
37358
+ };
36813
37359
  PanelModel.prototype.onElementExpanded = function (elementIsRendered) {
36814
37360
  var _this = this;
37361
+ if (!this.forcusFirstQuestionOnExpand) {
37362
+ return;
37363
+ }
36815
37364
  if (this.survey != null && !this.isLoadingFromJson) {
36816
37365
  var q_1 = this.getFirstQuestionToFocus(false);
36817
37366
  if (!!q_1) {
@@ -37190,11 +37739,6 @@ var page_PageModel = /** @class */ (function (_super) {
37190
37739
  * @see maxTimeToFinish
37191
37740
  */
37192
37741
  _this.timeSpent = 0;
37193
- _this.locTitle.onGetTextCallback = function (text) {
37194
- if (_this.canShowPageNumber() && text)
37195
- return _this.num + ". " + text;
37196
- return text;
37197
- };
37198
37742
  _this.createLocalizableString("navigationDescription", _this, true);
37199
37743
  _this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
37200
37744
  return _this;
@@ -37212,6 +37756,27 @@ var page_PageModel = /** @class */ (function (_super) {
37212
37756
  enumerable: false,
37213
37757
  configurable: true
37214
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
+ });
37215
37780
  PageModel.prototype.canShowPageNumber = function () {
37216
37781
  return this.survey && this.survey.showPageNumbers;
37217
37782
  };
@@ -37316,7 +37881,7 @@ var page_PageModel = /** @class */ (function (_super) {
37316
37881
  configurable: true
37317
37882
  });
37318
37883
  PageModel.prototype.calcCssClasses = function (css) {
37319
- var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "" };
37884
+ var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowReplace: "" };
37320
37885
  this.copyCssClasses(classes.page, css.page);
37321
37886
  this.copyCssClasses(classes.error, css.error);
37322
37887
  if (!!css.pageTitle) {
@@ -37337,14 +37902,17 @@ var page_PageModel = /** @class */ (function (_super) {
37337
37902
  if (!!css.rowCompact) {
37338
37903
  classes.rowCompact = css.rowCompact;
37339
37904
  }
37340
- if (!!css.rowFadeIn) {
37341
- classes.rowFadeIn = css.rowFadeIn;
37905
+ if (!!css.rowEnter) {
37906
+ classes.rowEnter = css.rowEnter;
37907
+ }
37908
+ if (!!css.rowDelayedEnter) {
37909
+ classes.rowDelayedEnter = css.rowDelayedEnter;
37342
37910
  }
37343
- if (!!css.rowDelayedFadeIn) {
37344
- classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
37911
+ if (!!css.rowLeave) {
37912
+ classes.rowLeave = css.rowLeave;
37345
37913
  }
37346
- if (!!css.rowFadeOut) {
37347
- classes.rowFadeOut = css.rowFadeOut;
37914
+ if (!!css.rowReplace) {
37915
+ classes.rowReplace = css.rowReplace;
37348
37916
  }
37349
37917
  if (this.survey) {
37350
37918
  this.survey.updatePageCssClasses(this, classes);
@@ -37983,7 +38551,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
37983
38551
  *
37984
38552
  * For information on event handler parameters, refer to descriptions within the interface.
37985
38553
  *
37986
- * [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))
37987
38555
  * @see triggers
37988
38556
  * @see runTriggers
37989
38557
  */
@@ -39170,6 +39738,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39170
39738
  enumerable: false,
39171
39739
  configurable: true
39172
39740
  });
39741
+ SurveyModel.prototype.disableLazyRenderingBeforeElement = function (el) {
39742
+ if (this.isDesignMode) {
39743
+ var page = this.getPageByElement(el);
39744
+ var index = this.pages.indexOf(page);
39745
+ for (var i = index; i >= 0; i--) {
39746
+ var currentPage = this.pages[i];
39747
+ currentPage.disableLazyRenderingBeforeElement(currentPage == page ? el : undefined);
39748
+ }
39749
+ }
39750
+ };
39173
39751
  SurveyModel.prototype.updateLazyRenderingRowsOnRemovingElements = function () {
39174
39752
  if (!this.isLazyRendering)
39175
39753
  return;
@@ -46710,6 +47288,8 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
46710
47288
 
46711
47289
 
46712
47290
 
47291
+
47292
+
46713
47293
  /**
46714
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.).
46715
47295
  */
@@ -46723,6 +47303,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46723
47303
  _this.isRunningChoices = false;
46724
47304
  _this.isFirstLoadChoicesFromUrl = true;
46725
47305
  _this.isUpdatingChoicesDependedQuestions = false;
47306
+ _this._renderedChoices = [];
47307
+ _this.renderedChoicesAnimation = new animation_AnimationGroup(_this.getRenderedChoicesAnimationOptions(), function (val) {
47308
+ _this._renderedChoices = val;
47309
+ _this.renderedChoicesChangedCallback && _this.renderedChoicesChangedCallback();
47310
+ }, function () { return _this._renderedChoices; });
46726
47311
  _this.headItemsCount = 0;
46727
47312
  _this.footItemsCount = 0;
46728
47313
  _this.prevIsOtherSelected = false;
@@ -46742,7 +47327,8 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46742
47327
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
46743
47328
  _this.onVisibleChanged();
46744
47329
  });
46745
- _this.createNewArray("visibleChoices");
47330
+ _this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
47331
+ _this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
46746
47332
  _this.setNewRestfulProperty();
46747
47333
  var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
46748
47334
  _this.createLocalizableString("otherErrorText", _this, true, "otherRequiredError");
@@ -46772,6 +47358,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
46772
47358
  enumerable: false,
46773
47359
  configurable: true
46774
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
+ };
46775
47381
  QuestionSelectBase.prototype.getType = function () {
46776
47382
  return "selectbase";
46777
47383
  };
@@ -47549,6 +48155,10 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47549
48155
  var itemValue = itemvalue_ItemValue.getItemByValue(this.getFilteredChoices(), val);
47550
48156
  return !!itemValue && !itemValue.isEnabled;
47551
48157
  };
48158
+ QuestionSelectBase.prototype.endLoadingFromJson = function () {
48159
+ _super.prototype.endLoadingFromJson.call(this);
48160
+ this.updateVisibleChoices();
48161
+ };
47552
48162
  Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
47553
48163
  /**
47554
48164
  * Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
@@ -47852,6 +48462,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47852
48462
  var oldValue = this.visibleChoices;
47853
48463
  if (!this.isTwoValueEquals(oldValue, newValue) || this.choicesLazyLoadEnabled) {
47854
48464
  this.setArrayPropertyDirectly("visibleChoices", newValue);
48465
+ this.updateRenderedChoices();
47855
48466
  }
47856
48467
  };
47857
48468
  QuestionSelectBase.prototype.calcVisibleChoices = function () {
@@ -48233,9 +48844,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48233
48844
  return (!this.isDesignMode ||
48234
48845
  this.getPropertyByName(propName).visible);
48235
48846
  };
48236
- QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
48847
+ QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
48237
48848
  var _this = this;
48238
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
48849
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
48239
48850
  if (!this.hasOther || !this.isOtherSelected || this.otherValue
48240
48851
  || isOnValueChanged && !this.prevOtherErrorValue)
48241
48852
  return;
@@ -48658,12 +49269,79 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48658
49269
  .append(this.cssClasses.controlLabelChecked, this.isItemSelected(item))
48659
49270
  .toString() || undefined;
48660
49271
  };
49272
+ QuestionSelectBase.prototype.updateRenderedChoices = function () {
49273
+ this.renderedChoices = this.onGetRenderedChoicesCallback ? this.onGetRenderedChoicesCallback(this.visibleChoices) : this.visibleChoices;
49274
+ };
49275
+ QuestionSelectBase.prototype.getRenderedChoicesAnimationOptions = function () {
49276
+ var _this = this;
49277
+ return {
49278
+ isAnimationEnabled: function () {
49279
+ return _this.animationAllowed;
49280
+ },
49281
+ getRerenderEvent: function () {
49282
+ return _this.onElementRerendered;
49283
+ },
49284
+ getKey: function (item) { return item != _this.newItemValue ? item.value : _this.newItemValue; },
49285
+ getLeaveOptions: function (item) {
49286
+ var cssClass = _this.cssClasses.itemLeave;
49287
+ if (_this.hasColumns) {
49288
+ var index = _this.bodyItems.indexOf(item);
49289
+ if (index !== -1 && index !== _this.bodyItems.length - 1) {
49290
+ cssClass = "";
49291
+ }
49292
+ }
49293
+ return {
49294
+ cssClass: cssClass,
49295
+ onBeforeRunAnimation: prepareElementForVerticalAnimation,
49296
+ onAfterRunAnimation: cleanHtmlElementAfterAnimation
49297
+ };
49298
+ },
49299
+ getAnimatedElement: function (item) {
49300
+ return item.getRootElement();
49301
+ },
49302
+ getEnterOptions: function (item) {
49303
+ var cssClass = _this.cssClasses.itemEnter;
49304
+ if (_this.hasColumns) {
49305
+ var index = _this.bodyItems.indexOf(item);
49306
+ if (index !== -1 && index !== _this.bodyItems.length - 1) {
49307
+ cssClass = "";
49308
+ }
49309
+ }
49310
+ return {
49311
+ cssClass: cssClass,
49312
+ onBeforeRunAnimation: function (el) {
49313
+ if (_this.getCurrentColCount() == 0 && _this.bodyItems.indexOf(item) >= 0) {
49314
+ var leftPosition = el.parentElement.firstElementChild.offsetLeft;
49315
+ if (el.offsetLeft > leftPosition) {
49316
+ setPropertiesOnElementForAnimation(el, { moveAnimationDuration: "0s", fadeAnimationDelay: "0s" }, "--");
49317
+ }
49318
+ }
49319
+ prepareElementForVerticalAnimation(el);
49320
+ },
49321
+ onAfterRunAnimation: cleanHtmlElementAfterAnimation
49322
+ };
49323
+ }
49324
+ };
49325
+ };
49326
+ Object.defineProperty(QuestionSelectBase.prototype, "renderedChoices", {
49327
+ get: function () {
49328
+ return this._renderedChoices;
49329
+ },
49330
+ set: function (val) {
49331
+ this.renderedChoicesAnimation.sync(val);
49332
+ },
49333
+ enumerable: false,
49334
+ configurable: true
49335
+ });
48661
49336
  Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
48662
49337
  get: function () {
48663
49338
  var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
48664
49339
  var res = [];
48665
- for (var i = 0; i < count; i++)
48666
- res.push(this.visibleChoices[i]);
49340
+ for (var i = 0; i < count; i++) {
49341
+ if (this.renderedChoices[i]) {
49342
+ res.push(this.renderedChoices[i]);
49343
+ }
49344
+ }
48667
49345
  return res;
48668
49346
  },
48669
49347
  enumerable: false,
@@ -48673,9 +49351,12 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48673
49351
  get: function () {
48674
49352
  var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
48675
49353
  var res = [];
48676
- var items = this.visibleChoices;
48677
- for (var i = 0; i < count; i++)
48678
- res.push(items[items.length - count + i]);
49354
+ var items = this.renderedChoices;
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
+ }
48679
49360
  return res;
48680
49361
  },
48681
49362
  enumerable: false,
@@ -48684,14 +49365,14 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48684
49365
  Object.defineProperty(QuestionSelectBase.prototype, "dataChoices", {
48685
49366
  get: function () {
48686
49367
  var _this = this;
48687
- return this.visibleChoices.filter(function (item) { return !_this.isBuiltInChoice(item); });
49368
+ return this.renderedChoices.filter(function (item) { return !_this.isBuiltInChoice(item); });
48688
49369
  },
48689
49370
  enumerable: false,
48690
49371
  configurable: true
48691
49372
  });
48692
49373
  Object.defineProperty(QuestionSelectBase.prototype, "bodyItems", {
48693
49374
  get: function () {
48694
- return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.visibleChoices;
49375
+ return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.renderedChoices;
48695
49376
  },
48696
49377
  enumerable: false,
48697
49378
  configurable: true
@@ -48714,9 +49395,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48714
49395
  get: function () {
48715
49396
  var columns = [];
48716
49397
  var colCount = this.getCurrentColCount();
48717
- if (this.hasColumns && this.visibleChoices.length > 0) {
49398
+ if (this.hasColumns && this.renderedChoices.length > 0) {
48718
49399
  var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isDesignMode) ?
48719
- this.visibleChoices : this.dataChoices;
49400
+ this.renderedChoices : this.dataChoices;
48720
49401
  if (settings.showItemsInOrder == "column") {
48721
49402
  var prevIndex = 0;
48722
49403
  var leftElementsCount = choicesToBuildColumns.length % colCount;
@@ -48902,9 +49583,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48902
49583
  return classes;
48903
49584
  };
48904
49585
  question_baseselect_decorate([
48905
- jsonobject_property({ onSet: function (newVal, target) {
49586
+ jsonobject_property({
49587
+ onSet: function (newVal, target) {
48906
49588
  target.onSelectedItemValuesChangedHandler(newVal);
48907
- } })
49589
+ }
49590
+ })
48908
49591
  ], QuestionSelectBase.prototype, "selectedItemValues", void 0);
48909
49592
  question_baseselect_decorate([
48910
49593
  jsonobject_property()
@@ -48912,6 +49595,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48912
49595
  question_baseselect_decorate([
48913
49596
  jsonobject_property({ localizable: true })
48914
49597
  ], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
49598
+ question_baseselect_decorate([
49599
+ propertyArray()
49600
+ ], QuestionSelectBase.prototype, "_renderedChoices", void 0);
48915
49601
  return QuestionSelectBase;
48916
49602
  }(question_Question));
48917
49603
 
@@ -49375,14 +50061,14 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
49375
50061
  this.model.onHiding();
49376
50062
  };
49377
50063
  PopupBaseViewModel.prototype.getLeaveOptions = function () {
49378
- return { cssClass: "sv-popup--animate-leave", onBeforeRunAnimation: function (el) {
50064
+ return { cssClass: "sv-popup--leave", onBeforeRunAnimation: function (el) {
49379
50065
  el.setAttribute("inert", "");
49380
50066
  },
49381
50067
  onAfterRunAnimation: function (el) { return el.removeAttribute("inert"); }
49382
50068
  };
49383
50069
  };
49384
50070
  PopupBaseViewModel.prototype.getEnterOptions = function () {
49385
- return { cssClass: "sv-popup--animate-enter" };
50071
+ return { cssClass: "sv-popup--enter" };
49386
50072
  };
49387
50073
  PopupBaseViewModel.prototype.getAnimatedElement = function () {
49388
50074
  return this.getAnimationContainer();
@@ -49625,7 +50311,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
49625
50311
  };
49626
50312
  PopupBaseViewModel.prototype.updateOnHiding = function () {
49627
50313
  if (this.isFocusedContent && this.prevActiveElement) {
49628
- this.prevActiveElement.focus();
50314
+ this.prevActiveElement.focus({ preventScroll: true });
49629
50315
  }
49630
50316
  };
49631
50317
  PopupBaseViewModel.prototype.focusContainer = function () {
@@ -51242,6 +51928,7 @@ var question_matrix_extends = (undefined && undefined.__extends) || (function ()
51242
51928
 
51243
51929
 
51244
51930
 
51931
+
51245
51932
  var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
51246
51933
  question_matrix_extends(MatrixRowModel, _super);
51247
51934
  function MatrixRowModel(item, fullName, data, value) {
@@ -51529,9 +52216,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51529
52216
  _this.onColumnsChanged();
51530
52217
  });
51531
52218
  _this.registerPropertyChangedHandlers(["rows"], function () {
51532
- if (!_this.filterItems()) {
51533
- _this.onRowsChanged();
51534
- }
52219
+ _this.runCondition(_this.getDataFilteredValues(), _this.getDataFilteredProperties());
52220
+ _this.onRowsChanged();
51535
52221
  });
51536
52222
  _this.registerPropertyChangedHandlers(["hideIfRowsEmpty"], function () {
51537
52223
  _this.updateVisibilityBasedOnRows();
@@ -51701,21 +52387,31 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51701
52387
  }
51702
52388
  return res;
51703
52389
  };
51704
- QuestionMatrixModel.prototype.runItemsCondition = function (values, properties) {
52390
+ QuestionMatrixModel.prototype.runCondition = function (values, properties) {
51705
52391
  itemvalue_ItemValue.runEnabledConditionsForItems(this.rows, undefined, values, properties);
51706
- 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);
51707
52400
  };
51708
52401
  QuestionMatrixModel.prototype.getVisibleRows = function () {
52402
+ if (!!this.generatedVisibleRows)
52403
+ return this.generatedVisibleRows;
51709
52404
  var result = new Array();
51710
52405
  var val = this.value;
51711
52406
  if (!val)
51712
52407
  val = {};
51713
- var rows = !!this.filteredRows ? this.filteredRows : this.rows;
52408
+ var rows = this.filteredRows || this.rows;
51714
52409
  for (var i = 0; i < rows.length; i++) {
51715
52410
  var row = rows[i];
51716
52411
  if (this.isValueEmpty(row.value))
51717
52412
  continue;
51718
- 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]));
51719
52415
  }
51720
52416
  this.generatedVisibleRows = result;
51721
52417
  return result;
@@ -51731,6 +52427,8 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51731
52427
  QuestionMatrixModel.prototype.endLoadingFromJson = function () {
51732
52428
  _super.prototype.endLoadingFromJson.call(this);
51733
52429
  this.rows = this.sortVisibleRows(this.rows);
52430
+ this.onRowsChanged();
52431
+ this.onColumnsChanged();
51734
52432
  };
51735
52433
  QuestionMatrixModel.prototype.isNewValueCorrect = function (val) {
51736
52434
  return helpers_Helpers.isValueObject(val, true);
@@ -51792,11 +52490,11 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51792
52490
  QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
51793
52491
  return this.isMouseDown === true && this.hasValuesInAllRows();
51794
52492
  };
51795
- QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
51796
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
52493
+ QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
52494
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
51797
52495
  if (!isOnValueChanged || this.hasCssError()) {
51798
52496
  var rowsErrors = { noValue: false, isNotUnique: false };
51799
- this.checkErrorsAllRows(true, rowsErrors);
52497
+ this.checkErrorsAllRows(fireCallback, rowsErrors);
51800
52498
  if (rowsErrors.noValue) {
51801
52499
  errors.push(new RequiredInAllRowsError(null, this));
51802
52500
  }
@@ -51963,11 +52661,47 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
51963
52661
  json["type"] = question.getType();
51964
52662
  return json;
51965
52663
  };
52664
+ QuestionMatrixModel.prototype.clearIncorrectValues = function () {
52665
+ this.clearInvisibleValuesInRowsAndColumns(true, true, true);
52666
+ _super.prototype.clearIncorrectValues.call(this);
52667
+ };
51966
52668
  QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function (reason) {
51967
52669
  _super.prototype.clearValueIfInvisibleCore.call(this, reason);
51968
- if (this.hasRows) {
51969
- 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
+ }
52694
+ }
52695
+ if (inCorrectRows) {
52696
+ updatedData = newData;
51970
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;
51971
52705
  };
51972
52706
  QuestionMatrixModel.prototype.getFirstInputElementId = function () {
51973
52707
  var rows = this.generatedVisibleRows;
@@ -52849,9 +53583,9 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
52849
53583
  }
52850
53584
  return _super.prototype.valueFromDataCore.call(this, val);
52851
53585
  };
52852
- QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
53586
+ QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
52853
53587
  var _this = this;
52854
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
53588
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
52855
53589
  if (isOnValueChanged)
52856
53590
  return;
52857
53591
  if (this.isValueLessMin) {
@@ -52873,6 +53607,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
52873
53607
  }
52874
53608
  var valName = this.getValidatorTitle();
52875
53609
  var emailValidator = new EmailValidator();
53610
+ emailValidator.errorOwner = this;
52876
53611
  if (this.inputType === "email" &&
52877
53612
  !this.validators.some(function (v) { return v.getType() === "emailvalidator"; })) {
52878
53613
  var validateResult = emailValidator.validate(this.value, valName);
@@ -52892,7 +53627,8 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
52892
53627
  return isValid;
52893
53628
  };
52894
53629
  QuestionTextModel.prototype.convertFuncValuetoQuestionValue = function (val) {
52895
- return helpers_Helpers.convertValToQuestionVal(val, this.inputType);
53630
+ var type = this.maskTypeIsEmpty ? this.inputType : this.maskSettings.getTypeForExpressions();
53631
+ return helpers_Helpers.convertValToQuestionVal(val, type);
52896
53632
  };
52897
53633
  QuestionTextModel.prototype.getMinMaxErrorText = function (errorText, value) {
52898
53634
  if (helpers_Helpers.isValueEmpty(value))
@@ -55257,8 +55993,8 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
55257
55993
  return val.map(function (item) { return _this.createItemValue(item); });
55258
55994
  };
55259
55995
  QuestionCheckboxModel.prototype.getAnswerCorrectIgnoreOrder = function () { return true; };
55260
- QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
55261
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
55996
+ QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
55997
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
55262
55998
  if (isOnValueChanged)
55263
55999
  return;
55264
56000
  if (this.minSelectedChoices > 0 && this.checkMinSelectedChoicesUnreached()) {
@@ -57661,6 +58397,8 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
57661
58397
 
57662
58398
 
57663
58399
 
58400
+
58401
+
57664
58402
  /**
57665
58403
  * A class that describes the Long Text question type.
57666
58404
  *
@@ -57668,9 +58406,46 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
57668
58406
  */
57669
58407
  var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
57670
58408
  question_comment_extends(QuestionCommentModel, _super);
57671
- function QuestionCommentModel() {
57672
- 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;
57673
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
+ };
57674
58449
  Object.defineProperty(QuestionCommentModel.prototype, "rows", {
57675
58450
  /**
57676
58451
  * Specifies the visible height of the comment area, measured in lines.
@@ -57776,9 +58551,9 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
57776
58551
  _super.prototype.afterRenderQuestionElement.call(this, el);
57777
58552
  };
57778
58553
  QuestionCommentModel.prototype.updateElement = function () {
57779
- var _this = this;
58554
+ var _this_1 = this;
57780
58555
  if (this.element && this.renderedAutoGrow) {
57781
- setTimeout(function () { return increaseHeightByContent(_this.element); }, 1);
58556
+ setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
57782
58557
  }
57783
58558
  };
57784
58559
  QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
@@ -58178,8 +58953,8 @@ var question_file_QuestionFileModelBase = /** @class */ (function (_super) {
58178
58953
  return;
58179
58954
  this.survey.clearFiles(this, this.name, this.value, null, function () { });
58180
58955
  };
58181
- QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
58182
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
58956
+ QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
58957
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
58183
58958
  if (this.isUploading && this.waitForUpload) {
58184
58959
  errors.push(new UploadingFileError(this.getLocalizationString("uploadingFile"), this));
58185
58960
  }
@@ -61888,21 +62663,10 @@ var question_image_decorate = (undefined && undefined.__decorate) || function (d
61888
62663
 
61889
62664
 
61890
62665
 
61891
- var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
62666
+
61892
62667
  var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
61893
62668
  var youtubeUrl = "https://www.youtube.com/";
61894
62669
  var youtubeEmbed = "embed";
61895
- function isUrlYoutubeVideo(url) {
61896
- if (!url)
61897
- return false;
61898
- url = url.toLowerCase();
61899
- url = url.replace(/^https?:\/\//, "");
61900
- for (var i = 0; i < youtubeDomains.length; i++) {
61901
- if (url.indexOf(youtubeDomains[i] + "/") === 0)
61902
- return true;
61903
- }
61904
- return false;
61905
- }
61906
62670
  /**
61907
62671
  * A class that describes the Image question type. Unlike other question types, Image cannot have a title or value.
61908
62672
  *
@@ -62127,7 +62891,7 @@ var question_image_QuestionImageModel = /** @class */ (function (_super) {
62127
62891
  }
62128
62892
  };
62129
62893
  QuestionImageModel.prototype.isYoutubeVideo = function () {
62130
- return isUrlYoutubeVideo(this.imageLink);
62894
+ return helpers_Helpers.isUrlYoutubeVideo(this.imageLink);
62131
62895
  };
62132
62896
  QuestionImageModel.prototype.isVideo = function () {
62133
62897
  var link = this.imageLink;
@@ -62147,9 +62911,8 @@ var question_image_QuestionImageModel = /** @class */ (function (_super) {
62147
62911
  }(QuestionNonValue));
62148
62912
 
62149
62913
  function getCorrectImageLink(val, isYouTube) {
62150
- if (!val || !isUrlYoutubeVideo(val))
62914
+ if (!val || !helpers_Helpers.isUrlYoutubeVideo(val))
62151
62915
  return isYouTube ? "" : val;
62152
- //if(!val || !isUrlYoutubeVideo(val)) return val;
62153
62916
  var res = val.toLocaleLowerCase();
62154
62917
  if (res.indexOf(youtubeEmbed) > -1)
62155
62918
  return val;
@@ -63642,8 +64405,15 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63642
64405
  if (!!res)
63643
64406
  return res;
63644
64407
  }
64408
+ if (this.showAddPanelButton && (!withError || this.currentErrorCount > 0))
64409
+ return this;
63645
64410
  return null;
63646
64411
  };
64412
+ QuestionPanelDynamicModel.prototype.getFirstInputElementId = function () {
64413
+ if (this.showAddPanelButton)
64414
+ return this.addButtonId;
64415
+ return _super.prototype.getFirstInputElementId.call(this);
64416
+ };
63647
64417
  QuestionPanelDynamicModel.prototype.setSurveyImpl = function (value, isLight) {
63648
64418
  _super.prototype.setSurveyImpl.call(this, value, isLight);
63649
64419
  this.setTemplatePanelSurveyImpl();
@@ -64093,34 +64863,44 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64093
64863
  }
64094
64864
  },
64095
64865
  getEnterOptions: function () {
64096
- var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperFadeIn).append(getDirectionCssClass()).toString();
64866
+ var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperEnter).append(getDirectionCssClass()).toString();
64097
64867
  return {
64098
64868
  onBeforeRunAnimation: function (el) {
64099
- var _a;
64100
64869
  if (_this.focusNewPanelCallback) {
64101
64870
  var scolledElement = _this.isRenderModeList ? el : el.parentElement;
64102
64871
  survey_element_SurveyElement.ScrollElementToViewCore(scolledElement, false, false, { behavior: "smooth" });
64103
64872
  }
64104
- if (!_this.isRenderModeList) {
64105
- (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.style.setProperty("--animation-height-to", el.offsetHeight + "px");
64873
+ if (!_this.isRenderModeList && el.parentElement) {
64874
+ setPropertiesOnElementForAnimation(el.parentElement, { heightTo: el.offsetHeight + "px" });
64106
64875
  }
64107
64876
  else {
64108
- el.style.setProperty("--animation-height", el.offsetHeight + "px");
64877
+ prepareElementForVerticalAnimation(el);
64878
+ }
64879
+ },
64880
+ onAfterRunAnimation: function (el) {
64881
+ cleanHtmlElementAfterAnimation(el);
64882
+ if (el.parentElement) {
64883
+ cleanHtmlElementAfterAnimation(el.parentElement);
64109
64884
  }
64110
64885
  },
64111
64886
  cssClass: cssClass
64112
64887
  };
64113
64888
  },
64114
64889
  getLeaveOptions: function () {
64115
- var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperFadeOut).append(getDirectionCssClass()).toString();
64890
+ var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperLeave).append(getDirectionCssClass()).toString();
64116
64891
  return {
64117
64892
  onBeforeRunAnimation: function (el) {
64118
- var _a;
64119
- if (!_this.isRenderModeList) {
64120
- (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.style.setProperty("--animation-height-from", el.offsetHeight + "px");
64893
+ if (!_this.isRenderModeList && el.parentElement) {
64894
+ setPropertiesOnElementForAnimation(el.parentElement, { heightFrom: el.offsetHeight + "px" });
64121
64895
  }
64122
64896
  else {
64123
- el.style.setProperty("--animation-height", el.offsetHeight + "px");
64897
+ prepareElementForVerticalAnimation(el);
64898
+ }
64899
+ },
64900
+ onAfterRunAnimation: function (el) {
64901
+ cleanHtmlElementAfterAnimation(el);
64902
+ if (el.parentElement) {
64903
+ cleanHtmlElementAfterAnimation(el.parentElement);
64124
64904
  }
64125
64905
  },
64126
64906
  cssClass: cssClass
@@ -64620,6 +65400,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64620
65400
  enumerable: false,
64621
65401
  configurable: true
64622
65402
  });
65403
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "addButtonId", {
65404
+ get: function () {
65405
+ return this.id + "addPanel";
65406
+ },
65407
+ enumerable: false,
65408
+ configurable: true
65409
+ });
64623
65410
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "newPanelPosition", {
64624
65411
  /**
64625
65412
  * Specifies the position of newly added panels.
@@ -64841,8 +65628,9 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64841
65628
  return 0;
64842
65629
  var onSurveyNumbering = this.showQuestionNumbers === "onSurvey";
64843
65630
  var startIndex = onSurveyNumbering ? value : 0;
64844
- for (var i = 0; i < this.visiblePanelsCore.length; i++) {
64845
- var counter = this.setPanelVisibleIndex(this.visiblePanelsCore[i], startIndex, this.showQuestionNumbers != "off");
65631
+ var panels = this.isDesignMode ? [this.template] : this.visiblePanelsCore;
65632
+ for (var i = 0; i < panels.length; i++) {
65633
+ var counter = this.setPanelVisibleIndex(panels[i], startIndex, this.showQuestionNumbers != "off");
64846
65634
  if (onSurveyNumbering) {
64847
65635
  startIndex += counter;
64848
65636
  }
@@ -65367,13 +66155,18 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65367
66155
  }
65368
66156
  }
65369
66157
  this.updateIsReady();
65370
- if (this.isReadOnly || !this.allowAddPanel) {
66158
+ if (!this.showAddPanelButton) {
65371
66159
  this.updateNoEntriesTextDefaultLoc();
65372
66160
  }
65373
66161
  this.updateFooterActions();
65374
66162
  this.isBuildingPanelsFirstTime = false;
65375
66163
  this.releaseAnimations();
65376
66164
  };
66165
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "showAddPanelButton", {
66166
+ get: function () { return this.allowAddPanel && !this.isReadOnly; },
66167
+ enumerable: false,
66168
+ configurable: true
66169
+ });
65377
66170
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "wasNotRenderedInSurvey", {
65378
66171
  get: function () {
65379
66172
  return !this.hasPanelBuildFirstTime && !this.wasRendered && !!this.survey;
@@ -67876,6 +68669,9 @@ var mask_base_InputMaskBase = /** @class */ (function (_super) {
67876
68669
  InputMaskBase.prototype.getUnmaskedValue = function (src) { return src; };
67877
68670
  InputMaskBase.prototype.getMaskedValue = function (src) { return src; };
67878
68671
  InputMaskBase.prototype.getTextAlignment = function () { return "auto"; };
68672
+ InputMaskBase.prototype.getTypeForExpressions = function () {
68673
+ return "text";
68674
+ };
67879
68675
  mask_base_decorate([
67880
68676
  jsonobject_property()
67881
68677
  ], InputMaskBase.prototype, "saveMaskedValue", void 0);
@@ -68599,6 +69395,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
68599
69395
  InputMaskDateTime.prototype.getType = function () {
68600
69396
  return "datetimemask";
68601
69397
  };
69398
+ InputMaskDateTime.prototype.getTypeForExpressions = function () {
69399
+ return this.hasTimePart ? "datetime-local" : "datetime";
69400
+ };
68602
69401
  InputMaskDateTime.prototype.updateLiterals = function () {
68603
69402
  this.lexems = getDateTimeLexems(this.pattern || "");
68604
69403
  };
@@ -69241,8 +70040,8 @@ Serializer.addClass("currencymask", [
69241
70040
 
69242
70041
  var Version;
69243
70042
  var ReleaseDate;
69244
- Version = "" + "1.11.14";
69245
- ReleaseDate = "" + "2024-09-04";
70043
+ Version = "" + "1.12.2";
70044
+ ReleaseDate = "" + "2024-09-16";
69246
70045
  function checkLibraryVersion(ver, libraryName) {
69247
70046
  if (Version != ver) {
69248
70047
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -69407,6 +70206,7 @@ function checkPrefix(prefix) {
69407
70206
 
69408
70207
 
69409
70208
 
70209
+
69410
70210
 
69411
70211
 
69412
70212
  //Uncomment to include the "date" question type.
@@ -70301,6 +71101,7 @@ var modernCss = {
70301
71101
  page: {
70302
71102
  root: "sv-page sv-body__page",
70303
71103
  title: "sv-title sv-page__title",
71104
+ number: "sv-page__num",
70304
71105
  description: "sv-description sv-page__description",
70305
71106
  },
70306
71107
  pageTitle: "sv-title sv-page__title",
@@ -74951,43 +75752,43 @@ var japaneseSurveyStrings = {
74951
75752
  otherItemText: "その他(説明)",
74952
75753
  noneItemText: "なし",
74953
75754
  refuseItemText: "回答を拒否する",
74954
- dontKnowItemText: "わかりません",
75755
+ dontKnowItemText: "わからない",
74955
75756
  selectAllItemText: "すべて選択",
74956
- progressText: "{0}/{1}",
75757
+ progressText: "ページ{0}/{1}",
74957
75758
  indexText: "{1}の{0}",
74958
75759
  panelDynamicProgressText: "{1}の{0}を記録する",
74959
75760
  panelDynamicTabTextFormat: "Panel {panelIndex}",
74960
- questionsProgressText: "{0}/{1}の質問に回答しました。",
74961
- emptySurvey: "この調査に表示できるページや質問はありません",
74962
- completingSurvey: "調査を完了してくれてありがとうございました",
74963
- completingSurveyBefore: "当社の記録によると、この調査はすでに完了しています。",
74964
- loadingSurvey: "調査をダウンロード中",
75761
+ questionsProgressText: "{0}/{1}問回答済",
75762
+ emptySurvey: "アンケートに表示可能な要素がありません。",
75763
+ completingSurvey: "アンケートにご協力いただき、ありがとうございます。",
75764
+ completingSurveyBefore: "このアンケートはすでに回答済みです。",
75765
+ loadingSurvey: "アンケートを読み込んでいます...",
74965
75766
  placeholder: "選択",
74966
- ratingOptionsCaption: "選ぶ。。。",
74967
- value: "値打ち",
74968
- requiredError: "質問にお答え下さい",
74969
- requiredErrorInPanel: "最低でも1つの質問に答えてください。",
74970
- requiredInAllRowsError: "質問には全列で回答してください。",
74971
- eachRowUniqueError: "各行には一意の値が必要です。",
75767
+ ratingOptionsCaption: "選択。。。",
75768
+ value: "",
75769
+ requiredError: "回答が必要です",
75770
+ requiredErrorInPanel: "回答が必要です:少なくとも1つの質問に答えてください。",
75771
+ requiredInAllRowsError: "回答が必要です:すべての行の質問に答えてください。",
75772
+ eachRowUniqueError: "各行に一意の値を入力してください。",
74972
75773
  numericError: "数字でご記入下さい",
74973
- minError: "値は {0} 値より小さくすることはできません",
74974
- maxError: "値は {0} を超えてはなりません。",
74975
- textMinLength: "{0} 文字以上で入力して下さい",
74976
- textMaxLength: "{0}文字以下で入力してください。",
74977
- textMinMaxLength: "{0}以上{1}未満の文字を入力してください。",
74978
- minRowCountError: "{0}行以上で入力して下さい",
74979
- minSelectError: "{0}種類以上を選択して下さい",
74980
- maxSelectError: "{0}以上のバリアントを選択しないでください。",
74981
- numericMinMax: "{0}は{1}以上であり、{2}以下であることが望ましい。",
74982
- numericMin: "'{0}' は同等か{1}より大きくなければなりません",
74983
- numericMax: "'{0}' は同等か{1}より小さくなければなりません",
74984
- invalidEmail: "有効なメールアドレスをご記入下さい",
74985
- 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' を返す必要があります。",
74986
75787
  urlRequestError: "リクエストはエラー '{0}' を返しました。{1}",
74987
75788
  urlGetChoicesError: "リクエストが空のデータを返したか、'path' プロパティが正しくありません。",
74988
75789
  exceedMaxSize: "ファイルのサイズは{0}を超えてはいけません",
74989
75790
  noUploadFilesHandler: "ファイルはアップロードできません。「onUploadFiles」イベントのハンドラーを追加してください。",
74990
- otherRequiredError: "その他の値を入力してください。",
75791
+ otherRequiredError: "回答が必要です:他の値を入力してください。",
74991
75792
  uploadingFile: "ファイルをアップロード中です。しばらくしてから再度お試し下さい",
74992
75793
  loadingFile: "読み込み中",
74993
75794
  chooseFile: "ファイルを選択",
@@ -74997,20 +75798,20 @@ var japaneseSurveyStrings = {
74997
75798
  keyDuplicationError: "この値は一意でなければなりません。",
74998
75799
  addColumn: "列の追加",
74999
75800
  addRow: "追加行",
75000
- removeRow: "除去",
75001
- emptyRowsText: "行はありません。",
75801
+ removeRow: "削除",
75802
+ emptyRowsText: "行がありません。",
75002
75803
  addPanel: "新規追加",
75003
- removePanel: "除去",
75804
+ removePanel: "削除",
75004
75805
  showDetails: "詳細を表示",
75005
- hideDetails: "詳細を隠す",
75006
- choices_Item: "品目",
75007
- matrix_column: "コラム",
75806
+ hideDetails: "詳細を非表示",
75807
+ choices_Item: "項目",
75808
+ matrix_column: "",
75008
75809
  matrix_row: "行",
75009
75810
  multipletext_itemname: "テキスト",
75010
- savingData: "結果はサーバーに保存されています...。",
75811
+ savingData: "結果を保存中...。",
75011
75812
  savingDataError: "エラーが発生し、結果を保存できませんでした。",
75012
- savingDataSuccess: "結果は無事に保存されました",
75013
- savingExceedSize: "回答は 64 KB を超えています。ファイルのサイズを小さくしてもう一度お試しいただくか、アンケートの所有者にお問い合わせください。",
75813
+ savingDataSuccess: "結果が正常に保存されました",
75814
+ savingExceedSize: "回答は 64 KB を超えています。ファイルのサイズを小さくしてもう一度お試しいただくか、アンケートの作成者にお問い合わせください。",
75014
75815
  saveAgainButton: "もう一度試してみてください。",
75015
75816
  timerMin: "僅少",
75016
75817
  timerSec: "セック",
@@ -75025,23 +75826,23 @@ var japaneseSurveyStrings = {
75025
75826
  signaturePlaceHolderReadOnly: "署名なし",
75026
75827
  chooseFileCaption: "ファイルを選択",
75027
75828
  takePhotoCaption: "写真を撮る",
75028
- photoPlaceholder: "下のボタンをクリックして、カメラを使用して写真を撮ります。",
75029
- fileOrPhotoPlaceholder: "アップロードするファイルをドラッグアンドドロップまたは選択するか、カメラを使用して写真を撮ります。",
75030
- replaceFileCaption: "ファイルの置換",
75829
+ photoPlaceholder: "下のボタンをクリックしてカメラで写真を撮影してください。",
75830
+ fileOrPhotoPlaceholder: "ファイルをドラッグ&ドロップまたは選択してアップロードするか、カメラで写真を撮影してください。",
75831
+ replaceFileCaption: "ファイルを置換",
75031
75832
  removeFileCaption: "このファイルを削除",
75032
- booleanCheckedLabel: "",
75033
- booleanUncheckedLabel: "",
75833
+ booleanCheckedLabel: "はい",
75834
+ booleanUncheckedLabel: "いいえ",
75034
75835
  confirmRemoveFile: "このファイルを削除してもよろしいですか?{0}?",
75035
75836
  confirmRemoveAllFiles: "すべてのファイルを削除してもよろしいですか?",
75036
- questionTitlePatternText: "質問名",
75837
+ questionTitlePatternText: "質問のタイトル",
75037
75838
  modalCancelButtonText: "キャンセル",
75038
75839
  modalApplyButtonText: "申し込む",
75039
75840
  filterStringPlaceholder: "検索するタイプ...",
75040
75841
  emptyMessage: "表示するデータがありません",
75041
75842
  noEntriesText: "エントリはまだありません。\n下のボタンをクリックして、新しいエントリを追加します。",
75042
75843
  noEntriesReadonlyText: "エントリはありません。",
75043
- tabTitlePlaceholder: "新規パネル",
75044
- more: "もっとその",
75844
+ tabTitlePlaceholder: "新しいパネル",
75845
+ more: "続きを見る",
75045
75846
  tagboxDoneButtonCaption: "わかりました",
75046
75847
  selectToRankEmptyRankedAreaText: "すべての選択肢がランク付けされます",
75047
75848
  selectToRankEmptyUnrankedAreaText: "ここに選択肢をドラッグアンドドロップしてランク付けします",
@@ -79116,6 +79917,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
79116
79917
  function SurveyElementBase(props) {
79117
79918
  var _this = _super.call(this, props) || this;
79118
79919
  _this._allowComponentUpdate = true;
79920
+ _this.prevStateElements = [];
79119
79921
  return _this;
79120
79922
  }
79121
79923
  SurveyElementBase.renderLocString = function (locStr, style, key) {
@@ -79135,9 +79937,14 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
79135
79937
  };
79136
79938
  SurveyElementBase.prototype.componentWillUnmount = function () {
79137
79939
  this.unMakeBaseElementsReact();
79940
+ this.disableStateElementsRerenderEvent(this.getStateElements());
79138
79941
  };
79139
79942
  SurveyElementBase.prototype.componentDidUpdate = function (prevProps, prevState) {
79943
+ var _a;
79140
79944
  this.makeBaseElementsReact();
79945
+ var stateElements = this.getStateElements();
79946
+ this.disableStateElementsRerenderEvent(((_a = this.prevStateElements) !== null && _a !== void 0 ? _a : []).filter(function (el) { return !stateElements.includes(el); }));
79947
+ this.prevStateElements = [];
79141
79948
  this.getStateElements().forEach(function (el) {
79142
79949
  el.afterRerender();
79143
79950
  });
@@ -79152,6 +79959,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
79152
79959
  SurveyElementBase.prototype.shouldComponentUpdate = function (nextProps, nextState) {
79153
79960
  if (this._allowComponentUpdate) {
79154
79961
  this.unMakeBaseElementsReact();
79962
+ this.prevStateElements = this.getStateElements();
79155
79963
  }
79156
79964
  return this._allowComponentUpdate;
79157
79965
  };
@@ -79219,10 +80027,14 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
79219
80027
  SurveyElementBase.prototype.unMakeBaseElementsReact = function () {
79220
80028
  var els = this.getStateElements();
79221
80029
  for (var i = 0; i < els.length; i++) {
79222
- els[i].disableOnElementRenderedEvent();
79223
80030
  this.unMakeBaseElementReact(els[i]);
79224
80031
  }
79225
80032
  };
80033
+ SurveyElementBase.prototype.disableStateElementsRerenderEvent = function (els) {
80034
+ els.forEach(function (el) {
80035
+ el.disableOnElementRenderedEvent();
80036
+ });
80037
+ };
79226
80038
  SurveyElementBase.prototype.getStateElements = function () {
79227
80039
  var el = this.getStateElement();
79228
80040
  return !!el ? [el] : [];
@@ -80414,28 +81226,27 @@ var title_content_TitleContent = /** @class */ (function (_super) {
80414
81226
  };
80415
81227
  var spans = [];
80416
81228
  if (element.isRequireTextOnStart) {
80417
- spans.push(this.renderRequireText(element, cssClasses));
81229
+ spans.push(this.renderRequireText(element));
80418
81230
  spans.push(getSpaceSpan("req-sp"));
80419
81231
  }
80420
81232
  var questionNumber = element.no;
80421
81233
  if (questionNumber) {
80422
- var panelNumber = !!cssClasses.panel ? cssClasses.panel.number : undefined;
80423
- 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));
80424
81235
  spans.push(getSpaceSpan("num-sp"));
80425
81236
  }
80426
81237
  if (element.isRequireTextBeforeTitle) {
80427
- spans.push(this.renderRequireText(element, cssClasses));
81238
+ spans.push(this.renderRequireText(element));
80428
81239
  spans.push(getSpaceSpan("req-sp"));
80429
81240
  }
80430
81241
  spans.push(reactquestion_element_SurveyElementBase.renderLocString(element.locTitle, null, "q_title"));
80431
81242
  if (element.isRequireTextAfterTitle) {
80432
81243
  spans.push(getSpaceSpan("req-sp"));
80433
- spans.push(this.renderRequireText(element, cssClasses));
81244
+ spans.push(this.renderRequireText(element));
80434
81245
  }
80435
81246
  return spans;
80436
81247
  };
80437
- TitleContent.prototype.renderRequireText = function (element, cssClasses) {
80438
- 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));
80439
81250
  };
80440
81251
  return TitleContent;
80441
81252
  }(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component));
@@ -80611,6 +81422,56 @@ ReactElementFactory.Instance.registerElement("sv-character-counter", function (p
80611
81422
  return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(character_counter_CharacterCounterComponent, props);
80612
81423
  });
80613
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
+
80614
81475
  // CONCATENATED MODULE: ./packages/survey-react-ui/src/reactquestion_comment.tsx
80615
81476
  var reactquestion_comment_extends = (undefined && undefined.__extends) || (function () {
80616
81477
  var extendStatics = function (d, b) {
@@ -80637,31 +81498,21 @@ var reactquestion_comment_SurveyQuestionComment = /** @class */ (function (_supe
80637
81498
  function SurveyQuestionComment(props) {
80638
81499
  return _super.call(this, props) || this;
80639
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
+ };
80640
81508
  SurveyQuestionComment.prototype.renderElement = function () {
80641
- var _this = this;
80642
- var onBlur = function (e) {
80643
- if (!_this.question.isInputTextUpdate) {
80644
- _this.updateValueOnEvent(e);
80645
- }
80646
- _this.question.onBlur(e);
80647
- };
80648
- var onInput = function (event) {
80649
- if (_this.question.isInputTextUpdate) {
80650
- _this.updateValueOnEvent(event);
80651
- }
80652
- else {
80653
- _this.question.updateElement();
80654
- }
80655
- var newValue = event.target.value;
80656
- _this.question.updateRemainingCharacterCounter(newValue);
80657
- };
80658
- var placeholder = this.question.renderedPlaceholder;
80659
81509
  if (this.question.isReadOnlyRenderDiv()) {
80660
81510
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", null, this.question.value);
80661
81511
  }
80662
- 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;
80663
81514
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null,
80664
- 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 }),
80665
81516
  counter));
80666
81517
  };
80667
81518
  return SurveyQuestionComment;
@@ -80671,61 +81522,22 @@ var reactquestion_comment_SurveyQuestionCommentItem = /** @class */ (function (_
80671
81522
  reactquestion_comment_extends(SurveyQuestionCommentItem, _super);
80672
81523
  function SurveyQuestionCommentItem(props) {
80673
81524
  var _this = _super.call(this, props) || this;
80674
- _this.state = { comment: _this.getComment() || "" };
81525
+ _this.textAreaModel = _this.getTextAreaModel();
80675
81526
  return _this;
80676
81527
  }
80677
- SurveyQuestionCommentItem.prototype.componentDidUpdate = function (prevProps, prevState) {
80678
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
80679
- this.updateDomElement();
80680
- };
80681
- SurveyQuestionCommentItem.prototype.componentDidMount = function () {
80682
- _super.prototype.componentDidMount.call(this);
80683
- this.updateDomElement();
80684
- };
80685
- SurveyQuestionCommentItem.prototype.updateDomElement = function () {
80686
- if (!!this.control) {
80687
- var control = this.control;
80688
- var newValue = this.getComment() || "";
80689
- if (!helpers_Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
80690
- control.value = newValue;
80691
- }
80692
- }
80693
- };
80694
- SurveyQuestionCommentItem.prototype.setControl = function (element) {
80695
- if (!!element) {
80696
- this.control = element;
80697
- }
80698
- };
80699
81528
  SurveyQuestionCommentItem.prototype.canRender = function () {
80700
81529
  return !!this.props.question;
80701
81530
  };
80702
- SurveyQuestionCommentItem.prototype.onCommentChange = function (event) {
80703
- this.props.question.onCommentChange(event);
80704
- };
80705
- SurveyQuestionCommentItem.prototype.onCommentInput = function (event) {
80706
- this.props.question.onCommentInput(event);
80707
- };
80708
- SurveyQuestionCommentItem.prototype.getComment = function () {
80709
- return this.props.question.comment;
80710
- };
80711
- SurveyQuestionCommentItem.prototype.setComment = function (value) {
80712
- this.props.question.comment = value;
80713
- };
80714
- SurveyQuestionCommentItem.prototype.getId = function () {
80715
- return this.props.question.commentId;
80716
- };
80717
- SurveyQuestionCommentItem.prototype.getPlaceholder = function () {
80718
- return this.props.question.renderedCommentPlaceholder;
81531
+ SurveyQuestionCommentItem.prototype.getTextAreaModel = function () {
81532
+ return this.props.question.commentTextAreaModel;
80719
81533
  };
80720
81534
  SurveyQuestionCommentItem.prototype.renderElement = function () {
80721
- var _this = this;
80722
81535
  var question = this.props.question;
80723
- var className = this.props.otherCss || this.cssClasses.comment;
80724
81536
  if (question.isReadOnlyRenderDiv()) {
80725
- var comment = this.getComment() || "";
81537
+ var comment = this.textAreaModel.getTextValue() || "";
80726
81538
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", null, comment);
80727
81539
  }
80728
- 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 }));
80729
81541
  };
80730
81542
  return SurveyQuestionCommentItem;
80731
81543
  }(ReactSurveyElement));
@@ -80735,23 +81547,8 @@ var SurveyQuestionOtherValueItem = /** @class */ (function (_super) {
80735
81547
  function SurveyQuestionOtherValueItem() {
80736
81548
  return _super !== null && _super.apply(this, arguments) || this;
80737
81549
  }
80738
- SurveyQuestionOtherValueItem.prototype.onCommentChange = function (event) {
80739
- this.props.question.onOtherValueChange(event);
80740
- };
80741
- SurveyQuestionOtherValueItem.prototype.onCommentInput = function (event) {
80742
- this.props.question.onOtherValueInput(event);
80743
- };
80744
- SurveyQuestionOtherValueItem.prototype.getComment = function () {
80745
- return this.props.question.otherValue;
80746
- };
80747
- SurveyQuestionOtherValueItem.prototype.setComment = function (value) {
80748
- this.props.question.otherValue = value;
80749
- };
80750
- SurveyQuestionOtherValueItem.prototype.getId = function () {
80751
- return this.props.question.otherId;
80752
- };
80753
- SurveyQuestionOtherValueItem.prototype.getPlaceholder = function () {
80754
- return this.props.question.otherPlaceholder;
81550
+ SurveyQuestionOtherValueItem.prototype.getTextAreaModel = function () {
81551
+ return this.props.question.otherTextAreaModel;
80755
81552
  };
80756
81553
  return SurveyQuestionOtherValueItem;
80757
81554
  }(reactquestion_comment_SurveyQuestionCommentItem));
@@ -82367,7 +83164,7 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
82367
83164
  var _this = this;
82368
83165
  if (this.question.hasHeadItems) {
82369
83166
  return this.question.headItems.map(function (item, ii) {
82370
- return _this.renderItem("item_h" + ii, item, false, _this.question.cssClasses);
83167
+ return _this.renderItem(item, false, _this.question.cssClasses);
82371
83168
  });
82372
83169
  }
82373
83170
  };
@@ -82375,7 +83172,7 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
82375
83172
  var _this = this;
82376
83173
  if (this.question.hasFootItems) {
82377
83174
  return this.question.footItems.map(function (item, ii) {
82378
- return _this.renderItem("item_f" + ii, item, false, _this.question.cssClasses);
83175
+ return _this.renderItem(item, false, _this.question.cssClasses);
82379
83176
  });
82380
83177
  }
82381
83178
  };
@@ -82386,7 +83183,7 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
82386
83183
  var _this = this;
82387
83184
  return this.question.columns.map(function (column, ci) {
82388
83185
  var items = column.map(function (item, ii) {
82389
- return _this.renderItem("item" + ii, item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
83186
+ return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
82390
83187
  });
82391
83188
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
82392
83189
  });
@@ -82402,8 +83199,8 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
82402
83199
  var renderedItems = [];
82403
83200
  for (var i = 0; i < choices.length; i++) {
82404
83201
  var item = choices[i];
82405
- var key = "item" + i;
82406
- var renderedItem = this.renderItem(key, item, i == 0, cssClasses, "" + i);
83202
+ var key = "item" + item.value;
83203
+ var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
82407
83204
  if (!!renderedItem) {
82408
83205
  renderedItems.push(renderedItem);
82409
83206
  }
@@ -82422,9 +83219,9 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
82422
83219
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
82423
83220
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
82424
83221
  };
82425
- SurveyQuestionCheckbox.prototype.renderItem = function (key, item, isFirst, cssClasses, index) {
83222
+ SurveyQuestionCheckbox.prototype.renderItem = function (item, isFirst, cssClasses, index) {
82426
83223
  var renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
82427
- key: key,
83224
+ key: item.value,
82428
83225
  question: this.question,
82429
83226
  cssClasses: cssClasses,
82430
83227
  isDisplayMode: this.isDisplayMode,
@@ -82450,6 +83247,7 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
82450
83247
  _this.handleOnChange = function (event) {
82451
83248
  _this.question.clickItemHandler(_this.item, event.target.checked);
82452
83249
  };
83250
+ _this.rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"]();
82453
83251
  return _this;
82454
83252
  }
82455
83253
  SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
@@ -82497,11 +83295,20 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
82497
83295
  enumerable: false,
82498
83296
  configurable: true
82499
83297
  });
83298
+ SurveyQuestionCheckboxItem.prototype.componentDidUpdate = function (prevProps, prevState) {
83299
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
83300
+ if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
83301
+ if (this.props.item) {
83302
+ this.props.item.setRootElement(this.rootRef.current);
83303
+ }
83304
+ if (prevProps.item) {
83305
+ prevProps.item.setRootElement(undefined);
83306
+ }
83307
+ }
83308
+ };
82500
83309
  SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
82501
83310
  if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
82502
83311
  return false;
82503
- if (!this.question)
82504
- return false;
82505
83312
  return (!this.question.customWidget ||
82506
83313
  !!this.question.customWidgetData.isNeedRender ||
82507
83314
  !!this.question.customWidget.widgetJson.isDefaultRender ||
@@ -82526,7 +83333,7 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
82526
83333
  var itemClass = this.question.getItemClass(this.item);
82527
83334
  var labelClass = this.question.getLabelClass(this.item);
82528
83335
  var itemLabel = !this.hideCaption ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
82529
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation" },
83336
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation", ref: this.rootRef },
82530
83337
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("label", { className: labelClass },
82531
83338
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError() }),
82532
83339
  this.cssClasses.materialDecorator ?
@@ -82538,6 +83345,18 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
82538
83345
  itemLabel),
82539
83346
  otherItem));
82540
83347
  };
83348
+ SurveyQuestionCheckboxItem.prototype.componentDidMount = function () {
83349
+ _super.prototype.componentDidMount.call(this);
83350
+ if (!this.question.isDesignMode) {
83351
+ this.item.setRootElement(this.rootRef.current);
83352
+ }
83353
+ };
83354
+ SurveyQuestionCheckboxItem.prototype.componentWillUnmount = function () {
83355
+ _super.prototype.componentWillUnmount.call(this);
83356
+ if (!this.question.isDesignMode) {
83357
+ this.item.setRootElement(undefined);
83358
+ }
83359
+ };
82541
83360
  return SurveyQuestionCheckboxItem;
82542
83361
  }(ReactSurveyElement));
82543
83362
 
@@ -83062,10 +83881,10 @@ var tagbox_filter_TagboxFilterString = /** @class */ (function (_super) {
83062
83881
  this.model.inputKeyHandler(e);
83063
83882
  };
83064
83883
  TagboxFilterString.prototype.onBlur = function (e) {
83065
- this.model.onBlur(e);
83884
+ this.question.onBlur(e);
83066
83885
  };
83067
83886
  TagboxFilterString.prototype.onFocus = function (e) {
83068
- this.model.onFocus(e);
83887
+ this.question.onFocus(e);
83069
83888
  };
83070
83889
  TagboxFilterString.prototype.getStateElement = function () {
83071
83890
  return this.model;
@@ -84280,7 +85099,7 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
84280
85099
  var _this = this;
84281
85100
  if (this.question.hasFootItems) {
84282
85101
  return this.question.footItems.map(function (item, ii) {
84283
- return _this.renderItem("item_f" + ii, item, false, _this.question.cssClasses);
85102
+ return _this.renderItem(item, false, _this.question.cssClasses);
84284
85103
  });
84285
85104
  }
84286
85105
  };
@@ -84292,7 +85111,7 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
84292
85111
  var value = this.getStateValue();
84293
85112
  return this.question.columns.map(function (column, ci) {
84294
85113
  var items = column.map(function (item, ii) {
84295
- return _this.renderItem("item" + ci + ii, item, value, cssClasses, "" + ci + ii);
85114
+ return _this.renderItem(item, value, cssClasses, "" + ci + ii);
84296
85115
  });
84297
85116
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
84298
85117
  });
@@ -84309,7 +85128,7 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
84309
85128
  var value = this.getStateValue();
84310
85129
  for (var i = 0; i < choices.length; i++) {
84311
85130
  var item = choices[i];
84312
- var renderedItem = this.renderItem("item" + i, item, value, cssClasses, "" + i);
85131
+ var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
84313
85132
  items.push(renderedItem);
84314
85133
  }
84315
85134
  return items;
@@ -84325,9 +85144,9 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
84325
85144
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
84326
85145
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
84327
85146
  };
84328
- SurveyQuestionRadiogroup.prototype.renderItem = function (key, item, value, cssClasses, index) {
85147
+ SurveyQuestionRadiogroup.prototype.renderItem = function (item, value, cssClasses, index) {
84329
85148
  var renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
84330
- key: key,
85149
+ key: item.value,
84331
85150
  question: this.question,
84332
85151
  cssClasses: cssClasses,
84333
85152
  isDisplayMode: this.isDisplayMode,
@@ -84353,6 +85172,7 @@ var reactquestion_radiogroup_SurveyQuestionRadioItem = /** @class */ (function (
84353
85172
  reactquestion_radiogroup_extends(SurveyQuestionRadioItem, _super);
84354
85173
  function SurveyQuestionRadioItem(props) {
84355
85174
  var _this = _super.call(this, props) || this;
85175
+ _this.rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"]();
84356
85176
  _this.handleOnChange = _this.handleOnChange.bind(_this);
84357
85177
  _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
84358
85178
  return _this;
@@ -84421,12 +85241,23 @@ var reactquestion_radiogroup_SurveyQuestionRadioItem = /** @class */ (function (
84421
85241
  SurveyQuestionRadioItem.prototype.canRender = function () {
84422
85242
  return !!this.question && !!this.item;
84423
85243
  };
85244
+ SurveyQuestionRadioItem.prototype.componentDidUpdate = function (prevProps, prevState) {
85245
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
85246
+ if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
85247
+ if (this.props.item) {
85248
+ this.props.item.setRootElement(this.rootRef.current);
85249
+ }
85250
+ if (prevProps.item) {
85251
+ prevProps.item.setRootElement(undefined);
85252
+ }
85253
+ }
85254
+ };
84424
85255
  SurveyQuestionRadioItem.prototype.renderElement = function () {
84425
85256
  var itemClass = this.question.getItemClass(this.item);
84426
85257
  var labelClass = this.question.getLabelClass(this.item);
84427
85258
  var controlLabelClass = this.question.getControlLabelClass(this.item);
84428
85259
  var itemLabel = !this.hideCaption ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
84429
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation" },
85260
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation", ref: this.rootRef },
84430
85261
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
84431
85262
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange }),
84432
85263
  this.cssClasses.materialDecorator ?
@@ -84437,6 +85268,18 @@ var reactquestion_radiogroup_SurveyQuestionRadioItem = /** @class */ (function (
84437
85268
  null,
84438
85269
  itemLabel)));
84439
85270
  };
85271
+ SurveyQuestionRadioItem.prototype.componentDidMount = function () {
85272
+ _super.prototype.componentDidMount.call(this);
85273
+ if (!this.question.isDesignMode) {
85274
+ this.item.setRootElement(this.rootRef.current);
85275
+ }
85276
+ };
85277
+ SurveyQuestionRadioItem.prototype.componentWillUnmount = function () {
85278
+ _super.prototype.componentWillUnmount.call(this);
85279
+ if (!this.question.isDesignMode) {
85280
+ this.item.setRootElement(undefined);
85281
+ }
85282
+ };
84440
85283
  return SurveyQuestionRadioItem;
84441
85284
  }(ReactSurveyElement));
84442
85285
 
@@ -84894,6 +85737,9 @@ var drag_drop_icon_SurveyQuestionMatrixDynamicDragDropIcon = /** @class */ (func
84894
85737
  configurable: true
84895
85738
  });
84896
85739
  SurveyQuestionMatrixDynamicDragDropIcon.prototype.renderElement = function () {
85740
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", null, this.renderIcon());
85741
+ };
85742
+ SurveyQuestionMatrixDynamicDragDropIcon.prototype.renderIcon = function () {
84897
85743
  if (this.question.iconDragElement) {
84898
85744
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("svg", { className: this.question.cssClasses.dragElementDecorator },
84899
85745
  external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("use", { xlinkHref: this.question.iconDragElement })));
@@ -85524,7 +86370,7 @@ var paneldynamic_add_btn_SurveyQuestionPanelDynamicAddButton = /** @class */ (fu
85524
86370
  if (!this.question.canAddPanel)
85525
86371
  return null;
85526
86372
  var btnText = this.renderLocString(this.question.locPanelAddText);
85527
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { type: "button", className: this.question.getAddButtonCss(), onClick: this.handleClick },
86373
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
85528
86374
  external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
85529
86375
  };
85530
86376
  return SurveyQuestionPanelDynamicAddButton;