survey-react 1.9.106 → 1.9.108

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.9.106
2
+ * surveyjs - Survey JavaScript library v1.9.108
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -734,6 +734,9 @@ function createDropdownActionModel(actionOptions, dropdownOptions, locOwner) {
734
734
  }
735
735
  function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOptions, locOwner) {
736
736
  var listModel = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](listOptions.items, function (item) {
737
+ if (newAction.hasTitle) {
738
+ newAction.title = item.title;
739
+ }
737
740
  listOptions.onSelectionChanged(item);
738
741
  innerPopupModel.toggleVisibility();
739
742
  }, listOptions.allowSelection, listOptions.selectedItem, listOptions.onFilterStringChangedCallback);
@@ -968,7 +971,9 @@ var Action = /** @class */ (function (_super) {
968
971
  //Object.assign(this, item) to support IE11
969
972
  if (!!innerItem) {
970
973
  for (var key in innerItem) {
971
- _this[key] = innerItem[key];
974
+ if (key !== "locTitle") {
975
+ _this[key] = innerItem[key];
976
+ }
972
977
  }
973
978
  }
974
979
  if (!!_this.locTitleName) {
@@ -1901,12 +1906,13 @@ var Base = /** @class */ (function () {
1901
1906
  return {};
1902
1907
  };
1903
1908
  Base.prototype.dispose = function () {
1909
+ var _this = this;
1904
1910
  for (var i = 0; i < this.eventList.length; i++) {
1905
1911
  this.eventList[i].clear();
1906
1912
  }
1907
1913
  this.onPropertyValueChangedCallback = undefined;
1908
1914
  this.isDisposedValue = true;
1909
- Object.values(this.dependencies).forEach(function (dependencies) { return dependencies.dispose(); });
1915
+ Object.keys(this.dependencies).forEach(function (key) { return _this.dependencies[key].dispose(); });
1910
1916
  };
1911
1917
  Object.defineProperty(Base.prototype, "isDisposed", {
1912
1918
  get: function () {
@@ -5402,6 +5408,7 @@ var defaultV2Css = {
5402
5408
  },
5403
5409
  checkbox: {
5404
5410
  root: "sd-selectbase",
5411
+ rootMobile: "sd-selectbase--mobile",
5405
5412
  rootRow: "sd-selectbase--row",
5406
5413
  rootMultiColumn: "sd-selectbase--multi-column",
5407
5414
  item: "sd-item sd-checkbox sd-selectbase__item",
@@ -5424,6 +5431,7 @@ var defaultV2Css = {
5424
5431
  },
5425
5432
  radiogroup: {
5426
5433
  root: "sd-selectbase",
5434
+ rootMobile: "sd-selectbase--mobile",
5427
5435
  rootRow: "sd-selectbase--row",
5428
5436
  rootMultiColumn: "sd-selectbase--multi-column",
5429
5437
  item: "sd-item sd-radio sd-selectbase__item",
@@ -5479,7 +5487,7 @@ var defaultV2Css = {
5479
5487
  checkboxItemIndeterminate: "sd-checkbox--intermediate",
5480
5488
  checkboxItemChecked: "sd-item--checked sd-checkbox--checked",
5481
5489
  checkboxItemDecorator: "sd-item__svg sd-checkbox__svg",
5482
- checkboxItemDisabled: "sd-checkbox--disabled",
5490
+ checkboxItemDisabled: "sd-item--disabled sd-checkbox--disabled",
5483
5491
  controlCheckbox: "sd-visuallyhidden sd-item__control sd-checkbox__control",
5484
5492
  checkboxMaterialDecorator: "sd-item__decorator sd-checkbox__decorator",
5485
5493
  checkboxControlLabel: "sd-item__control-label",
@@ -5495,8 +5503,11 @@ var defaultV2Css = {
5495
5503
  },
5496
5504
  multipletext: {
5497
5505
  root: "sd-multipletext",
5506
+ rootMobile: "sd-multipletext--mobile",
5498
5507
  itemLabel: "sd-multipletext__item-container sd-input",
5499
5508
  itemLabelOnError: "sd-multipletext__item-container--error",
5509
+ itemLabelAllowFocus: "sd-multipletext__item-container--allow-focus",
5510
+ itemLabelAnswered: "sd-multipletext__item-container--answered",
5500
5511
  item: "sd-multipletext__item",
5501
5512
  itemTitle: "sd-multipletext__item-title",
5502
5513
  content: "sd-multipletext__content sd-question__content",
@@ -5720,6 +5731,7 @@ var defaultV2Css = {
5720
5731
  expression: "sd-expression",
5721
5732
  file: {
5722
5733
  root: "sd-file",
5734
+ rootDragging: "sd-file--dragging",
5723
5735
  other: "sd-input sd-comment",
5724
5736
  placeholderInput: "sd-visuallyhidden",
5725
5737
  preview: "sd-file__preview",
@@ -6779,9 +6791,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
6779
6791
  _this.currentY = pointerMoveEvent.pageY;
6780
6792
  if (_this.isMicroMovement)
6781
6793
  return;
6782
- document.body.style.setProperty("touch-action", "");
6783
- document.body.style.setProperty("user-select", "");
6784
- document.body.style.setProperty("-webkit-user-select", "");
6794
+ _this.returnUserSelectBack();
6785
6795
  _this.stopLongTap();
6786
6796
  };
6787
6797
  this.stopLongTap = function (e) {
@@ -6829,9 +6839,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
6829
6839
  }
6830
6840
  _this.savedTargetNode = null;
6831
6841
  _this.savedTargetNodeParent = null;
6832
- document.body.style.setProperty("touch-action", "");
6833
- document.body.style.setProperty("user-select", "");
6834
- document.body.style.setProperty("-webkit-user-select", "");
6842
+ _this.returnUserSelectBack();
6835
6843
  };
6836
6844
  this.drop = function () {
6837
6845
  _this.dd.drop();
@@ -6868,8 +6876,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
6868
6876
  this.startX = event.pageX;
6869
6877
  this.startY = event.pageY;
6870
6878
  document.body.style.setProperty("touch-action", "none", "important");
6871
- document.body.style.setProperty("user-select", "none", "important");
6872
- document.body.style.setProperty("-webkit-user-select", "none", "important");
6879
+ document.body.style.setProperty("-webkit-touch-callout", "none", "important");
6873
6880
  this.timeoutID = setTimeout(function () {
6874
6881
  _this.doStartDrag(event, draggedElement, parentElement, draggedElementNode);
6875
6882
  if (!preventSaveTargetNode) {
@@ -6958,9 +6965,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
6958
6965
  var _this = this;
6959
6966
  cancelAnimationFrame(this.scrollIntervalId);
6960
6967
  var startScrollBoundary = 100;
6961
- this.draggedElementShortcut.hidden = true;
6968
+ var displayProp = this.draggedElementShortcut.style.display;
6969
+ //this.draggedElementShortcut.hidden = true;
6970
+ this.draggedElementShortcut.style.display = "none";
6962
6971
  var dragOverNode = document.elementFromPoint(clientX, clientY);
6963
- this.draggedElementShortcut.hidden = false;
6972
+ //this.draggedElementShortcut.hidden = false;
6973
+ this.draggedElementShortcut.style.display = displayProp || "block";
6964
6974
  var scrollableParentNode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["findScrollableParent"])(dragOverNode);
6965
6975
  var top;
6966
6976
  var bottom;
@@ -7015,8 +7025,16 @@ var DragDropDOMAdapter = /** @class */ (function () {
7015
7025
  this.draggedElementShortcut.addEventListener("contextmenu", this.onContextMenu);
7016
7026
  }
7017
7027
  };
7028
+ DragDropDOMAdapter.prototype.returnUserSelectBack = function () {
7029
+ document.body.style.setProperty("touch-action", "auto");
7030
+ document.body.style.setProperty("user-select", "auto");
7031
+ document.body.style.setProperty("-webkit-user-select", "auto");
7032
+ document.body.style.setProperty("-webkit-touch-callout", "default");
7033
+ };
7018
7034
  DragDropDOMAdapter.prototype.startDrag = function (event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode) {
7019
7035
  if (preventSaveTargetNode === void 0) { preventSaveTargetNode = false; }
7036
+ document.body.style.setProperty("user-select", "none", "important");
7037
+ document.body.style.setProperty("-webkit-user-select", "none", "important");
7020
7038
  if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
7021
7039
  this.startLongTapProcessing(event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode);
7022
7040
  return;
@@ -9210,8 +9228,8 @@ __webpack_require__.r(__webpack_exports__);
9210
9228
  //import "../../modern.scss";
9211
9229
  var Version;
9212
9230
  var ReleaseDate;
9213
- Version = "" + "1.9.106";
9214
- ReleaseDate = "" + "2023-09-06";
9231
+ Version = "" + "1.9.108";
9232
+ ReleaseDate = "" + "2023-09-19";
9215
9233
  function checkLibraryVersion(ver, libraryName) {
9216
9234
  if (Version != ver) {
9217
9235
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -10295,7 +10313,7 @@ var defaultBootstrapMaterialCss = _plugins_themes_bootstrapmaterial_cssbootstrap
10295
10313
  /*!***************************************!*\
10296
10314
  !*** ./src/entries/react-ui-model.ts ***!
10297
10315
  \***************************************/
10298
- /*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, 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, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor */
10316
+ /*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, 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, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent */
10299
10317
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10300
10318
 
10301
10319
  "use strict";
@@ -10553,6 +10571,9 @@ __webpack_require__.r(__webpack_exports__);
10553
10571
  /* harmony import */ var _react_string_editor__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../react/string-editor */ "./src/react/string-editor.tsx");
10554
10572
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringEditor", function() { return _react_string_editor__WEBPACK_IMPORTED_MODULE_74__["SurveyLocStringEditor"]; });
10555
10573
 
10574
+ /* harmony import */ var _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../react/components/loading-indicator */ "./src/react/components/loading-indicator.tsx");
10575
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_75__["LoadingIndicatorComponent"]; });
10576
+
10556
10577
  // react
10557
10578
 
10558
10579
 
@@ -10627,6 +10648,7 @@ __webpack_require__.r(__webpack_exports__);
10627
10648
 
10628
10649
 
10629
10650
 
10651
+
10630
10652
 
10631
10653
 
10632
10654
  //Uncomment to include the "date" question type.
@@ -10639,7 +10661,7 @@ __webpack_require__.r(__webpack_exports__);
10639
10661
  /*!******************************!*\
10640
10662
  !*** ./src/entries/react.ts ***!
10641
10663
  \******************************/
10642
- /*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, 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, 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, tryNavigateToPage, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, 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, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, 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, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor */
10664
+ /*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, 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, 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, tryNavigateToPage, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, 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, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, 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, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent */
10643
10665
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10644
10666
 
10645
10667
  "use strict";
@@ -11264,6 +11286,8 @@ __webpack_require__.r(__webpack_exports__);
11264
11286
 
11265
11287
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringEditor", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyLocStringEditor"]; });
11266
11288
 
11289
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["LoadingIndicatorComponent"]; });
11290
+
11267
11291
 
11268
11292
  // themes settings
11269
11293
 
@@ -15083,7 +15107,7 @@ var Const = /** @class */ (function (_super) {
15083
15107
  if (OperandMaker.isNumeric(value)) {
15084
15108
  if (value.indexOf("0x") == 0)
15085
15109
  return parseInt(value);
15086
- if (value.length > 1 && value[0] == "0")
15110
+ if (value.length > 1 && value[0] == "0" && (value.length < 2 || (value[1] !== "." && value[1] !== ",")))
15087
15111
  return value;
15088
15112
  return parseFloat(value);
15089
15113
  }
@@ -16048,6 +16072,32 @@ function weekday(params) {
16048
16072
  return date.getDay();
16049
16073
  }
16050
16074
  FunctionFactory.Instance.register("weekday", weekday);
16075
+ function getQuestionValueByContext(context, name) {
16076
+ if (!context || !name)
16077
+ return undefined;
16078
+ var keys = ["row", "panel", "survey"];
16079
+ for (var i = 0; i < keys.length; i++) {
16080
+ var ctx = context[keys[i]];
16081
+ if (ctx && ctx.getQuestionByName) {
16082
+ var res = ctx.getQuestionByName(name);
16083
+ if (res)
16084
+ return res;
16085
+ }
16086
+ }
16087
+ return null;
16088
+ }
16089
+ function displayValue(params) {
16090
+ var q = getQuestionValueByContext(this, params[0]);
16091
+ return q ? q.displayValue : "";
16092
+ }
16093
+ FunctionFactory.Instance.register("displayValue", displayValue);
16094
+ function propertyValue(params) {
16095
+ if (params.length !== 2 || !params[0] || !params[1])
16096
+ return undefined;
16097
+ var q = getQuestionValueByContext(this, params[0]);
16098
+ return q ? q[params[1]] : undefined;
16099
+ }
16100
+ FunctionFactory.Instance.register("propertyValue", propertyValue);
16051
16101
 
16052
16102
 
16053
16103
  /***/ }),
@@ -16424,6 +16474,8 @@ var Helpers = /** @class */ (function () {
16424
16474
  }
16425
16475
  return a + b;
16426
16476
  }
16477
+ if (typeof a === "string" || typeof b === "string")
16478
+ return a + b;
16427
16479
  return Helpers.correctAfterPlusMinis(a, b, a + b);
16428
16480
  };
16429
16481
  Helpers.correctAfterMultiple = function (a, b, res) {
@@ -16546,6 +16598,7 @@ var map = {
16546
16598
  "./clear_16x16.svg": "./src/images/clear_16x16.svg",
16547
16599
  "./collapseDetail.svg": "./src/images/collapseDetail.svg",
16548
16600
  "./expandDetail.svg": "./src/images/expandDetail.svg",
16601
+ "./loading.svg": "./src/images/loading.svg",
16549
16602
  "./no-image.svg": "./src/images/no-image.svg",
16550
16603
  "./rating-star-2.svg": "./src/images/rating-star-2.svg",
16551
16604
  "./rating-star-small-2.svg": "./src/images/rating-star-small-2.svg",
@@ -16906,6 +16959,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
16906
16959
 
16907
16960
  /***/ }),
16908
16961
 
16962
+ /***/ "./src/images/loading.svg":
16963
+ /*!********************************!*\
16964
+ !*** ./src/images/loading.svg ***!
16965
+ \********************************/
16966
+ /*! no static exports found */
16967
+ /***/ (function(module, exports) {
16968
+
16969
+ module.exports = "<svg viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_885_24957)\"><path opacity=\"0.1\" d=\"M24 40C15.18 40 8 32.82 8 24C8 15.18 15.18 8 24 8C32.82 8 40 15.18 40 24C40 32.82 32.82 40 24 40ZM24 12C17.38 12 12 17.38 12 24C12 30.62 17.38 36 24 36C30.62 36 36 30.62 36 24C36 17.38 30.62 12 24 12Z\" fill=\"black\" fill-opacity=\"0.91\"></path><path d=\"M10 26C8.9 26 8 25.1 8 24C8 15.18 15.18 8 24 8C25.1 8 26 8.9 26 10C26 11.1 25.1 12 24 12C17.38 12 12 17.38 12 24C12 25.1 11.1 26 10 26Z\" fill=\"#19B394\"></path></g><defs><clipPath id=\"clip0_885_24957\"><rect width=\"32\" height=\"32\" fill=\"white\" transform=\"translate(8 8)\"></rect></clipPath></defs></svg>"
16970
+
16971
+ /***/ }),
16972
+
16909
16973
  /***/ "./src/images/no-image.svg":
16910
16974
  /*!*********************************!*\
16911
16975
  !*** ./src/images/no-image.svg ***!
@@ -27625,6 +27689,13 @@ var PageModel = /** @class */ (function (_super) {
27625
27689
  this.locNavigationTitle.strChanged();
27626
27690
  this.locNavigationDescription.strChanged();
27627
27691
  };
27692
+ Object.defineProperty(PageModel.prototype, "renderedNavigationTitle", {
27693
+ get: function () {
27694
+ return this.locNavigationTitle.renderedHtml || this.title || this.name;
27695
+ },
27696
+ enumerable: false,
27697
+ configurable: true
27698
+ });
27628
27699
  Object.defineProperty(PageModel.prototype, "passed", {
27629
27700
  get: function () {
27630
27701
  return this.getPropertyValue("passed", false);
@@ -28242,9 +28313,10 @@ var PanelModelBase = /** @class */ (function (_super) {
28242
28313
  PanelModelBase.prototype.canShowTitle = function () { return true; };
28243
28314
  Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
28244
28315
  get: function () {
28316
+ if (!this.hasTitle && this.isDesignMode)
28317
+ return false;
28245
28318
  return this.survey && this.survey.showPageTitles && this.hasDescription ||
28246
28319
  (this.showDescription && this.isDesignMode &&
28247
- _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].designMode.showEmptyTitles &&
28248
28320
  _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].designMode.showEmptyDescriptions);
28249
28321
  },
28250
28322
  enumerable: false,
@@ -28262,6 +28334,13 @@ var PanelModelBase = /** @class */ (function (_super) {
28262
28334
  this.elements[i].locStrsChanged();
28263
28335
  }
28264
28336
  };
28337
+ Object.defineProperty(PanelModelBase.prototype, "renderedNavigationTitle", {
28338
+ get: function () {
28339
+ return this.title || this.name;
28340
+ },
28341
+ enumerable: false,
28342
+ configurable: true
28343
+ });
28265
28344
  Object.defineProperty(PanelModelBase.prototype, "requiredText", {
28266
28345
  /**
28267
28346
  * Returns a character or text string that indicates a required panel/page.
@@ -29469,10 +29548,10 @@ var PanelModelBase = /** @class */ (function (_super) {
29469
29548
  }
29470
29549
  this.runConditionCore(values, properties);
29471
29550
  };
29472
- PanelModelBase.prototype.onAnyValueChanged = function (name) {
29551
+ PanelModelBase.prototype.onAnyValueChanged = function (name, questionName) {
29473
29552
  var els = this.elements;
29474
29553
  for (var i = 0; i < els.length; i++) {
29475
- els[i].onAnyValueChanged(name);
29554
+ els[i].onAnyValueChanged(name, questionName);
29476
29555
  }
29477
29556
  };
29478
29557
  PanelModelBase.prototype.checkBindings = function (valueName, value) {
@@ -29880,20 +29959,9 @@ var PanelModel = /** @class */ (function (_super) {
29880
29959
  enumerable: false,
29881
29960
  configurable: true
29882
29961
  });
29883
- Object.defineProperty(PanelModel.prototype, "footerToolbarCss", {
29884
- get: function () {
29885
- var _a;
29886
- return this.footerToolbarCssValue || ((_a = this.cssClasses.panel) === null || _a === void 0 ? void 0 : _a.footer);
29887
- },
29888
- set: function (val) {
29889
- this.footerToolbarCssValue = val;
29890
- },
29891
- enumerable: false,
29892
- configurable: true
29893
- });
29894
29962
  PanelModel.prototype.getFooterToolbar = function () {
29895
29963
  var _this = this;
29896
- var _a;
29964
+ var _a, _b;
29897
29965
  if (!this.footerToolbarValue) {
29898
29966
  var actions = this.footerActions;
29899
29967
  if (this.hasEditButton) {
@@ -29911,9 +29979,13 @@ var PanelModel = /** @class */ (function (_super) {
29911
29979
  actions = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.getUpdatedPanelFooterActions(this, actions);
29912
29980
  }
29913
29981
  this.footerToolbarValue = this.createActionContainer(this.allowAdaptiveActions);
29914
- // if (!!this.cssClasses.panel) {
29915
- this.footerToolbarValue.containerCss = this.footerToolbarCss;
29916
- // }
29982
+ var footerCss = this.onGetFooterToolbarCssCallback ? this.onGetFooterToolbarCssCallback() : "";
29983
+ if (!footerCss) {
29984
+ footerCss = (_b = this.cssClasses.panel) === null || _b === void 0 ? void 0 : _b.footer;
29985
+ }
29986
+ if (footerCss) {
29987
+ this.footerToolbarValue.containerCss = footerCss;
29988
+ }
29917
29989
  this.footerToolbarValue.setItems(actions);
29918
29990
  }
29919
29991
  return this.footerToolbarValue;
@@ -31451,6 +31523,7 @@ __webpack_require__.r(__webpack_exports__);
31451
31523
  /* harmony import */ var _popup_view_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popup-view-model */ "./src/popup-view-model.ts");
31452
31524
  /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
31453
31525
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
31526
+ /* harmony import */ var _survey__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./survey */ "./src/survey.ts");
31454
31527
  var __extends = (undefined && undefined.__extends) || (function () {
31455
31528
  var extendStatics = function (d, b) {
31456
31529
  extendStatics = Object.setPrototypeOf ||
@@ -31477,6 +31550,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
31477
31550
 
31478
31551
 
31479
31552
 
31553
+
31480
31554
  var PopupDropdownViewModel = /** @class */ (function (_super) {
31481
31555
  __extends(PopupDropdownViewModel, _super);
31482
31556
  function PopupDropdownViewModel(model, targetElement) {
@@ -31496,7 +31570,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
31496
31570
  };
31497
31571
  _this.resizeWindowCallback = function () {
31498
31572
  if (!_this.isOverlay) {
31499
- _this.updatePosition(true, false);
31573
+ _this.updatePosition(true, _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue3");
31500
31574
  }
31501
31575
  };
31502
31576
  _this.clientY = 0;
@@ -31540,8 +31614,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
31540
31614
  this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
31541
31615
  var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.showHeader, this.model.positionMode);
31542
31616
  if (!!window) {
31543
- var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalDimensions(pos.top, height, window.innerHeight);
31544
- if (!!newVerticalDimensions) {
31617
+ var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, window.innerHeight);
31618
+ if (!!newVerticalDimensions.height) {
31545
31619
  this.height = newVerticalDimensions.height + "px";
31546
31620
  pos.top = newVerticalDimensions.top;
31547
31621
  }
@@ -31843,7 +31917,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
31843
31917
 
31844
31918
 
31845
31919
  /**
31846
- * A Model for a survey running in the Popup Window.
31920
+ * A class that renders a survey in a pop-up window.
31847
31921
  *
31848
31922
  * [View Demo](https://surveyjs.io/form-library/examples/popup-survey/ (linkStyle))
31849
31923
  */
@@ -31853,7 +31927,11 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31853
31927
  if (initialModel === void 0) { initialModel = null; }
31854
31928
  var _this = _super.call(this) || this;
31855
31929
  /**
31856
- * Set this value to negative value, for example -1, to avoid closing the popup window on completing the survey. Leave it equals to 0 (default value) to close the popup window immediately, or set it to 3, 5, 10, ... to close the popup window in 3, 5, 10 seconds.
31930
+ * Specifies how many seconds the pop-up window should remain open after users complete the survey.
31931
+ *
31932
+ * Default value: 0 (the window is closed immediately)
31933
+ *
31934
+ * Set this property to a negative value (for instance, -1) to keep the pop-up window open without a time limit.
31857
31935
  */
31858
31936
  _this.closeOnCompleteTimeout = 0;
31859
31937
  if (initialModel) {
@@ -31888,8 +31966,7 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31888
31966
  };
31889
31967
  Object.defineProperty(PopupSurveyModel.prototype, "survey", {
31890
31968
  /**
31891
- * A survey object.
31892
- * @see SurveyModel
31969
+ * A [`SurveyModel`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model) instance rendered in the pop-up window.
31893
31970
  */
31894
31971
  get: function () {
31895
31972
  return this.surveyValue;
@@ -31899,9 +31976,9 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31899
31976
  });
31900
31977
  Object.defineProperty(PopupSurveyModel.prototype, "isShowing", {
31901
31978
  /**
31902
- * Returns true if the popup window is currently showing. Set it to true to show the popup window and false to hide it.
31903
- * @see show
31904
- * @see hide
31979
+ * Indicates whether the pop-up survey appears on the page, regardless of its [expand state](#isExpanded).
31980
+ *
31981
+ * You can set this property to `true` or `false` to control visibility of the pop-up survey. Alternatively, you can use the [`show()`](#show) and [`hide()`](#hide) methods.
31905
31982
  */
31906
31983
  get: function () {
31907
31984
  return this.getPropertyValue("isShowing", false);
@@ -31913,26 +31990,30 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31913
31990
  configurable: true
31914
31991
  });
31915
31992
  /**
31916
- * Show the popup window
31993
+ * Shows the pop-up survey. The survey may appear [expanded or collapsed](#isExpanded).
31994
+ *
31995
+ * As an alternative to this method, you can set the [`isShowing`](#isShowing) property to `true`.
31917
31996
  * @see hide
31918
- * @see isShowing
31919
31997
  */
31920
31998
  PopupSurveyModel.prototype.show = function () {
31921
31999
  this.isShowing = true;
31922
32000
  };
31923
32001
  /**
31924
- * Hide the popup window
32002
+ * Hides the pop-up survey.
32003
+ *
32004
+ * As an alternative to this method, you can set the [`isShowing`](#isShowing) property to `false`.
31925
32005
  * @see show
31926
- * @see isShowing
32006
+ * @see expand
32007
+ * @see collapse
31927
32008
  */
31928
32009
  PopupSurveyModel.prototype.hide = function () {
31929
32010
  this.isShowing = false;
31930
32011
  };
31931
32012
  Object.defineProperty(PopupSurveyModel.prototype, "isExpanded", {
31932
32013
  /**
31933
- * Returns true if the popup window is expanded. Set it to true to expand the popup window or false to collapse it.
31934
- * @see expand
31935
- * @see collapse
32014
+ * Indicates whether the pop-up window is expanded or collapsed.
32015
+ *
32016
+ * You can set this property to `true` or `false` to control the expand state of the pop-up survey. Alternatively, you can use the [`expand()`](#expand) and [`collapse()`](#collapse) methods.
31936
32017
  */
31937
32018
  get: function () {
31938
32019
  return this.getPropertyValue("isExpanded", false);
@@ -31951,7 +32032,7 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31951
32032
  };
31952
32033
  Object.defineProperty(PopupSurveyModel.prototype, "title", {
31953
32034
  /**
31954
- * The popup window and survey title.
32035
+ * A title for the pop-up window. If this property is undefined, the title is taken from [`SurveyModel`](#survey)'s [`title`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title) property.
31955
32036
  */
31956
32037
  get: function () {
31957
32038
  return this.survey.title;
@@ -31970,13 +32051,19 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31970
32051
  configurable: true
31971
32052
  });
31972
32053
  /**
31973
- * Expand the popup window to show the survey.
32054
+ * Expands the pop-up window.
32055
+ *
32056
+ * As an alternative to this method, you can set the [`isExpanded`](#isExpanded) property to `true`.
32057
+ * @see collapse
31974
32058
  */
31975
32059
  PopupSurveyModel.prototype.expand = function () {
31976
32060
  this.isExpanded = true;
31977
32061
  };
31978
32062
  /**
31979
- * Collapse the popup window and show survey title only.
32063
+ * Collapses the pop-up window, leaving only the survey title visible.
32064
+ *
32065
+ * As an alternative to this method, you can set the [`isExpanded`](#isExpanded) property to `false`.
32066
+ * @see expand
31980
32067
  */
31981
32068
  PopupSurveyModel.prototype.collapse = function () {
31982
32069
  this.isExpanded = false;
@@ -31990,7 +32077,7 @@ var PopupSurveyModel = /** @class */ (function (_super) {
31990
32077
  *
31991
32078
  * Default value: `false`
31992
32079
  *
31993
- * If you allow users to close the pop-up window, make sure to implement a UI element that opens it. This element should call the [`show()`](https://surveyjs.io/form-library/documentation/api-reference/pop-up-survey-model#show) method.
32080
+ * If you allow users to close the pop-up window, make sure to implement a UI element that opens it. This element should call the [`show()`](#show) method or enable the [`isShowing`](#isShowing) property.
31994
32081
  * @see expand
31995
32082
  * @see collapse
31996
32083
  * @see hide
@@ -32870,7 +32957,15 @@ var Question = /** @class */ (function (_super) {
32870
32957
  Question.prototype.isReadOnlyRenderDiv = function () {
32871
32958
  return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].readOnly.commentRenderMode === "div";
32872
32959
  };
32873
- Question.prototype.setIsMobile = function (val) { };
32960
+ Question.prototype.allowMobileInDesignMode = function () {
32961
+ return false;
32962
+ };
32963
+ Question.prototype.updateIsMobileFromSurvey = function () {
32964
+ this.setIsMobile(this.survey._isMobile);
32965
+ };
32966
+ Question.prototype.setIsMobile = function (val) {
32967
+ this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
32968
+ };
32874
32969
  Question.prototype.createLocTitleProperty = function () {
32875
32970
  var _this = this;
32876
32971
  var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
@@ -32947,46 +33042,6 @@ var Question = /** @class */ (function (_super) {
32947
33042
  enumerable: false,
32948
33043
  configurable: true
32949
33044
  });
32950
- Object.defineProperty(Question.prototype, "ariaRequired", {
32951
- get: function () {
32952
- return this.isRequired ? "true" : "false";
32953
- },
32954
- enumerable: false,
32955
- configurable: true
32956
- });
32957
- Object.defineProperty(Question.prototype, "ariaInvalid", {
32958
- get: function () {
32959
- return this.errors.length > 0 ? "true" : "false";
32960
- },
32961
- enumerable: false,
32962
- configurable: true
32963
- });
32964
- Object.defineProperty(Question.prototype, "ariaLabelledBy", {
32965
- get: function () {
32966
- if (this.hasTitle) {
32967
- return this.ariaTitleId;
32968
- }
32969
- else {
32970
- return null;
32971
- }
32972
- },
32973
- enumerable: false,
32974
- configurable: true
32975
- });
32976
- Object.defineProperty(Question.prototype, "ariaExpanded", {
32977
- get: function () {
32978
- return null;
32979
- },
32980
- enumerable: false,
32981
- configurable: true
32982
- });
32983
- Object.defineProperty(Question.prototype, "ariaDescribedBy", {
32984
- get: function () {
32985
- return this.errors.length > 0 ? this.id + "_errors" : null;
32986
- },
32987
- enumerable: false,
32988
- configurable: true
32989
- });
32990
33045
  Question.prototype.choicesLoaded = function () { };
32991
33046
  Object.defineProperty(Question.prototype, "page", {
32992
33047
  /**
@@ -33264,6 +33319,7 @@ var Question = /** @class */ (function (_super) {
33264
33319
  if (!this.visible) {
33265
33320
  this.updateIsVisibleProp();
33266
33321
  }
33322
+ this.updateIsMobileFromSurvey();
33267
33323
  };
33268
33324
  Object.defineProperty(Question.prototype, "parent", {
33269
33325
  /**
@@ -33914,6 +33970,12 @@ var Question = /** @class */ (function (_super) {
33914
33970
  .append(this.cssClasses.invisible, !this.isDesignMode && this.areInvisibleElementsShowing && !this.visible)
33915
33971
  .toString();
33916
33972
  };
33973
+ Question.prototype.getQuestionRootCss = function () {
33974
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
33975
+ .append(this.cssClasses.root)
33976
+ .append(this.cssClasses.rootMobile, this.isMobile)
33977
+ .toString();
33978
+ };
33917
33979
  Question.prototype.updateElementCss = function (reNew) {
33918
33980
  _super.prototype.updateElementCss.call(this, reNew);
33919
33981
  if (reNew) {
@@ -34147,13 +34209,6 @@ var Question = /** @class */ (function (_super) {
34147
34209
  enumerable: false,
34148
34210
  configurable: true
34149
34211
  });
34150
- Object.defineProperty(Question.prototype, "ariaRole", {
34151
- get: function () {
34152
- return "textbox";
34153
- },
34154
- enumerable: false,
34155
- configurable: true
34156
- });
34157
34212
  Object.defineProperty(Question.prototype, "showOtherItem", {
34158
34213
  /**
34159
34214
  * Specifies whether to display the "Other" choice item. Incompatible with the `showCommentArea` property.
@@ -34744,13 +34799,15 @@ var Question = /** @class */ (function (_super) {
34744
34799
  return this.checkIfAnswerCorrect() ? 1 : 0;
34745
34800
  };
34746
34801
  Question.prototype.checkIfAnswerCorrect = function () {
34747
- var isEqual = this.isTwoValueEquals(this.value, this.correctAnswer, !_settings__WEBPACK_IMPORTED_MODULE_8__["settings"].comparator.caseSensitive, true);
34748
- var options = { result: isEqual, correctAnswer: isEqual ? 1 : 0 };
34802
+ var isEqual = _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(this.value, this.correctAnswer, this.getAnswerCorrectIgnoreOrder(), _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].comparator.caseSensitive, true);
34803
+ var correct = isEqual ? 1 : 0;
34804
+ var options = { result: isEqual, correctAnswer: correct, correctAnswers: correct, incorrectAnswers: this.quizQuestionCount - correct };
34749
34805
  if (!!this.survey) {
34750
34806
  this.survey.onCorrectQuestionAnswer(this, options);
34751
34807
  }
34752
34808
  return options.result;
34753
34809
  };
34810
+ Question.prototype.getAnswerCorrectIgnoreOrder = function () { return false; };
34754
34811
  /**
34755
34812
  * Returns `true` if a question answer matches the `correctAnswer` property value.
34756
34813
  *
@@ -35225,19 +35282,16 @@ var Question = /** @class */ (function (_super) {
35225
35282
  this.setQuestionValue(newValue);
35226
35283
  if (this.data != null && this.canSetValueToSurvey()) {
35227
35284
  newValue = this.valueForSurvey;
35228
- this.data.setValue(this.getValueName(), newValue, this.getDataLocNotification(), this.allowNotifyValueChanged);
35285
+ this.data.setValue(this.getValueName(), newValue, this.getDataLocNotification(), this.allowNotifyValueChanged, this.name);
35229
35286
  }
35230
35287
  this.isMouseDown = false;
35231
35288
  };
35232
35289
  Question.prototype.canSetValueToSurvey = function () {
35233
35290
  return true;
35234
35291
  };
35235
- Question.prototype.valueFromData = function (val) {
35236
- return val;
35237
- };
35238
- Question.prototype.valueToData = function (val) {
35239
- return val;
35240
- };
35292
+ Question.prototype.valueFromData = function (val) { return val; };
35293
+ Question.prototype.valueToData = function (val) { return val; };
35294
+ Question.prototype.convertToCorrectValue = function (val) { return val; };
35241
35295
  Question.prototype.onValueChanged = function () { };
35242
35296
  Question.prototype.onMouseDown = function () {
35243
35297
  this.isMouseDown = true;
@@ -35261,7 +35315,9 @@ var Question = /** @class */ (function (_super) {
35261
35315
  }
35262
35316
  if (!this.checkIsValueCorrect(newValue))
35263
35317
  return;
35318
+ this.isChangingViaDefaultValue = this.isValueEmpty(newValue);
35264
35319
  this.setQuestionValue(this.valueFromData(newValue));
35320
+ this.isChangingViaDefaultValue = false;
35265
35321
  this.updateDependedQuestions();
35266
35322
  this.updateIsAnswered();
35267
35323
  };
@@ -35274,6 +35330,7 @@ var Question = /** @class */ (function (_super) {
35274
35330
  };
35275
35331
  Question.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
35276
35332
  if (updateIsAnswered === void 0) { updateIsAnswered = true; }
35333
+ newValue = this.convertToCorrectValue(newValue);
35277
35334
  var isEqual = this.isTwoValueEquals(this.questionValue, newValue);
35278
35335
  if (!isEqual && !this.isChangingViaDefaultValue) {
35279
35336
  this.setValueChangedDirectly();
@@ -35326,7 +35383,7 @@ var Question = /** @class */ (function (_super) {
35326
35383
  this.errors = [];
35327
35384
  };
35328
35385
  Question.prototype.clearUnusedValues = function () { };
35329
- Question.prototype.onAnyValueChanged = function (name) { };
35386
+ Question.prototype.onAnyValueChanged = function (name, questionName) { };
35330
35387
  Question.prototype.checkBindings = function (valueName, value) {
35331
35388
  if (this.bindings.isEmpty() || !this.data)
35332
35389
  return;
@@ -35456,8 +35513,10 @@ var Question = /** @class */ (function (_super) {
35456
35513
  callback();
35457
35514
  }
35458
35515
  };
35459
- this.resizeObserver = new ResizeObserver(function () {
35460
- _this.triggerResponsiveness(false);
35516
+ this.resizeObserver = new ResizeObserver(function (entries) {
35517
+ window.requestAnimationFrame(function () {
35518
+ _this.triggerResponsiveness(false);
35519
+ });
35461
35520
  });
35462
35521
  this.onMobileChangedCallback = function () {
35463
35522
  setTimeout(function () {
@@ -35507,15 +35566,146 @@ var Question = /** @class */ (function (_super) {
35507
35566
  this.dependedQuestions[i].resetDependedQuestion();
35508
35567
  }
35509
35568
  };
35569
+ Object.defineProperty(Question.prototype, "isNewA11yStructure", {
35570
+ //a11y
35571
+ get: function () {
35572
+ return false;
35573
+ },
35574
+ enumerable: false,
35575
+ configurable: true
35576
+ });
35577
+ Object.defineProperty(Question.prototype, "ariaLabel", {
35578
+ get: function () {
35579
+ if (this.isNewA11yStructure)
35580
+ return null;
35581
+ return this.locTitle.renderedHtml;
35582
+ },
35583
+ enumerable: false,
35584
+ configurable: true
35585
+ });
35586
+ Object.defineProperty(Question.prototype, "ariaRole", {
35587
+ get: function () {
35588
+ if (this.isNewA11yStructure)
35589
+ return null;
35590
+ return "textbox";
35591
+ },
35592
+ enumerable: false,
35593
+ configurable: true
35594
+ });
35595
+ Object.defineProperty(Question.prototype, "ariaRequired", {
35596
+ get: function () {
35597
+ if (this.isNewA11yStructure)
35598
+ return null;
35599
+ return this.isRequired ? "true" : "false";
35600
+ },
35601
+ enumerable: false,
35602
+ configurable: true
35603
+ });
35604
+ Object.defineProperty(Question.prototype, "ariaInvalid", {
35605
+ get: function () {
35606
+ if (this.isNewA11yStructure)
35607
+ return null;
35608
+ return this.errors.length > 0 ? "true" : "false";
35609
+ },
35610
+ enumerable: false,
35611
+ configurable: true
35612
+ });
35613
+ Object.defineProperty(Question.prototype, "ariaLabelledBy", {
35614
+ get: function () {
35615
+ if (this.isNewA11yStructure)
35616
+ return null;
35617
+ if (this.hasTitle) {
35618
+ return this.ariaTitleId;
35619
+ }
35620
+ else {
35621
+ return null;
35622
+ }
35623
+ },
35624
+ enumerable: false,
35625
+ configurable: true
35626
+ });
35627
+ Object.defineProperty(Question.prototype, "ariaExpanded", {
35628
+ get: function () {
35629
+ return null;
35630
+ },
35631
+ enumerable: false,
35632
+ configurable: true
35633
+ });
35634
+ Object.defineProperty(Question.prototype, "ariaDescribedBy", {
35635
+ get: function () {
35636
+ if (this.isNewA11yStructure)
35637
+ return null;
35638
+ return this.errors.length > 0 ? this.id + "_errors" : null;
35639
+ },
35640
+ enumerable: false,
35641
+ configurable: true
35642
+ });
35643
+ Object.defineProperty(Question.prototype, "a11y_input_ariaRole", {
35644
+ //EO a11y
35645
+ //new a11y
35646
+ get: function () {
35647
+ return null;
35648
+ },
35649
+ enumerable: false,
35650
+ configurable: true
35651
+ });
35652
+ Object.defineProperty(Question.prototype, "a11y_input_ariaRequired", {
35653
+ get: function () {
35654
+ return this.isRequired ? "true" : "false";
35655
+ },
35656
+ enumerable: false,
35657
+ configurable: true
35658
+ });
35659
+ Object.defineProperty(Question.prototype, "a11y_input_ariaInvalid", {
35660
+ get: function () {
35661
+ return this.errors.length > 0 ? "true" : "false";
35662
+ },
35663
+ enumerable: false,
35664
+ configurable: true
35665
+ });
35666
+ Object.defineProperty(Question.prototype, "a11y_input_ariaLabel", {
35667
+ get: function () {
35668
+ if (this.hasTitle && !this.parentQuestion) {
35669
+ return null;
35670
+ }
35671
+ else {
35672
+ return this.locTitle.renderedHtml;
35673
+ }
35674
+ },
35675
+ enumerable: false,
35676
+ configurable: true
35677
+ });
35678
+ Object.defineProperty(Question.prototype, "a11y_input_ariaLabelledBy", {
35679
+ get: function () {
35680
+ if (this.hasTitle && !this.parentQuestion) {
35681
+ return this.ariaTitleId;
35682
+ }
35683
+ else {
35684
+ return null;
35685
+ }
35686
+ },
35687
+ enumerable: false,
35688
+ configurable: true
35689
+ });
35690
+ Object.defineProperty(Question.prototype, "a11y_input_ariaDescribedBy", {
35691
+ get: function () {
35692
+ return this.errors.length > 0 ? this.id + "_errors" : null;
35693
+ },
35694
+ enumerable: false,
35695
+ configurable: true
35696
+ });
35510
35697
  Question.TextPreprocessorValuesMap = {
35511
35698
  title: "processedTitle",
35512
35699
  require: "requiredText",
35513
35700
  };
35514
35701
  Question.questionCounter = 100;
35515
35702
  __decorate([
35516
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false, onSet: function (val, target) {
35517
- target.setIsMobile(val);
35518
- } })
35703
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
35704
+ defaultValue: false,
35705
+ onSet: function (val, target) {
35706
+ target.renderMinWidth = !val;
35707
+ }
35708
+ })
35519
35709
  ], Question.prototype, "isMobile", void 0);
35520
35710
  __decorate([
35521
35711
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
@@ -36045,6 +36235,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
36045
36235
  _super.prototype.localeChanged.call(this);
36046
36236
  if (this.choicesOrder !== "none") {
36047
36237
  this.updateVisibleChoices();
36238
+ this.onVisibleChoicesChanged();
36048
36239
  }
36049
36240
  };
36050
36241
  QuestionSelectBase.prototype.locStrsChanged = function () {
@@ -37122,7 +37313,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37122
37313
  res.push(this.copyChoiceItem(choices[i]));
37123
37314
  }
37124
37315
  }
37125
- if (this.choicesFromQuestionMode === "selected" && question.isOtherSelected && !!question.comment) {
37316
+ if (this.choicesFromQuestionMode === "selected" && !this.showOtherItem && question.isOtherSelected && !!question.comment) {
37126
37317
  res.push(this.createItemValue(question.otherItem.value, question.comment));
37127
37318
  }
37128
37319
  return res;
@@ -37211,12 +37402,13 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37211
37402
  this.onVisibleChoicesChanged();
37212
37403
  _super.prototype.onSurveyLoad.call(this);
37213
37404
  };
37214
- QuestionSelectBase.prototype.onAnyValueChanged = function (name) {
37215
- _super.prototype.onAnyValueChanged.call(this, name);
37405
+ QuestionSelectBase.prototype.onAnyValueChanged = function (name, questionName) {
37406
+ _super.prototype.onAnyValueChanged.call(this, name, questionName);
37216
37407
  if (name != this.getValueName()) {
37217
37408
  this.runChoicesByUrl();
37218
37409
  }
37219
- if (!!name && name == this.choicesFromQuestion) {
37410
+ var chQuestion = this.choicesFromQuestion;
37411
+ if (!!name && chQuestion && (name === chQuestion || questionName === chQuestion)) {
37220
37412
  this.onVisibleChoicesChanged();
37221
37413
  }
37222
37414
  };
@@ -37712,10 +37904,13 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37712
37904
  });
37713
37905
  QuestionSelectBase.prototype.getSelectBaseRootCss = function () {
37714
37906
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
37715
- .append(this.cssClasses.root)
37907
+ .append(this.getQuestionRootCss())
37716
37908
  .append(this.cssClasses.rootRow, this.rowLayout)
37717
37909
  .toString();
37718
37910
  };
37911
+ QuestionSelectBase.prototype.allowMobileInDesignMode = function () {
37912
+ return true;
37913
+ };
37719
37914
  QuestionSelectBase.prototype.getAriaItemLabel = function (item) {
37720
37915
  return item.locText.renderedHtml;
37721
37916
  };
@@ -38697,13 +38892,6 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
38697
38892
  QuestionCheckboxModel.prototype.getDefaultItemComponent = function () {
38698
38893
  return "survey-checkbox-item";
38699
38894
  };
38700
- Object.defineProperty(QuestionCheckboxModel.prototype, "ariaRole", {
38701
- get: function () {
38702
- return "listbox";
38703
- },
38704
- enumerable: false,
38705
- configurable: true
38706
- });
38707
38895
  QuestionCheckboxModel.prototype.getType = function () {
38708
38896
  return "checkbox";
38709
38897
  };
@@ -38953,6 +39141,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
38953
39141
  return this.selectedChoices;
38954
39142
  };
38955
39143
  QuestionCheckboxModel.prototype.validateItemValues = function (itemValues) {
39144
+ var _this = this;
38956
39145
  if (!!itemValues.length)
38957
39146
  return itemValues;
38958
39147
  var selectedItemValues = this.selectedItemValues;
@@ -38961,8 +39150,9 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
38961
39150
  return selectedItemValues;
38962
39151
  }
38963
39152
  var val = this.renderedValue;
38964
- return val.map(function (item) { return new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"](item); });
39153
+ return val.map(function (item) { return _this.createItemValue(item); });
38965
39154
  };
39155
+ QuestionCheckboxModel.prototype.getAnswerCorrectIgnoreOrder = function () { return true; };
38966
39156
  QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
38967
39157
  _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
38968
39158
  if (isOnValueChanged)
@@ -39316,6 +39506,21 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
39316
39506
  enumerable: false,
39317
39507
  configurable: true
39318
39508
  });
39509
+ Object.defineProperty(QuestionCheckboxModel.prototype, "isNewA11yStructure", {
39510
+ //a11y
39511
+ get: function () {
39512
+ return true;
39513
+ },
39514
+ enumerable: false,
39515
+ configurable: true
39516
+ });
39517
+ Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
39518
+ get: function () {
39519
+ return "listbox";
39520
+ },
39521
+ enumerable: false,
39522
+ configurable: true
39523
+ });
39319
39524
  return QuestionCheckboxModel;
39320
39525
  }(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));
39321
39526
 
@@ -39517,6 +39722,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
39517
39722
  }
39518
39723
  _super.prototype.setNewValue.call(this, newValue);
39519
39724
  };
39725
+ QuestionCommentModel.prototype.getValueSeparator = function () { return "\n"; };
39520
39726
  Object.defineProperty(QuestionCommentModel.prototype, "className", {
39521
39727
  get: function () {
39522
39728
  return (this.cssClasses ? this.getControlClass() : "panel-comment-root") || undefined;
@@ -39976,10 +40182,10 @@ var QuestionCustomModel = /** @class */ (function (_super) {
39976
40182
  QuestionCustomModel.prototype.getElement = function () {
39977
40183
  return this.contentQuestion;
39978
40184
  };
39979
- QuestionCustomModel.prototype.onAnyValueChanged = function (name) {
39980
- _super.prototype.onAnyValueChanged.call(this, name);
40185
+ QuestionCustomModel.prototype.onAnyValueChanged = function (name, questionName) {
40186
+ _super.prototype.onAnyValueChanged.call(this, name, questionName);
39981
40187
  if (!!this.contentQuestion) {
39982
- this.contentQuestion.onAnyValueChanged(name);
40188
+ this.contentQuestion.onAnyValueChanged(name, questionName);
39983
40189
  }
39984
40190
  };
39985
40191
  QuestionCustomModel.prototype.getQuestionByName = function (name) {
@@ -40021,6 +40227,12 @@ var QuestionCustomModel = /** @class */ (function (_super) {
40021
40227
  _super.prototype.focus.call(this, onError);
40022
40228
  }
40023
40229
  };
40230
+ QuestionCustomModel.prototype.afterRender = function (el) {
40231
+ _super.prototype.afterRender.call(this, el);
40232
+ if (!!this.contentQuestion) {
40233
+ this.contentQuestion.afterRender(el);
40234
+ }
40235
+ };
40024
40236
  Object.defineProperty(QuestionCustomModel.prototype, "contentQuestion", {
40025
40237
  get: function () {
40026
40238
  return this.questionWrapper;
@@ -40233,11 +40445,11 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
40233
40445
  questions[i].clearValueIfInvisible(reason);
40234
40446
  }
40235
40447
  };
40236
- QuestionCompositeModel.prototype.onAnyValueChanged = function (name) {
40237
- _super.prototype.onAnyValueChanged.call(this, name);
40448
+ QuestionCompositeModel.prototype.onAnyValueChanged = function (name, questionName) {
40449
+ _super.prototype.onAnyValueChanged.call(this, name, questionName);
40238
40450
  var questions = this.contentPanel.questions;
40239
40451
  for (var i = 0; i < questions.length; i++) {
40240
- questions[i].onAnyValueChanged(name);
40452
+ questions[i].onAnyValueChanged(name, questionName);
40241
40453
  }
40242
40454
  };
40243
40455
  Object.defineProperty(QuestionCompositeModel.prototype, "hasSingleInput", {
@@ -40460,10 +40672,9 @@ __webpack_require__.r(__webpack_exports__);
40460
40672
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
40461
40673
  /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
40462
40674
  /* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
40463
- /* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
40464
- /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
40465
- /* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdownListModel */ "./src/dropdownListModel.ts");
40466
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
40675
+ /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
40676
+ /* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdownListModel */ "./src/dropdownListModel.ts");
40677
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
40467
40678
  var __extends = (undefined && undefined.__extends) || (function () {
40468
40679
  var extendStatics = function (d, b) {
40469
40680
  extendStatics = Object.setPrototypeOf ||
@@ -40491,7 +40702,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
40491
40702
 
40492
40703
 
40493
40704
 
40494
-
40495
40705
  /**
40496
40706
  * A class that describes the Dropdown question type.
40497
40707
  *
@@ -40627,7 +40837,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
40627
40837
  (this.choicesMax - this.choicesMin) / this.choicesStep + 1) {
40628
40838
  this.minMaxChoices = [];
40629
40839
  for (var i = this.choicesMin; i <= this.choicesMax; i += this.choicesStep) {
40630
- this.minMaxChoices.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](i));
40840
+ this.minMaxChoices.push(this.createItemValue(i));
40631
40841
  }
40632
40842
  }
40633
40843
  res = res.concat(this.minMaxChoices);
@@ -40711,7 +40921,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
40711
40921
  configurable: true
40712
40922
  });
40713
40923
  QuestionDropdownModel.prototype.getControlClass = function () {
40714
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
40924
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
40715
40925
  .append(this.cssClasses.control)
40716
40926
  .append(this.cssClasses.controlEmpty, this.isEmpty())
40717
40927
  .append(this.cssClasses.onError, this.errors.length > 0)
@@ -40759,7 +40969,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
40759
40969
  Object.defineProperty(QuestionDropdownModel.prototype, "dropdownListModel", {
40760
40970
  get: function () {
40761
40971
  if (this.renderAs !== "select" && !this.dropdownListModelValue) {
40762
- this.dropdownListModelValue = new _dropdownListModel__WEBPACK_IMPORTED_MODULE_5__["DropdownListModel"](this);
40972
+ this.dropdownListModelValue = new _dropdownListModel__WEBPACK_IMPORTED_MODULE_4__["DropdownListModel"](this);
40763
40973
  }
40764
40974
  return this.dropdownListModelValue;
40765
40975
  },
@@ -40885,7 +41095,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("dropdown", [
40885
41095
  { name: "choicesMin:number", default: 0 },
40886
41096
  { name: "choicesMax:number", default: 0 },
40887
41097
  { name: "choicesStep:number", default: 1, minValue: 1 },
40888
- { name: "autocomplete", alternativeName: "autoComplete", choices: _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].questions.dataList, },
41098
+ { name: "autocomplete", alternativeName: "autoComplete", choices: _settings__WEBPACK_IMPORTED_MODULE_5__["settings"].questions.dataList, },
40889
41099
  { name: "renderAs", default: "default", visible: false },
40890
41100
  { name: "searchEnabled:boolean", default: true, visible: false },
40891
41101
  { name: "choicesLazyLoadEnabled:boolean", default: false, visible: false },
@@ -41274,6 +41484,11 @@ var QuestionExpressionModel = /** @class */ (function (_super) {
41274
41484
  }
41275
41485
  return val.toString();
41276
41486
  };
41487
+ QuestionExpressionModel.prototype.convertToCorrectValue = function (val) {
41488
+ if (Array.isArray(val))
41489
+ return val.join(", ");
41490
+ return val;
41491
+ };
41277
41492
  return QuestionExpressionModel;
41278
41493
  }(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));
41279
41494
 
@@ -41571,7 +41786,14 @@ var QuestionFileModel = /** @class */ (function (_super) {
41571
41786
  */
41572
41787
  _this.onUploadStateChanged = _this.addEvent();
41573
41788
  _this.onStateChanged = _this.addEvent();
41574
- _this.mobileFileNavigator = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
41789
+ _this.fileNavigator = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
41790
+ _this.prevPreviewLength = 0;
41791
+ _this.calcAvailableItemsCount = function (availableWidth, itemWidth, gap) {
41792
+ var itemsCount = Math.floor(availableWidth / (itemWidth + gap));
41793
+ if ((itemsCount + 1) * (itemWidth + gap) - gap <= availableWidth)
41794
+ itemsCount++;
41795
+ return itemsCount;
41796
+ };
41575
41797
  _this.dragCounter = 0;
41576
41798
  _this.onDragEnter = function (event) {
41577
41799
  if (!_this.isInputReadOnly) {
@@ -41631,7 +41853,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
41631
41853
  id: "prevPage",
41632
41854
  iconSize: 16,
41633
41855
  action: function () {
41634
- _this.indexToShow = _this.previewValue.length && ((_this.indexToShow - 1 + _this.previewValue.length) % _this.previewValue.length) || 0;
41856
+ _this.indexToShow = _this.previewValue.length && ((_this.indexToShow - 1 + _this.pagesCount) % _this.pagesCount) || 0;
41635
41857
  _this.fileIndexAction.title = _this.getFileIndexCaption();
41636
41858
  }
41637
41859
  });
@@ -41639,16 +41861,26 @@ var QuestionFileModel = /** @class */ (function (_super) {
41639
41861
  id: "nextPage",
41640
41862
  iconSize: 16,
41641
41863
  action: function () {
41642
- _this.indexToShow = _this.previewValue.length && ((_this.indexToShow + 1) % _this.previewValue.length) || 0;
41864
+ _this.indexToShow = _this.previewValue.length && ((_this.indexToShow + 1) % _this.pagesCount) || 0;
41643
41865
  _this.fileIndexAction.title = _this.getFileIndexCaption();
41644
41866
  }
41645
41867
  });
41646
- _this.mobileFileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
41868
+ _this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
41647
41869
  return _this;
41648
41870
  }
41649
- Object.defineProperty(QuestionFileModel.prototype, "mobileFileNavigatorVisible", {
41871
+ Object.defineProperty(QuestionFileModel.prototype, "fileNavigatorVisible", {
41872
+ get: function () {
41873
+ var isUploading = this.isUploading;
41874
+ var containsMultipleFiles = this.containsMultiplyFiles;
41875
+ var needToShowFileNavigator = this.pageSize < this.previewValue.length;
41876
+ return !isUploading && containsMultipleFiles && needToShowFileNavigator && this.isDefaultV2Theme;
41877
+ },
41878
+ enumerable: false,
41879
+ configurable: true
41880
+ });
41881
+ Object.defineProperty(QuestionFileModel.prototype, "pagesCount", {
41650
41882
  get: function () {
41651
- return this.isMobile && this.containsMultiplyFiles;
41883
+ return Math.ceil(this.previewValue.length / this.pageSize);
41652
41884
  },
41653
41885
  enumerable: false,
41654
41886
  configurable: true
@@ -41660,15 +41892,40 @@ var QuestionFileModel = /** @class */ (function (_super) {
41660
41892
  //this.mobileFileNavigator.cssClasses = this.survey.getCss().actionBar;
41661
41893
  };
41662
41894
  QuestionFileModel.prototype.getFileIndexCaption = function () {
41663
- return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.previewValue.length);
41895
+ return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
41896
+ };
41897
+ QuestionFileModel.prototype.updateFileNavigator = function () {
41898
+ this.indexToShow = this.previewValue.length && ((this.indexToShow + this.pagesCount) % this.pagesCount) || 0;
41899
+ this.fileIndexAction.title = this.getFileIndexCaption();
41664
41900
  };
41665
41901
  QuestionFileModel.prototype.previewValueChanged = function () {
41666
- this.indexToShow = this.previewValue.length > 0 ? (this.indexToShow > 0 ? this.indexToShow - 1 : 0) : 0;
41902
+ var _this = this;
41903
+ if (this.previewValue.length !== this.prevPreviewLength) {
41904
+ if (this.previewValue.length > 0) {
41905
+ if (this.prevPreviewLength > this.previewValue.length) {
41906
+ this.indexToShow = this.indexToShow >= this.pagesCount && this.indexToShow > 0 ? this.pagesCount - 1 : this.indexToShow;
41907
+ }
41908
+ else {
41909
+ this.indexToShow = Math.floor(this.prevPreviewLength / this.pageSize);
41910
+ }
41911
+ }
41912
+ else {
41913
+ this.indexToShow = 0;
41914
+ }
41915
+ }
41667
41916
  this.fileIndexAction.title = this.getFileIndexCaption();
41668
41917
  this.containsMultiplyFiles = this.previewValue.length > 1;
41918
+ if (this.previewValue.length > 0 && !this.calculatedGapBetweenItems && !this.calculatedItemWidth) {
41919
+ setTimeout(function () {
41920
+ _this.processResponsiveness(0, _this._width);
41921
+ });
41922
+ }
41923
+ this.prevPreviewLength = this.previewValue.length;
41669
41924
  };
41670
41925
  QuestionFileModel.prototype.isPreviewVisible = function (index) {
41671
- return !this.isMobile || index === this.indexToShow;
41926
+ var isFileNavigatorVisible = this.fileNavigatorVisible;
41927
+ var isPreviewVisible = (this.indexToShow * this.pageSize <= index && index < (this.indexToShow + 1) * this.pageSize);
41928
+ return !isFileNavigatorVisible || isPreviewVisible;
41672
41929
  };
41673
41930
  QuestionFileModel.prototype.getType = function () {
41674
41931
  return "file";
@@ -41890,16 +42147,47 @@ var QuestionFileModel = /** @class */ (function (_super) {
41890
42147
  enumerable: false,
41891
42148
  configurable: true
41892
42149
  });
42150
+ Object.defineProperty(QuestionFileModel.prototype, "showChooseButton", {
42151
+ get: function () {
42152
+ return !this.showLoadingIndicator;
42153
+ },
42154
+ enumerable: false,
42155
+ configurable: true
42156
+ });
42157
+ Object.defineProperty(QuestionFileModel.prototype, "showLoadingIndicator", {
42158
+ get: function () {
42159
+ return this.isUploading && this.isDefaultV2Theme;
42160
+ },
42161
+ enumerable: false,
42162
+ configurable: true
42163
+ });
42164
+ Object.defineProperty(QuestionFileModel.prototype, "allowShowPreview", {
42165
+ get: function () {
42166
+ return this.previewValue && this.previewValue.length > 0 && !this.showLoadingIndicator;
42167
+ },
42168
+ enumerable: false,
42169
+ configurable: true
42170
+ });
42171
+ Object.defineProperty(QuestionFileModel.prototype, "showRemoveButtonCore", {
42172
+ get: function () {
42173
+ var showLoadingIndicator = this.showLoadingIndicator;
42174
+ var isReadOnly = this.isReadOnly;
42175
+ var isEmpty = this.isEmpty();
42176
+ return !isReadOnly && !isEmpty && !showLoadingIndicator;
42177
+ },
42178
+ enumerable: false,
42179
+ configurable: true
42180
+ });
41893
42181
  Object.defineProperty(QuestionFileModel.prototype, "showRemoveButton", {
41894
42182
  get: function () {
41895
- return !this.isReadOnly && !this.isEmpty() && this.cssClasses.removeButton;
42183
+ return this.showRemoveButtonCore && this.cssClasses.removeButton;
41896
42184
  },
41897
42185
  enumerable: false,
41898
42186
  configurable: true
41899
42187
  });
41900
42188
  Object.defineProperty(QuestionFileModel.prototype, "showRemoveButtonBottom", {
41901
42189
  get: function () {
41902
- return !this.isReadOnly && !this.isEmpty() && this.cssClasses.removeButtonBottom;
42190
+ return this.showRemoveButtonCore && this.cssClasses.removeButtonBottom;
41903
42191
  },
41904
42192
  enumerable: false,
41905
42193
  configurable: true
@@ -42114,6 +42402,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
42114
42402
  get: function () {
42115
42403
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
42116
42404
  .append(this.cssClasses.root)
42405
+ .append(this.cssClasses.rootDragging, this.isDragging)
42117
42406
  .append(this.cssClasses.single, !this.allowMultiple)
42118
42407
  .append(this.cssClasses.singleImage, !this.allowMultiple && this.isAnswered && this.canPreviewImage(this.value[0]))
42119
42408
  .append(this.cssClasses.mobile, this.isMobile)
@@ -42153,6 +42442,47 @@ var QuestionFileModel = /** @class */ (function (_super) {
42153
42442
  _super.prototype.endLoadingFromJson.call(this);
42154
42443
  this.loadPreview(this.value);
42155
42444
  };
42445
+ QuestionFileModel.prototype.needResponsiveness = function () {
42446
+ return this.supportResponsiveness() && this.isDefaultV2Theme;
42447
+ };
42448
+ QuestionFileModel.prototype.supportResponsiveness = function () {
42449
+ return true;
42450
+ };
42451
+ QuestionFileModel.prototype.getObservedElementSelector = function () {
42452
+ return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["classesToSelector"])(this.cssClasses.dragArea);
42453
+ };
42454
+ QuestionFileModel.prototype.getFileListSelector = function () {
42455
+ return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["classesToSelector"])(this.cssClasses.fileList);
42456
+ };
42457
+ QuestionFileModel.prototype.triggerResponsiveness = function (hard) {
42458
+ if (hard) {
42459
+ this.calculatedGapBetweenItems = undefined;
42460
+ this.calculatedItemWidth = undefined;
42461
+ }
42462
+ _super.prototype.triggerResponsiveness.call(this);
42463
+ };
42464
+ QuestionFileModel.prototype.processResponsiveness = function (_, availableWidth) {
42465
+ var _this = this;
42466
+ this._width = availableWidth;
42467
+ if (this.rootElement) {
42468
+ if ((!this.calculatedGapBetweenItems || !this.calculatedItemWidth) && this.allowMultiple) {
42469
+ var fileListSelector = this.getFileListSelector();
42470
+ var fileListElement = fileListSelector ? this.rootElement.querySelector(this.getFileListSelector()) : undefined;
42471
+ if (fileListElement) {
42472
+ this.calculatedGapBetweenItems = Math.ceil(Number.parseFloat(window.getComputedStyle(fileListElement).gap));
42473
+ var firstVisibleItem = Array.from(fileListElement.children).filter(function (_, index) { return _this.isPreviewVisible(index); })[0];
42474
+ if (firstVisibleItem) {
42475
+ this.calculatedItemWidth = Math.ceil(Number.parseFloat(window.getComputedStyle(firstVisibleItem).width));
42476
+ }
42477
+ }
42478
+ }
42479
+ }
42480
+ if (this.calculatedGapBetweenItems && this.calculatedItemWidth) {
42481
+ this.pageSize = this.calcAvailableItemsCount(availableWidth, this.calculatedItemWidth, this.calculatedGapBetweenItems);
42482
+ return true;
42483
+ }
42484
+ return false;
42485
+ };
42156
42486
  QuestionFileModel.prototype.afterRender = function (el) {
42157
42487
  this.rootElement = el;
42158
42488
  _super.prototype.afterRender.call(this, el);
@@ -42175,6 +42505,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
42175
42505
  var previewIndex = this.previewValue.indexOf(data);
42176
42506
  this.removeFileByContent(previewIndex === -1 ? data : this.value[previewIndex]);
42177
42507
  };
42508
+ __decorate([
42509
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
42510
+ ], QuestionFileModel.prototype, "isUploading", void 0);
42178
42511
  __decorate([
42179
42512
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
42180
42513
  ], QuestionFileModel.prototype, "isDragging", void 0);
@@ -42187,6 +42520,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
42187
42520
  __decorate([
42188
42521
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 0 })
42189
42522
  ], QuestionFileModel.prototype, "indexToShow", void 0);
42523
+ __decorate([
42524
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 1, onSet: function (_, target) {
42525
+ target.updateFileNavigator();
42526
+ } })
42527
+ ], QuestionFileModel.prototype, "pageSize", void 0);
42190
42528
  __decorate([
42191
42529
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
42192
42530
  ], QuestionFileModel.prototype, "containsMultiplyFiles", void 0);
@@ -44744,10 +45082,10 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
44744
45082
  questions[i].clearValue();
44745
45083
  }
44746
45084
  };
44747
- MatrixDropdownRowModelBase.prototype.onAnyValueChanged = function (name) {
45085
+ MatrixDropdownRowModelBase.prototype.onAnyValueChanged = function (name, questionName) {
44748
45086
  var questions = this.questions;
44749
45087
  for (var i = 0; i < questions.length; i++) {
44750
- questions[i].onAnyValueChanged(name);
45088
+ questions[i].onAnyValueChanged(name, questionName);
44751
45089
  }
44752
45090
  };
44753
45091
  MatrixDropdownRowModelBase.prototype.getDataValueCore = function (valuesHash, key) {
@@ -44813,7 +45151,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
44813
45151
  var isDeleting = newColumnValue == null && !changedQuestion ||
44814
45152
  isComment && !newColumnValue && !!changedQuestion && changedQuestion.autoOtherMode;
44815
45153
  this.data.onRowChanged(this, changedName, newValue, isDeleting);
44816
- this.onAnyValueChanged(MatrixDropdownRowModelBase.RowVariableName);
45154
+ this.onAnyValueChanged(MatrixDropdownRowModelBase.RowVariableName, "");
44817
45155
  };
44818
45156
  MatrixDropdownRowModelBase.prototype.updateQuestionsValue = function (name, newColumnValue, isComment) {
44819
45157
  if (!this.detailPanel)
@@ -46549,7 +46887,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
46549
46887
  ? null
46550
46888
  : newValue;
46551
46889
  };
46552
- QuestionMatrixDropdownModelBase.prototype.onAnyValueChanged = function (name) {
46890
+ QuestionMatrixDropdownModelBase.prototype.onAnyValueChanged = function (name, questionName) {
46553
46891
  if (this.isUpdateLocked ||
46554
46892
  this.isDoingonAnyValueChanged ||
46555
46893
  !this.generatedVisibleRows)
@@ -46557,11 +46895,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
46557
46895
  this.isDoingonAnyValueChanged = true;
46558
46896
  var rows = this.visibleRows;
46559
46897
  for (var i = 0; i < rows.length; i++) {
46560
- rows[i].onAnyValueChanged(name);
46898
+ rows[i].onAnyValueChanged(name, questionName);
46561
46899
  }
46562
46900
  var totalRow = this.visibleTotalRow;
46563
46901
  if (!!totalRow) {
46564
- totalRow.onAnyValueChanged(name);
46902
+ totalRow.onAnyValueChanged(name, questionName);
46565
46903
  }
46566
46904
  this.isDoingonAnyValueChanged = false;
46567
46905
  };
@@ -46748,6 +47086,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
46748
47086
  return this.detailPanel;
46749
47087
  var panel = this.createNewDetailPanel();
46750
47088
  panel.readOnly = this.isReadOnly;
47089
+ panel.setSurveyImpl(row);
46751
47090
  var json = this.detailPanel.toJSON();
46752
47091
  new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
46753
47092
  panel.renderWidth = "100%";
@@ -50856,6 +51195,9 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
50856
51195
  }
50857
51196
  return res;
50858
51197
  };
51198
+ QuestionMultipleTextModel.prototype.allowMobileInDesignMode = function () {
51199
+ return true;
51200
+ };
50859
51201
  //IMultipleTextData
50860
51202
  QuestionMultipleTextModel.prototype.getMultipleTextValue = function (name) {
50861
51203
  if (!this.value)
@@ -50919,7 +51261,12 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
50919
51261
  // do nothing
50920
51262
  };
50921
51263
  QuestionMultipleTextModel.prototype.getItemLabelCss = function (item) {
50922
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]().append(this.cssClasses.itemLabel).append(this.cssClasses.itemLabelOnError, item.editor.errors.length > 0).toString();
51264
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]()
51265
+ .append(this.cssClasses.itemLabel)
51266
+ .append(this.cssClasses.itemLabelAnswered, item.editor.isAnswered)
51267
+ .append(this.cssClasses.itemLabelAllowFocus, !this.isDesignMode)
51268
+ .append(this.cssClasses.itemLabelOnError, item.editor.errors.length > 0)
51269
+ .toString();
50923
51270
  };
50924
51271
  QuestionMultipleTextModel.prototype.getItemCss = function () {
50925
51272
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]().append(this.cssClasses.item).toString();
@@ -51976,6 +52323,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
51976
52323
  }
51977
52324
  };
51978
52325
  QuestionPanelDynamicModel.prototype.setIsMobile = function (val) {
52326
+ _super.prototype.setIsMobile.call(this, val);
51979
52327
  (this.panels || []).forEach(function (panel) { return panel.elements.forEach(function (element) {
51980
52328
  if (element instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
51981
52329
  element.isMobile = val;
@@ -52874,11 +53222,11 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
52874
53222
  }
52875
53223
  this.isValueChangingInternally = false;
52876
53224
  };
52877
- QuestionPanelDynamicModel.prototype.onAnyValueChanged = function (name) {
52878
- _super.prototype.onAnyValueChanged.call(this, name);
53225
+ QuestionPanelDynamicModel.prototype.onAnyValueChanged = function (name, questionName) {
53226
+ _super.prototype.onAnyValueChanged.call(this, name, questionName);
52879
53227
  for (var i = 0; i < this.panels.length; i++) {
52880
- this.panels[i].onAnyValueChanged(name);
52881
- this.panels[i].onAnyValueChanged(QuestionPanelDynamicItem.ItemVariableName);
53228
+ this.panels[i].onAnyValueChanged(name, questionName);
53229
+ this.panels[i].onAnyValueChanged(QuestionPanelDynamicItem.ItemVariableName, "");
52882
53230
  }
52883
53231
  };
52884
53232
  QuestionPanelDynamicModel.prototype.hasKeysDuplicated = function (fireCallback, rec) {
@@ -53112,7 +53460,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
53112
53460
  panel.onGetFooterActionsCallback = function () {
53113
53461
  return _this.getPanelActions(panel);
53114
53462
  };
53115
- panel.footerToolbarCss = this.cssClasses.panelFooter;
53463
+ panel.onGetFooterToolbarCssCallback = function () { return _this.cssClasses.panelFooter; };
53116
53464
  panel.registerPropertyChangedHandlers(["visible"], function () {
53117
53465
  if (panel.visible)
53118
53466
  _this.onPanelAdded(panel);
@@ -53779,20 +54127,6 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
53779
54127
  QuestionRadiogroupModel.prototype.getType = function () {
53780
54128
  return "radiogroup";
53781
54129
  };
53782
- Object.defineProperty(QuestionRadiogroupModel.prototype, "ariaRole", {
53783
- get: function () {
53784
- return "radiogroup";
53785
- },
53786
- enumerable: false,
53787
- configurable: true
53788
- });
53789
- Object.defineProperty(QuestionRadiogroupModel.prototype, "titleAriaLabel", {
53790
- get: function () {
53791
- return null;
53792
- },
53793
- enumerable: false,
53794
- configurable: true
53795
- });
53796
54130
  QuestionRadiogroupModel.prototype.getFirstInputElementId = function () {
53797
54131
  return this.inputId + "_0";
53798
54132
  };
@@ -53866,6 +54200,21 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
53866
54200
  }
53867
54201
  return actions;
53868
54202
  };
54203
+ Object.defineProperty(QuestionRadiogroupModel.prototype, "isNewA11yStructure", {
54204
+ //a11y
54205
+ get: function () {
54206
+ return true;
54207
+ },
54208
+ enumerable: false,
54209
+ configurable: true
54210
+ });
54211
+ Object.defineProperty(QuestionRadiogroupModel.prototype, "a11y_input_ariaRole", {
54212
+ get: function () {
54213
+ return "radiogroup";
54214
+ },
54215
+ enumerable: false,
54216
+ configurable: true
54217
+ });
53869
54218
  return QuestionRadiogroupModel;
53870
54219
  }(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));
53871
54220
 
@@ -54426,6 +54775,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
54426
54775
  enumerable: false,
54427
54776
  configurable: true
54428
54777
  });
54778
+ Object.defineProperty(QuestionRankingModel.prototype, "isNewA11yStructure", {
54779
+ //a11y
54780
+ get: function () {
54781
+ return false;
54782
+ },
54783
+ enumerable: false,
54784
+ configurable: true
54785
+ });
54429
54786
  __decorate([
54430
54787
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
54431
54788
  ], QuestionRankingModel.prototype, "currentDropTarget", void 0);
@@ -56218,6 +56575,14 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
56218
56575
  _super.prototype.clearValue.call(this);
56219
56576
  this.dropdownListModel.clear();
56220
56577
  };
56578
+ Object.defineProperty(QuestionTagboxModel.prototype, "isNewA11yStructure", {
56579
+ //a11y
56580
+ get: function () {
56581
+ return false;
56582
+ },
56583
+ enumerable: false,
56584
+ configurable: true
56585
+ });
56221
56586
  __decorate([
56222
56587
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
56223
56588
  ], QuestionTagboxModel.prototype, "readOnlyText", void 0);
@@ -57155,7 +57520,7 @@ var QuestionTextBase = /** @class */ (function (_super) {
57155
57520
  };
57156
57521
  Object.defineProperty(QuestionTextBase.prototype, "textUpdateMode", {
57157
57522
  /**
57158
- * Gets or sets a value that specifies when to update the question value.
57523
+ * Specifies when to update the question value.
57159
57524
  *
57160
57525
  * Possible values:
57161
57526
  *
@@ -57228,6 +57593,12 @@ var QuestionTextBase = /** @class */ (function (_super) {
57228
57593
  _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
57229
57594
  this.updateRemainingCharacterCounter(newValue);
57230
57595
  };
57596
+ QuestionTextBase.prototype.convertToCorrectValue = function (val) {
57597
+ if (Array.isArray(val))
57598
+ return val.join(this.getValueSeparator());
57599
+ return val;
57600
+ };
57601
+ QuestionTextBase.prototype.getValueSeparator = function () { return ", "; };
57231
57602
  QuestionTextBase.prototype.checkForUndo = function (event) {
57232
57603
  if (this.disableNativeUndoRedo && this.isInputTextUpdate && (event.ctrlKey || event.metaKey)) {
57233
57604
  if ([89, 90].indexOf(event.keyCode) !== -1) {
@@ -57242,97 +57613,10 @@ var QuestionTextBase = /** @class */ (function (_super) {
57242
57613
  .append(this.cssClasses.controlDisabled, this.isReadOnly)
57243
57614
  .toString();
57244
57615
  };
57245
- Object.defineProperty(QuestionTextBase.prototype, "ariaRole", {
57616
+ Object.defineProperty(QuestionTextBase.prototype, "isNewA11yStructure", {
57246
57617
  //a11y
57247
57618
  get: function () {
57248
- return null;
57249
- },
57250
- enumerable: false,
57251
- configurable: true
57252
- });
57253
- Object.defineProperty(QuestionTextBase.prototype, "ariaRequired", {
57254
- get: function () {
57255
- return null;
57256
- },
57257
- enumerable: false,
57258
- configurable: true
57259
- });
57260
- Object.defineProperty(QuestionTextBase.prototype, "ariaInvalid", {
57261
- get: function () {
57262
- return null;
57263
- },
57264
- enumerable: false,
57265
- configurable: true
57266
- });
57267
- Object.defineProperty(QuestionTextBase.prototype, "ariaLabel", {
57268
- get: function () {
57269
- return null;
57270
- },
57271
- enumerable: false,
57272
- configurable: true
57273
- });
57274
- Object.defineProperty(QuestionTextBase.prototype, "ariaLabelledBy", {
57275
- get: function () {
57276
- return null;
57277
- },
57278
- enumerable: false,
57279
- configurable: true
57280
- });
57281
- Object.defineProperty(QuestionTextBase.prototype, "ariaDescribedBy", {
57282
- get: function () {
57283
- return null;
57284
- },
57285
- enumerable: false,
57286
- configurable: true
57287
- });
57288
- Object.defineProperty(QuestionTextBase.prototype, "a11y_input_ariaRole", {
57289
- get: function () {
57290
- return "textbox";
57291
- },
57292
- enumerable: false,
57293
- configurable: true
57294
- });
57295
- Object.defineProperty(QuestionTextBase.prototype, "a11y_input_ariaRequired", {
57296
- get: function () {
57297
- return this.isRequired ? "true" : "false";
57298
- },
57299
- enumerable: false,
57300
- configurable: true
57301
- });
57302
- Object.defineProperty(QuestionTextBase.prototype, "a11y_input_ariaInvalid", {
57303
- get: function () {
57304
- return this.errors.length > 0 ? "true" : "false";
57305
- },
57306
- enumerable: false,
57307
- configurable: true
57308
- });
57309
- Object.defineProperty(QuestionTextBase.prototype, "a11y_input_ariaLabel", {
57310
- get: function () {
57311
- if (this.hasTitle && !this.parentQuestion) {
57312
- return null;
57313
- }
57314
- else {
57315
- return this.locTitle.renderedHtml;
57316
- }
57317
- },
57318
- enumerable: false,
57319
- configurable: true
57320
- });
57321
- Object.defineProperty(QuestionTextBase.prototype, "a11y_input_ariaLabelledBy", {
57322
- get: function () {
57323
- if (this.hasTitle && !this.parentQuestion) {
57324
- return this.ariaTitleId;
57325
- }
57326
- else {
57327
- return null;
57328
- }
57329
- },
57330
- enumerable: false,
57331
- configurable: true
57332
- });
57333
- Object.defineProperty(QuestionTextBase.prototype, "a11y_input_ariaDescribedBy", {
57334
- get: function () {
57335
- return this.errors.length > 0 ? this.id + "_errors" : null;
57619
+ return true;
57336
57620
  },
57337
57621
  enumerable: false,
57338
57622
  configurable: true
@@ -58599,6 +58883,52 @@ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.re
58599
58883
  });
58600
58884
 
58601
58885
 
58886
+ /***/ }),
58887
+
58888
+ /***/ "./src/react/components/loading-indicator.tsx":
58889
+ /*!****************************************************!*\
58890
+ !*** ./src/react/components/loading-indicator.tsx ***!
58891
+ \****************************************************/
58892
+ /*! exports provided: LoadingIndicatorComponent */
58893
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
58894
+
58895
+ "use strict";
58896
+ __webpack_require__.r(__webpack_exports__);
58897
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return LoadingIndicatorComponent; });
58898
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
58899
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
58900
+ /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
58901
+ var __extends = (undefined && undefined.__extends) || (function () {
58902
+ var extendStatics = function (d, b) {
58903
+ extendStatics = Object.setPrototypeOf ||
58904
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
58905
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
58906
+ return extendStatics(d, b);
58907
+ };
58908
+ return function (d, b) {
58909
+ if (typeof b !== "function" && b !== null)
58910
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
58911
+ extendStatics(d, b);
58912
+ function __() { this.constructor = d; }
58913
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
58914
+ };
58915
+ })();
58916
+
58917
+
58918
+ var LoadingIndicatorComponent = /** @class */ (function (_super) {
58919
+ __extends(LoadingIndicatorComponent, _super);
58920
+ function LoadingIndicatorComponent() {
58921
+ return _super !== null && _super.apply(this, arguments) || this;
58922
+ }
58923
+ LoadingIndicatorComponent.prototype.render = function () {
58924
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: "sd-loading-indicator" },
58925
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_1__["SvgIcon"], { iconName: "icon-loading", size: "auto" })));
58926
+ };
58927
+ return LoadingIndicatorComponent;
58928
+ }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));
58929
+
58930
+
58931
+
58602
58932
  /***/ }),
58603
58933
 
58604
58934
  /***/ "./src/react/components/matrix-actions/detail-button/detail-button.tsx":
@@ -60790,6 +61120,129 @@ var SurveyElementHeader = /** @class */ (function (_super) {
60790
61120
 
60791
61121
 
60792
61122
 
61123
+ /***/ }),
61124
+
61125
+ /***/ "./src/react/element.tsx":
61126
+ /*!*******************************!*\
61127
+ !*** ./src/react/element.tsx ***!
61128
+ \*******************************/
61129
+ /*! exports provided: SurveyRowElement */
61130
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
61131
+
61132
+ "use strict";
61133
+ __webpack_require__.r(__webpack_exports__);
61134
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyRowElement", function() { return SurveyRowElement; });
61135
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
61136
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
61137
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
61138
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
61139
+ var __extends = (undefined && undefined.__extends) || (function () {
61140
+ var extendStatics = function (d, b) {
61141
+ extendStatics = Object.setPrototypeOf ||
61142
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
61143
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
61144
+ return extendStatics(d, b);
61145
+ };
61146
+ return function (d, b) {
61147
+ if (typeof b !== "function" && b !== null)
61148
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
61149
+ extendStatics(d, b);
61150
+ function __() { this.constructor = d; }
61151
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61152
+ };
61153
+ })();
61154
+
61155
+
61156
+
61157
+ var SurveyRowElement = /** @class */ (function (_super) {
61158
+ __extends(SurveyRowElement, _super);
61159
+ function SurveyRowElement(props) {
61160
+ var _this = _super.call(this, props) || this;
61161
+ _this.element.cssClasses;
61162
+ return _this;
61163
+ }
61164
+ SurveyRowElement.prototype.getStateElement = function () {
61165
+ return this.element;
61166
+ };
61167
+ Object.defineProperty(SurveyRowElement.prototype, "element", {
61168
+ get: function () {
61169
+ return this.props.element;
61170
+ },
61171
+ enumerable: false,
61172
+ configurable: true
61173
+ });
61174
+ Object.defineProperty(SurveyRowElement.prototype, "index", {
61175
+ get: function () {
61176
+ return this.props.index;
61177
+ },
61178
+ enumerable: false,
61179
+ configurable: true
61180
+ });
61181
+ Object.defineProperty(SurveyRowElement.prototype, "row", {
61182
+ get: function () {
61183
+ return this.props.row;
61184
+ },
61185
+ enumerable: false,
61186
+ configurable: true
61187
+ });
61188
+ Object.defineProperty(SurveyRowElement.prototype, "survey", {
61189
+ get: function () {
61190
+ return this.props.survey;
61191
+ },
61192
+ enumerable: false,
61193
+ configurable: true
61194
+ });
61195
+ Object.defineProperty(SurveyRowElement.prototype, "creator", {
61196
+ get: function () {
61197
+ return this.props.creator;
61198
+ },
61199
+ enumerable: false,
61200
+ configurable: true
61201
+ });
61202
+ Object.defineProperty(SurveyRowElement.prototype, "css", {
61203
+ get: function () {
61204
+ return this.props.css;
61205
+ },
61206
+ enumerable: false,
61207
+ configurable: true
61208
+ });
61209
+ SurveyRowElement.prototype.shouldComponentUpdate = function (nextProps, nextState) {
61210
+ if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
61211
+ return false;
61212
+ this.element.cssClasses;
61213
+ return true;
61214
+ };
61215
+ SurveyRowElement.prototype.renderElement = function () {
61216
+ var element = this.element;
61217
+ var innerElement = this.createElement(element, this.index);
61218
+ var css = element.cssClassesValue;
61219
+ var focusIn = function () {
61220
+ var el = element;
61221
+ if (el && el.isQuestion) {
61222
+ el.focusIn();
61223
+ }
61224
+ };
61225
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: css.questionWrapper, style: element.rootStyle, "data-key": innerElement.key, key: innerElement.key, onFocus: focusIn }, this.row.isNeedRender ? innerElement : _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.createElement(element.skeletonComponentName, { element: element, css: this.css, })));
61226
+ };
61227
+ SurveyRowElement.prototype.createElement = function (element, elementIndex) {
61228
+ var index = elementIndex ? "-" + elementIndex : 0;
61229
+ var elementType = element.getType();
61230
+ if (!_element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.isElementRegistered(elementType)) {
61231
+ elementType = "question";
61232
+ }
61233
+ return _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.createElement(elementType, {
61234
+ key: element.name + index,
61235
+ element: element,
61236
+ creator: this.creator,
61237
+ survey: this.survey,
61238
+ css: this.css,
61239
+ });
61240
+ };
61241
+ return SurveyRowElement;
61242
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"]));
61243
+
61244
+
61245
+
60793
61246
  /***/ }),
60794
61247
 
60795
61248
  /***/ "./src/react/flow-panel.tsx":
@@ -62357,7 +62810,7 @@ var SurveyProgressButtons = /** @class */ (function (_super) {
62357
62810
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("li", { key: "listelement" + index, className: this.getListElementCss(index), onClick: this.isListElementClickable(index)
62358
62811
  ? function () { return _this.clickListElement(index); }
62359
62812
  : undefined },
62360
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: page.navigationTitle || page.name }, page.navigationTitle || page.name),
62813
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: page.renderedNavigationTitle }, page.renderedNavigationTitle),
62361
62814
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription }, page.navigationDescription)));
62362
62815
  };
62363
62816
  SurveyProgressButtons.prototype.isListElementClickable = function (index) {
@@ -63072,7 +63525,7 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
63072
63525
  SurveyQuestionCheckbox.prototype.renderElement = function () {
63073
63526
  var _this = this;
63074
63527
  var cssClasses = this.question.cssClasses;
63075
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { role: "presentation", className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); } },
63528
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy },
63076
63529
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { role: "presentation", className: "sv-hidden" }),
63077
63530
  this.getHeader(),
63078
63531
  this.question.hasColumns
@@ -63252,8 +63705,8 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
63252
63705
  : this.handleOnChange;
63253
63706
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
63254
63707
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
63255
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass, "aria-label": this.question.getAriaItemLabel(this.item) },
63256
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, role: "option", type: "checkbox", name: this.question.name, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged, "aria-describedby": this.question.ariaDescribedBy }),
63708
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
63709
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged }),
63257
63710
  this.cssClasses.materialDecorator ?
63258
63711
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
63259
63712
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -63382,7 +63835,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
63382
63835
  if (question.isReadOnlyRenderDiv()) {
63383
63836
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
63384
63837
  }
63385
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, value: comment, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onChange: handleOnChange, onBlur: function (e) { _this.onCommentChange(e); handleOnChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired, "aria-label": question.locTitle.renderedHtml, style: { resize: question.resizeStyle } }));
63838
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, value: comment, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onChange: handleOnChange, onBlur: function (e) { _this.onCommentChange(e); handleOnChange(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 } }));
63386
63839
  };
63387
63840
  return SurveyQuestionCommentItem;
63388
63841
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -64097,6 +64550,7 @@ __webpack_require__.r(__webpack_exports__);
64097
64550
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
64098
64551
  /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
64099
64552
  /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
64553
+ /* harmony import */ var _components_loading_indicator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/loading-indicator */ "./src/react/components/loading-indicator.tsx");
64100
64554
  var __extends = (undefined && undefined.__extends) || (function () {
64101
64555
  var extendStatics = function (d, b) {
64102
64556
  extendStatics = Object.setPrototypeOf ||
@@ -64118,6 +64572,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
64118
64572
 
64119
64573
 
64120
64574
 
64575
+
64121
64576
  var SurveyQuestionFile = /** @class */ (function (_super) {
64122
64577
  __extends(SurveyQuestionFile, _super);
64123
64578
  function SurveyQuestionFile(props) {
@@ -64130,14 +64585,17 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
64130
64585
  enumerable: false,
64131
64586
  configurable: true
64132
64587
  });
64588
+ SurveyQuestionFile.prototype.renderLoadingIndicator = function () {
64589
+ return this.question.showLoadingIndicator ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_loading_indicator__WEBPACK_IMPORTED_MODULE_6__["LoadingIndicatorComponent"], null) : null;
64590
+ };
64133
64591
  SurveyQuestionFile.prototype.renderElement = function () {
64134
64592
  var _this = this;
64135
64593
  var preview = this.renderPreview();
64136
64594
  var fileInput = null;
64137
64595
  var fileDecorator = this.renderFileDecorator();
64138
- var clearButton = this.renderClearButton(this.question.showRemoveButton);
64139
- var clearButtonBottom = this.renderClearButton(this.question.showRemoveButtonBottom);
64140
- var mobileFileNavigator = this.question.mobileFileNavigatorVisible ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.question.mobileFileNavigator })) : null;
64596
+ var clearButton = this.question.showRemoveButton ? this.renderClearButton(this.question.cssClasses.removeButton) : null;
64597
+ var clearButtonBottom = this.question.showRemoveButtonBottom ? this.renderClearButton(this.question.cssClasses.removeButtonBottom) : null;
64598
+ var fileNavigator = this.question.fileNavigatorVisible ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.question.fileNavigator })) : null;
64141
64599
  fileInput = (this.isDisplayMode ?
64142
64600
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes })
64143
64601
  :
@@ -64149,26 +64607,34 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
64149
64607
  clearButton,
64150
64608
  preview,
64151
64609
  clearButtonBottom,
64152
- mobileFileNavigator)));
64610
+ fileNavigator)));
64153
64611
  };
64154
64612
  SurveyQuestionFile.prototype.renderFileDecorator = function () {
64155
- var questionCss = this.question.cssClasses;
64613
+ var loadingIndicator = this.renderLoadingIndicator();
64614
+ var chooseButton = this.renderChooseButton();
64615
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getFileDecoratorCss() },
64616
+ loadingIndicator,
64617
+ chooseButton));
64618
+ };
64619
+ SurveyQuestionFile.prototype.renderChooseButton = function () {
64156
64620
  var noFileChosen = null;
64157
64621
  var chooseFile = null;
64622
+ if (!this.question.showChooseButton)
64623
+ return null;
64158
64624
  chooseFile = this.question.isReadOnly ? null : Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_5__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText },
64159
64625
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.chooseButtonText),
64160
64626
  (!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null));
64161
64627
  if (this.question.isEmpty()) {
64162
64628
  noFileChosen = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption));
64163
64629
  }
64164
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getFileDecoratorCss() },
64630
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
64165
64631
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.question.renderedPlaceholder),
64166
64632
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.wrapper },
64167
64633
  chooseFile,
64168
64634
  noFileChosen)));
64169
64635
  };
64170
64636
  SurveyQuestionFile.prototype.renderClearButton = function (className) {
64171
- return className ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("button", { type: "button", onClick: this.question.doClean, className: className },
64637
+ return !this.question.isUploading ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("button", { type: "button", onClick: this.question.doClean, className: className },
64172
64638
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.clearButtonCaption),
64173
64639
  (!!this.question.cssClasses.removeButtonIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: this.question.cssClasses.removeButtonIconId, size: "auto", title: this.question.clearButtonCaption }) : null)) : null;
64174
64640
  };
@@ -64183,7 +64649,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
64183
64649
  };
64184
64650
  SurveyQuestionFile.prototype.renderPreview = function () {
64185
64651
  var _this = this;
64186
- if (!this.question.previewValue || !this.question.previewValue.length)
64652
+ if (!this.question.allowShowPreview)
64187
64653
  return null;
64188
64654
  var previews = this.question.previewValue.map(function (val, index) {
64189
64655
  if (!val)
@@ -65102,7 +65568,7 @@ var SurveyQuestionMultipleText = /** @class */ (function (_super) {
65102
65568
  rows.push(this.renderRow(i, tableRows[i].cells, cssClasses));
65103
65569
  }
65104
65570
  }
65105
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: cssClasses.root },
65571
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getQuestionRootCss() },
65106
65572
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows)));
65107
65573
  };
65108
65574
  SurveyQuestionMultipleText.prototype.renderCell = function (cell, cssClasses, index) {
@@ -65482,7 +65948,7 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
65482
65948
  clearButton = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
65483
65949
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: function () { return _this.question.clearValue(); }, value: this.question.clearButtonCaption })));
65484
65950
  }
65485
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), role: "presentation", ref: function (fieldset) { return (_this.setControl(fieldset)); } },
65951
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy },
65486
65952
  this.question.hasColumns
65487
65953
  ? this.getColumnedBody(cssClasses)
65488
65954
  : this.getBody(cssClasses),
@@ -65641,7 +66107,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
65641
66107
  var controlLabelClass = this.question.getControlLabelClass(this.item);
65642
66108
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
65643
66109
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
65644
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass, "aria-label": this.question.getAriaItemLabel(this.item) },
66110
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
65645
66111
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-describedby": this.question.ariaDescribedBy, 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), onChange: this.handleOnChange }),
65646
66112
  this.cssClasses.materialDecorator ?
65647
66113
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
@@ -66294,8 +66760,9 @@ __webpack_require__.r(__webpack_exports__);
66294
66760
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
66295
66761
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
66296
66762
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
66297
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
66298
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
66763
+ /* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element */ "./src/react/element.tsx");
66764
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
66765
+ /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
66299
66766
  var __extends = (undefined && undefined.__extends) || (function () {
66300
66767
  var extendStatics = function (d, b) {
66301
66768
  extendStatics = Object.setPrototypeOf ||
@@ -66315,6 +66782,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
66315
66782
 
66316
66783
 
66317
66784
 
66785
+
66318
66786
  var SurveyRow = /** @class */ (function (_super) {
66319
66787
  __extends(SurveyRow, _super);
66320
66788
  function SurveyRow(props) {
@@ -66362,23 +66830,17 @@ var SurveyRow = /** @class */ (function (_super) {
66362
66830
  };
66363
66831
  SurveyRow.prototype.renderElementContent = function () {
66364
66832
  var _this = this;
66365
- var elements = this.row.visibleElements.map(function (element, index) {
66366
- var innerElement = _this.createElement(element, index);
66367
- var css = element.cssClassesValue;
66368
- var focusIn = function () {
66369
- var el = element;
66370
- if (el && el.isQuestion) {
66371
- el.focusIn();
66372
- }
66373
- };
66374
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: css.questionWrapper, style: element.rootStyle, "data-key": innerElement.key, key: innerElement.key, onFocus: focusIn }, _this.row.isNeedRender ? innerElement : _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.createElement(element.skeletonComponentName, { element: element, css: _this.css, })));
66833
+ var elements = this.row.visibleElements.map(function (element, elementIndex) {
66834
+ var index = elementIndex ? "-" + elementIndex : 0;
66835
+ var key = element.name + index;
66836
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_element__WEBPACK_IMPORTED_MODULE_2__["SurveyRowElement"], { element: element, index: elementIndex, row: _this.row, survey: _this.survey, creator: _this.creator, css: _this.css, key: key }));
66375
66837
  });
66376
66838
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { ref: this.rootRef, className: this.row.getRowCss() }, elements));
66377
66839
  };
66378
66840
  SurveyRow.prototype.renderElement = function () {
66379
66841
  var survey = this.survey;
66380
66842
  var content = this.renderElementContent();
66381
- var wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__["ReactSurveyElementsWrapper"].wrapRow(survey, content, this.row);
66843
+ var wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__["ReactSurveyElementsWrapper"].wrapRow(survey, content, this.row);
66382
66844
  return wrapper || content;
66383
66845
  };
66384
66846
  SurveyRow.prototype.componentDidMount = function () {
@@ -66413,10 +66875,10 @@ var SurveyRow = /** @class */ (function (_super) {
66413
66875
  SurveyRow.prototype.createElement = function (element, elementIndex) {
66414
66876
  var index = elementIndex ? "-" + elementIndex : 0;
66415
66877
  var elementType = element.getType();
66416
- if (!_element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.isElementRegistered(elementType)) {
66878
+ if (!_element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.isElementRegistered(elementType)) {
66417
66879
  elementType = "question";
66418
66880
  }
66419
- return _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.createElement(elementType, {
66881
+ return _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.createElement(elementType, {
66420
66882
  key: element.name + index,
66421
66883
  element: element,
66422
66884
  creator: this.creator,
@@ -68108,7 +68570,7 @@ var SurveyElementCore = /** @class */ (function (_super) {
68108
68570
  var property_1 = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].findProperty(this.getType(), "description");
68109
68571
  showPlaceholder = !!(property_1 === null || property_1 === void 0 ? void 0 : property_1.placeholder);
68110
68572
  }
68111
- this.hasDescription = !!newDescription || showPlaceholder;
68573
+ this.hasDescription = !!newDescription || (showPlaceholder && this.isDesignMode);
68112
68574
  };
68113
68575
  Object.defineProperty(SurveyElementCore.prototype, "locDescription", {
68114
68576
  get: function () {
@@ -68577,6 +69039,7 @@ var SurveyElement = /** @class */ (function (_super) {
68577
69039
  this.onSetData();
68578
69040
  }
68579
69041
  if (!!this.survey) {
69042
+ this.updateDescriptionVisibility(this.description);
68580
69043
  this.clearCssClasses();
68581
69044
  }
68582
69045
  };
@@ -69183,12 +69646,13 @@ var SurveyElement = /** @class */ (function (_super) {
69183
69646
  Object.defineProperty(SurveyElement.prototype, "rootStyle", {
69184
69647
  get: function () {
69185
69648
  var style = {};
69649
+ var minWidth = this.renderMinWidth ? this.minWidth : "min(100%, " + this.minWidth + ")";
69186
69650
  if (this.allowRootStyle && this.renderWidth) {
69187
69651
  // style["width"] = this.renderWidth;
69188
69652
  style["flexGrow"] = 1;
69189
69653
  style["flexShrink"] = 1;
69190
69654
  style["flexBasis"] = this.renderWidth;
69191
- style["minWidth"] = this.minWidth;
69655
+ style["minWidth"] = minWidth;
69192
69656
  style["maxWidth"] = this.maxWidth;
69193
69657
  }
69194
69658
  return style;
@@ -69273,6 +69737,9 @@ var SurveyElement = /** @class */ (function (_super) {
69273
69737
  __decorate([
69274
69738
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
69275
69739
  ], SurveyElement.prototype, "allowRootStyle", void 0);
69740
+ __decorate([
69741
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
69742
+ ], SurveyElement.prototype, "renderMinWidth", void 0);
69276
69743
  return SurveyElement;
69277
69744
  }(SurveyElementCore));
69278
69745
 
@@ -69658,7 +70125,7 @@ var SurveyModel = /** @class */ (function (_super) {
69658
70125
  */
69659
70126
  _this.onValidateQuestion = _this.addEvent();
69660
70127
  /**
69661
- * An event that is raised before errors are assigned to a question. You may add/remove/modify errors for a question.
70128
+ * An event that is raised before errors are assigned to a question. Use this event to add/remove/modify errors.
69662
70129
  * @see onValidateQuestion
69663
70130
  */
69664
70131
  _this.onSettingQuestionErrors = _this.addEvent();
@@ -69670,6 +70137,7 @@ var SurveyModel = /** @class */ (function (_super) {
69670
70137
  * [View Demo](https://surveyjs.io/form-library/examples/javascript-server-side-form-validation/ (linkStyle))
69671
70138
  * @see onValidateQuestion
69672
70139
  * @see onValidatePanel
70140
+ * @see isValidatingOnServer
69673
70141
  */
69674
70142
  _this.onServerValidateQuestions = _this.addEvent();
69675
70143
  /**
@@ -69683,11 +70151,11 @@ var SurveyModel = /** @class */ (function (_super) {
69683
70151
  */
69684
70152
  _this.onValidatePanel = _this.addEvent();
69685
70153
  /**
69686
- * Use the event to change the default error text.
70154
+ * An event that is raised to change default error messages.
69687
70155
  */
69688
70156
  _this.onErrorCustomText = _this.addEvent();
69689
70157
  /**
69690
- * Use the this event to be notified when the survey finished validate questions on the current page. It commonly happens when a user try to go to the next page or complete the survey
70158
+ * An event that is raised when the [current page](#currentPage) is being validated. Handle this event to be notified of current page validation.
69691
70159
  */
69692
70160
  _this.onValidatedErrorsOnCurrentPage = _this.addEvent();
69693
70161
  /**
@@ -69737,16 +70205,13 @@ var SurveyModel = /** @class */ (function (_super) {
69737
70205
  */
69738
70206
  _this.onProgressText = _this.addEvent();
69739
70207
  /**
69740
- * Use this event to process the markdown text.
70208
+ * An event that is raised to convert Markdown content to HTML.
69741
70209
  *
69742
70210
  * For information on event handler parameters, refer to descriptions within the interface.
69743
70211
  *
69744
70212
  * [View Demo](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/ (linkStyle))
69745
70213
  */
69746
70214
  _this.onTextMarkdown = _this.addEvent();
69747
- /**
69748
- * Use this event to specity render component name used for text rendering.
69749
- */
69750
70215
  _this.onTextRenderAs = _this.addEvent();
69751
70216
  /**
69752
70217
  * An event that is raised after a request to save survey results on [SurveyJS Service](https://api.surveyjs.io/) has been completed. Use this event to find out if the results have been saved successfully.
@@ -69791,21 +70256,18 @@ var SurveyModel = /** @class */ (function (_super) {
69791
70256
  */
69792
70257
  _this.onClearFiles = _this.addEvent();
69793
70258
  /**
69794
- * An event that is raised after choices for radiogroup, checkbox, and dropdown has been loaded from a RESTful service and before they are assigned to a question.
69795
- * You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results.
70259
+ * An event that is raised after choices are loaded from a server but before they are assigned to a choice-based question, such as [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) or [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model). Handle this event if you need to modify the loaded choices.
69796
70260
  */
69797
70261
  _this.onLoadChoicesFromServer = _this.addEvent();
69798
70262
  /**
69799
- * An event that is raised after survey is loaded from api.surveyjs.io service.
69800
- * You can use this event to perform manipulation with the survey model after it was loaded from the web service.
70263
+ * An event that is raised after a survey JSON schema is loaded from the [SurveyJS Service](https://api.surveyjs.io). Use this event to modify the loaded schema.
69801
70264
  * @see surveyId
70265
+ * @see clientId
69802
70266
  * @see loadSurveyFromService
69803
70267
  */
69804
70268
  _this.onLoadedSurveyFromService = _this.addEvent();
69805
70269
  /**
69806
- * An event that is raised on processing the text when it finds a text in brackets: `{somevalue}`. By default, it uses the value of survey question values and variables.
69807
- * For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}",
69808
- * you may set on this event `options.value` to "all" or empty string when the "state" value/question is non selected by a user.
70270
+ * An event that is raised when the survey processes [dynamic texts](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#dynamic-texts) and any text in curly brackets. Use this event, for instance, to substitute parameters in a RESTful URL with real values when you [load choices by URL](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl).
69809
70271
  */
69810
70272
  _this.onProcessTextValue = _this.addEvent();
69811
70273
  /**
@@ -69900,7 +70362,7 @@ var SurveyModel = /** @class */ (function (_super) {
69900
70362
  */
69901
70363
  _this.onFocusInPanel = _this.addEvent();
69902
70364
  /**
69903
- * Use this event to change the visibility of an individual choice item in [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel), and other similar question types.
70365
+ * An event that is raised before a [choice item](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices) is displayed. Use this event to change the visibility of individual choice items in [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model), [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model), [Radio Button Group](https://surveyjs.io/form-library/documentation/api-reference/radio-button-question-model), and other similar question types.
69904
70366
  */
69905
70367
  _this.onShowingChoiceItem = _this.addEvent();
69906
70368
  /**
@@ -70029,19 +70491,16 @@ var SurveyModel = /** @class */ (function (_super) {
70029
70491
  */
70030
70492
  _this.onGetDynamicPanelTabTitle = _this.addEvent();
70031
70493
  /**
70032
- * Use this event to define, whether an answer to a question is correct or not.
70033
- * @see Question.value
70034
- * @see Question.correctAnswer
70494
+ * An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
70035
70495
  */
70036
70496
  _this.onIsAnswerCorrect = _this.addEvent();
70037
70497
  /**
70038
- * Use this event to control drag&drop operations during design mode.
70039
- * @see setDesignMode
70498
+ * An event that is raised when users drag and drop survey elements while designing the survey in [Survey Creator](https://surveyjs.io/survey-creator/documentation/overview). Use this event to control drag and drop operations.
70040
70499
  * @see isDesignMode
70041
70500
  */
70042
70501
  _this.onDragDropAllow = _this.addEvent();
70043
70502
  /**
70044
- * Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true.
70503
+ * An event this is raised before a survey element (usually page) is scrolled to the top. Use this event to cancel the scroll operation.
70045
70504
  */
70046
70505
  _this.onScrollingElementToTop = _this.addEvent();
70047
70506
  _this.onLocaleChangedEvent = _this.addEvent();
@@ -70079,12 +70538,11 @@ var SurveyModel = /** @class */ (function (_super) {
70079
70538
  */
70080
70539
  _this.onGetMatrixRowActions = _this.addEvent();
70081
70540
  /**
70082
- * An event that is raised after the survey element content was collapsed or expanded.
70083
- * @see onElementContentVisibilityChanged
70541
+ * An event that is raised after a survey element is [expanded or collapsed](https://surveyjs.io/form-library/documentation/api-reference/question#state).
70084
70542
  */
70085
70543
  _this.onElementContentVisibilityChanged = _this.addEvent();
70086
70544
  /**
70087
- * An event that is raised before expression question convert it's value into display value for rendering.
70545
+ * An event that is raised before an [Expression](https://surveyjs.io/form-library/documentation/api-reference/expression-model) question displays a value. Use this event to override the display value.
70088
70546
  */
70089
70547
  _this.onGetExpressionDisplayValue = _this.addEvent();
70090
70548
  /**
@@ -70092,13 +70550,16 @@ var SurveyModel = /** @class */ (function (_super) {
70092
70550
  */
70093
70551
  _this.onPopupVisibleChanged = _this.addEvent();
70094
70552
  /**
70095
- * The list of errors on loading survey JSON. If the list is empty after loading a JSON, then the JSON is correct and has no errors.
70096
- * @see JsonError
70553
+ * A list of errors in a survey JSON schema.
70554
+ * @see ensureUniqueNames
70097
70555
  */
70098
70556
  _this.jsonErrors = null;
70099
70557
  _this.cssValue = null;
70100
70558
  /**
70101
- * Gets or sets whether to hide all required errors.
70559
+ * Specifies whether to hide validation errors thrown by the Required validation in the UI.
70560
+ *
70561
+ * [Built-In Client-Side Validators](https://surveyjs.io/form-library/documentation/data-validation#built-in-client-side-validators (linkStyle))
70562
+ * @see ignoreValidation
70102
70563
  */
70103
70564
  _this.hideRequiredErrors = false;
70104
70565
  //#endregion
@@ -70107,10 +70568,13 @@ var SurveyModel = /** @class */ (function (_super) {
70107
70568
  _this._isCompact = false;
70108
70569
  _this._isDesignMode = false;
70109
70570
  /**
70110
- * Gets or sets whether the survey must ignore validation like required questions and others, on `nextPage` and `completeLastPage` function calls. The default is `false`.
70571
+ * Specifies whether to skip validation when you switch between pages or complete the survey programmatically or when users do that in the UI.
70572
+ *
70573
+ * Default value: `false`
70574
+ * @see hideRequiredErrors
70111
70575
  * @see nextPage
70576
+ * @see isPrevPage
70112
70577
  * @see completeLastPage
70113
- * @see mode
70114
70578
  */
70115
70579
  _this.ignoreValidation = false;
70116
70580
  _this.isNavigationButtonPressed = false;
@@ -70151,10 +70615,6 @@ var SurveyModel = /** @class */ (function (_super) {
70151
70615
  _this.createLocalizableString("previewText", _this, false, true);
70152
70616
  _this.createLocalizableString("editText", _this, false, true);
70153
70617
  _this.createLocalizableString("questionTitleTemplate", _this, true);
70154
- _this.textPreProcessor = new _textPreProcessor__WEBPACK_IMPORTED_MODULE_5__["TextPreProcessor"]();
70155
- _this.textPreProcessor.onProcess = function (textValue) {
70156
- _this.getProcessedTextValue(textValue);
70157
- };
70158
70618
  _this.timerModelValue = new _surveyTimerModel__WEBPACK_IMPORTED_MODULE_12__["SurveyTimerModel"](_this);
70159
70619
  _this.timerModelValue.onTimer = function (page) {
70160
70620
  _this.doTimer(page);
@@ -70552,11 +71012,15 @@ var SurveyModel = /** @class */ (function (_super) {
70552
71012
  };
70553
71013
  Object.defineProperty(SurveyModel.prototype, "lazyRendering", {
70554
71014
  /**
70555
- * By default all rows are rendered no matters if they are visible or not.
70556
- * Set it true, and survey markup rows will be rendered only if they are visible in viewport.
70557
- * This feature is experimantal and might do not support all the use cases.
71015
+ * Specifies whether to enable lazy rendering.
71016
+ *
71017
+ * In default mode, a survey renders the entire current page. With lazy rendering, the survey renders the page gradually as a user scrolls it. This helps reduce survey startup time and oprimizes large surveys for low-end devices.
71018
+ *
71019
+ * Default value: `false`
70558
71020
  *
70559
71021
  * [View Demo](https://surveyjs.io/form-library/examples/survey-lazy/ (linkStyle))
71022
+ *
71023
+ * > This is an experimental feature that may not work properly in certain cases.
70560
71024
  */
70561
71025
  get: function () {
70562
71026
  return this.lazyRenderingValue === true;
@@ -70673,7 +71137,7 @@ var SurveyModel = /** @class */ (function (_super) {
70673
71137
  * A cookie name used to save information about survey completion.
70674
71138
  *
70675
71139
  * When this property has a value, the survey creates a cookie with the specified name on completion. This cookie helps ensure that users do not pass the same survey twice. On the second run, they will see the [Completed Before page](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedBeforeHtml).
70676
- * @see cliendId
71140
+ * @see clientId
70677
71141
  */
70678
71142
  get: function () {
70679
71143
  return this.getPropertyValue("cookieName", "");
@@ -70701,7 +71165,9 @@ var SurveyModel = /** @class */ (function (_super) {
70701
71165
  });
70702
71166
  Object.defineProperty(SurveyModel.prototype, "surveyShowDataSaving", {
70703
71167
  /**
70704
- * Gets or sets whether to show the progress on saving/sending data into the [api.surveyjs.io](https://api.surveyjs.io) service.
71168
+ * Specifies whether to show progress when the survey sends data to [SurveyJS Service](https://api.surveyjs.io).
71169
+ *
71170
+ * [View Demo](https://surveyjs.io/form-library/examples/save-survey-results-and-load-surveys-from-surveyjs-service/ (linkStyle))
70705
71171
  * @see surveyPostId
70706
71172
  */
70707
71173
  get: function () {
@@ -70923,10 +71389,11 @@ var SurveyModel = /** @class */ (function (_super) {
70923
71389
  };
70924
71390
  Object.defineProperty(SurveyModel.prototype, "requiredText", {
70925
71391
  /**
70926
- * Gets or sets the required question mark. The required question mark is a char or string that is rendered in the required questions' titles.
70927
- * @see Question.title
71392
+ * Specifies one or multiple characters that designate required questions.
71393
+ *
71394
+ * Default value: `*`
70928
71395
  *
70929
- * [View Demo](https://surveyjs.io/form-library/examples/survey-processtext/ (linkStyle))
71396
+ * [View Demo](https://surveyjs.io/form-library/examples/modify-question-title/ (linkStyle))
70930
71397
  */
70931
71398
  get: function () {
70932
71399
  return this.getPropertyValue("requiredText", "*");
@@ -70938,16 +71405,16 @@ var SurveyModel = /** @class */ (function (_super) {
70938
71405
  configurable: true
70939
71406
  });
70940
71407
  SurveyModel.prototype.beforeSettingQuestionErrors = function (question, errors) {
70941
- this.maakeRequiredErrorsInvisibgle(errors);
71408
+ this.makeRequiredErrorsInvisible(errors);
70942
71409
  this.onSettingQuestionErrors.fire(this, {
70943
71410
  question: question,
70944
71411
  errors: errors,
70945
71412
  });
70946
71413
  };
70947
71414
  SurveyModel.prototype.beforeSettingPanelErrors = function (question, errors) {
70948
- this.maakeRequiredErrorsInvisibgle(errors);
71415
+ this.makeRequiredErrorsInvisible(errors);
70949
71416
  };
70950
- SurveyModel.prototype.maakeRequiredErrorsInvisibgle = function (errors) {
71417
+ SurveyModel.prototype.makeRequiredErrorsInvisible = function (errors) {
70951
71418
  if (!this.hideRequiredErrors)
70952
71419
  return;
70953
71420
  for (var i = 0; i < errors.length; i++) {
@@ -71119,14 +71586,16 @@ var SurveyModel = /** @class */ (function (_super) {
71119
71586
  });
71120
71587
  Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
71121
71588
  /**
71122
- * Gets or sets a value that specifies how the survey updates its questions' text values.
71589
+ * Specifies when to update the question value in questions with a text input field.
71123
71590
  *
71124
- * The following options are available:
71591
+ * Possible values:
71125
71592
  *
71126
- * - `onBlur` (default) - the value is updated after an input loses the focus.
71127
- * - `onTyping` - update the value of text questions, "text" and "comment", on every key press.
71593
+ * - `"onBlur"` (default) - Updates the value after the input field loses focus.
71594
+ * - `"onTyping"` - Updates the value on every key press.
71595
+ *
71596
+ * > Do not use the `"onTyping"` mode if your survey contains many expressions. Expressions are reevaluated each time a question value is changed. In `"onTyping"` mode, the question value changes frequently. This may cause performance degradation.
71128
71597
  *
71129
- * Note, that setting to "onTyping" may lead to a performance degradation, in case you have many expressions in the survey.
71598
+ * You can override this setting for individual questions: [`textUpdateMode`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#textUpdateMode).
71130
71599
  */
71131
71600
  get: function () {
71132
71601
  return this.getPropertyValue("textUpdateMode");
@@ -71607,15 +72076,15 @@ var SurveyModel = /** @class */ (function (_super) {
71607
72076
  });
71608
72077
  SurveyModel.prototype.setIsMobile = function (newVal) {
71609
72078
  if (newVal === void 0) { newVal = true; }
71610
- if (this.isMobile !== newVal) {
72079
+ if (this._isMobile !== newVal) {
71611
72080
  this._isMobile = newVal;
71612
72081
  this.updateCss();
71613
- this.getAllQuestions().map(function (q) { return q.isMobile = newVal; });
72082
+ this.getAllQuestions().map(function (q) { return q.setIsMobile(newVal); });
71614
72083
  }
71615
72084
  };
71616
72085
  Object.defineProperty(SurveyModel.prototype, "isMobile", {
71617
72086
  get: function () {
71618
- return this._isMobile;
72087
+ return this._isMobile && !this.isDesignMode;
71619
72088
  },
71620
72089
  enumerable: false,
71621
72090
  configurable: true
@@ -71722,8 +72191,8 @@ var SurveyModel = /** @class */ (function (_super) {
71722
72191
  configurable: true
71723
72192
  });
71724
72193
  /**
71725
- * Calculates a given expression and returns a result value.
71726
- * @param expression
72194
+ * Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns a result value.
72195
+ * @param expression An expression to calculate.
71727
72196
  */
71728
72197
  SurveyModel.prototype.runExpression = function (expression) {
71729
72198
  if (!expression)
@@ -71733,8 +72202,8 @@ var SurveyModel = /** @class */ (function (_super) {
71733
72202
  return new _conditions__WEBPACK_IMPORTED_MODULE_13__["ExpressionRunner"](expression).run(values, properties);
71734
72203
  };
71735
72204
  /**
71736
- * Calculates a given expression and returns `true` or `false`.
71737
- * @param expression
72205
+ * Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
72206
+ * @param expression An expression to calculate.
71738
72207
  */
71739
72208
  SurveyModel.prototype.runCondition = function (expression) {
71740
72209
  if (!expression)
@@ -71774,9 +72243,7 @@ var SurveyModel = /** @class */ (function (_super) {
71774
72243
  };
71775
72244
  Object.defineProperty(SurveyModel.prototype, "completedBeforeHtml", {
71776
72245
  /**
71777
- * HTML content displayed to a user who has completed the survey before.
71778
- * @see clientId
71779
- * @see cookieName
72246
+ * HTML content displayed to a user who has completed the survey before. To identify such users, the survey uses a [cookie name](#cookieName) or [client ID](#clientId).
71780
72247
  * @see processedCompletedBeforeHtml
71781
72248
  */
71782
72249
  get: function () {
@@ -72176,16 +72643,18 @@ var SurveyModel = /** @class */ (function (_super) {
72176
72643
  });
72177
72644
  Object.defineProperty(SurveyModel.prototype, "showProgressBar", {
72178
72645
  /**
72179
- * Gets or sets the survey progress bar position.
72646
+ * Controls the visibility of the progress bar and specifies its position.
72180
72647
  *
72181
- * The following options are available:
72648
+ * Possible values:
72182
72649
  *
72183
- * - `off` (default) - don't show progress bar
72184
- * - `top` - show progress bar in the top
72185
- * - `bottom` - show progress bar in the bottom
72186
- * - `both` - show progress bar in both sides: top and bottom.
72650
+ * - `"off"` (default) - Hides the progress bar.
72651
+ * - `"top"` - Displays the progress bar above survey content.
72652
+ * - `"bottom"` - Displays the progress bar below survey content.
72653
+ * - `"both"` - Displays the progress bar above and below survey content.
72187
72654
  *
72188
72655
  * [View Demo](https://surveyjs.io/form-library/examples/navigation-default/ (linkStyle))
72656
+ * @see progressBarType
72657
+ * @see progressValue
72189
72658
  */
72190
72659
  get: function () {
72191
72660
  return this.getPropertyValue("showProgressBar");
@@ -72198,17 +72667,18 @@ var SurveyModel = /** @class */ (function (_super) {
72198
72667
  });
72199
72668
  Object.defineProperty(SurveyModel.prototype, "progressBarType", {
72200
72669
  /**
72201
- * Gets or sets the type of info in the progress bar.
72670
+ * Specifies the type of information displayed by the progress bar. Applies only when [`showProgressBar`](#showProgressBar) is not `"off"`.
72202
72671
  *
72203
- * The following options are available:
72672
+ * Possible values:
72204
72673
  *
72205
- * - `pages` (default),
72206
- * - `questions`,
72207
- * - `requiredQuestions`,
72208
- * - `correctQuestions`,
72209
- * - `buttons`
72674
+ * - `"pages"` (default) - The number of completed pages.
72675
+ * - `"questions"` - The number of answered questions.
72676
+ * - `"requiredQuestions"` - The number of answered [required questions](https://surveyjs.io/form-library/documentation/api-reference/question#isRequired).
72677
+ * - `"correctQuestions"` - The number of correct questions in a [quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
72678
+ * - `"buttons"` - Adds jump links to the progress bar.
72210
72679
  *
72211
72680
  * [View Demo](https://surveyjs.io/form-library/examples/navigation-buttons/ (linkStyle))
72681
+ * @see progressValue
72212
72682
  */
72213
72683
  get: function () {
72214
72684
  return this.getPropertyValue("progressBarType");
@@ -72336,12 +72806,12 @@ var SurveyModel = /** @class */ (function (_super) {
72336
72806
  });
72337
72807
  Object.defineProperty(SurveyModel.prototype, "mode", {
72338
72808
  /**
72339
- * Gets or sets the survey edit mode.
72809
+ * Specifies whether users can take the survey or only view it.
72340
72810
  *
72341
- * The following options are available:
72811
+ * Possible values:
72342
72812
  *
72343
- * - `edit` (default) - make a survey editable,
72344
- * - `display` - make a survey read-only.
72813
+ * - `"edit"` (default) - Allows users to take the survey.
72814
+ * - `"display"` - Makes the survey read-only.
72345
72815
  *
72346
72816
  * [View Demo](https://surveyjs.io/form-library/examples/survey-displaymode/ (linkStyle))
72347
72817
  */
@@ -72710,7 +73180,8 @@ var SurveyModel = /** @class */ (function (_super) {
72710
73180
  };
72711
73181
  Object.defineProperty(SurveyModel.prototype, "isEmpty", {
72712
73182
  /**
72713
- * Returns `true` if the survey contains no pages. The survey is empty.
73183
+ * Returns `true` if the survey contains zero pages.
73184
+ * @see emptySurveyText
72714
73185
  */
72715
73186
  get: function () {
72716
73187
  return this.pages.length == 0;
@@ -72878,9 +73349,6 @@ var SurveyModel = /** @class */ (function (_super) {
72878
73349
  configurable: true
72879
73350
  });
72880
73351
  Object.defineProperty(SurveyModel.prototype, "isShowingPage", {
72881
- /**
72882
- * Survey is showing a page right now. It is in "running", "preview" or starting state.
72883
- */
72884
73352
  get: function () {
72885
73353
  return this.state == "running" || this.state == "preview" || this.isShowStartingPage;
72886
73354
  },
@@ -73180,12 +73648,6 @@ var SurveyModel = /** @class */ (function (_super) {
73180
73648
  isAfterPreview: this.changeCurrentPageFromPreview === true
73181
73649
  };
73182
73650
  };
73183
- /**
73184
- * Returns the progress that a user made while going through the survey.
73185
- * It depends from progressBarType property
73186
- * @see progressBarType
73187
- * @see progressValue
73188
- */
73189
73651
  SurveyModel.prototype.getProgress = function () {
73190
73652
  if (this.currentPage == null)
73191
73653
  return 0;
@@ -73207,9 +73669,10 @@ var SurveyModel = /** @class */ (function (_super) {
73207
73669
  };
73208
73670
  Object.defineProperty(SurveyModel.prototype, "progressValue", {
73209
73671
  /**
73210
- * Returns the progress that a user made while going through the survey.
73211
- * It depends from progressBarType property
73672
+ * Returns a percentage value that indicates user progress in the survey.
73673
+ * @see showProgressBar
73212
73674
  * @see progressBarType
73675
+ * @see progressText
73213
73676
  */
73214
73677
  get: function () {
73215
73678
  return this.getPropertyValue("progressValue", 0);
@@ -73218,9 +73681,6 @@ var SurveyModel = /** @class */ (function (_super) {
73218
73681
  configurable: true
73219
73682
  });
73220
73683
  Object.defineProperty(SurveyModel.prototype, "isNavigationButtonsShowing", {
73221
- /**
73222
- * Returns the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') position.
73223
- */
73224
73684
  get: function () {
73225
73685
  if (this.isDesignMode)
73226
73686
  return "none";
@@ -73239,9 +73699,6 @@ var SurveyModel = /** @class */ (function (_super) {
73239
73699
  configurable: true
73240
73700
  });
73241
73701
  Object.defineProperty(SurveyModel.prototype, "isNavigationButtonsShowingOnTop", {
73242
- /**
73243
- * Returns true if the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') are shows on top.
73244
- */
73245
73702
  get: function () {
73246
73703
  return this.getIsNavigationButtonsShowingOn("top");
73247
73704
  },
@@ -73249,9 +73706,6 @@ var SurveyModel = /** @class */ (function (_super) {
73249
73706
  configurable: true
73250
73707
  });
73251
73708
  Object.defineProperty(SurveyModel.prototype, "isNavigationButtonsShowingOnBottom", {
73252
- /**
73253
- * Returns true if the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') are shows on bottom.
73254
- */
73255
73709
  get: function () {
73256
73710
  return this.getIsNavigationButtonsShowingOn("bottom");
73257
73711
  },
@@ -73263,10 +73717,6 @@ var SurveyModel = /** @class */ (function (_super) {
73263
73717
  return res == "both" || res == buttonPosition;
73264
73718
  };
73265
73719
  Object.defineProperty(SurveyModel.prototype, "isEditMode", {
73266
- /**
73267
- * Returns `true` if the survey is in edit mode.
73268
- * @see mode
73269
- */
73270
73720
  get: function () {
73271
73721
  return this.mode == "edit";
73272
73722
  },
@@ -73274,11 +73724,6 @@ var SurveyModel = /** @class */ (function (_super) {
73274
73724
  configurable: true
73275
73725
  });
73276
73726
  Object.defineProperty(SurveyModel.prototype, "isDisplayMode", {
73277
- /**
73278
- * Returns `true` if the survey is in display mode or in preview mode.
73279
- * @see mode
73280
- * @see showPreviewBeforeComplete
73281
- */
73282
73727
  get: function () {
73283
73728
  return this.mode == "display" || this.state == "preview";
73284
73729
  },
@@ -73294,8 +73739,7 @@ var SurveyModel = /** @class */ (function (_super) {
73294
73739
  });
73295
73740
  Object.defineProperty(SurveyModel.prototype, "isDesignMode", {
73296
73741
  /**
73297
- * Returns `true` if the survey is in design mode. It is used by SurveyJS Editor.
73298
- * @see setDesignMode
73742
+ * Indicates whether the survey is being designed in [Survey Creator](https://surveyjs.io/survey-creator/documentation/overview).
73299
73743
  */
73300
73744
  get: function () {
73301
73745
  return this._isDesignMode;
@@ -73303,10 +73747,6 @@ var SurveyModel = /** @class */ (function (_super) {
73303
73747
  enumerable: false,
73304
73748
  configurable: true
73305
73749
  });
73306
- /**
73307
- * Sets the survey into design mode.
73308
- * @param value use true to set the survey into the design mode.
73309
- */
73310
73750
  SurveyModel.prototype.setDesignMode = function (value) {
73311
73751
  if (!!this._isDesignMode != !!value) {
73312
73752
  this._isDesignMode = !!value;
@@ -73315,7 +73755,9 @@ var SurveyModel = /** @class */ (function (_super) {
73315
73755
  };
73316
73756
  Object.defineProperty(SurveyModel.prototype, "showInvisibleElements", {
73317
73757
  /**
73318
- * Gets or sets whether to show all elements in the survey, regardless their visibility. The default value is `false`.
73758
+ * Specifies whether to show all survey elements, regardless of their visibility.
73759
+ *
73760
+ * Default value: `false`
73319
73761
  */
73320
73762
  get: function () {
73321
73763
  return this.getPropertyValue("showInvisibleElements", false);
@@ -73407,13 +73849,11 @@ var SurveyModel = /** @class */ (function (_super) {
73407
73849
  document.cookie = this.cookieName + "=;";
73408
73850
  };
73409
73851
  /**
73410
- * Navigates user to the next page.
73411
- *
73412
- * Returns `false` in the following cases:
73852
+ * Switches the survey to the next page.
73413
73853
  *
73414
- * - if the current page is the last page.
73415
- * - if the current page contains errors (for example, a required question is empty).
73416
- * @see isCurrentPageValid
73854
+ * This method returns a Boolean value that indicates whether the page was successfully switched. `false` is returned if the current page is the last page or if it contains validation errors.
73855
+ * @returns `true` if the page was successfully switched; `false` otherwise.
73856
+ * @see isLastPage
73417
73857
  * @see prevPage
73418
73858
  * @see completeLastPage
73419
73859
  */
@@ -73597,12 +74037,6 @@ var SurveyModel = /** @class */ (function (_super) {
73597
74037
  ? undefined
73598
74038
  : true;
73599
74039
  };
73600
- /**
73601
- * Checks whether survey elements (pages, panels, and questions) have unique question names.
73602
- * You can check for unique names for individual page and panel (and all their elements) or a question.
73603
- * If the parameter is not specified, then a survey checks that all its elements have unique names.
73604
- * @param element page, panel or question, it is `null` by default, that means all survey elements will be checked
73605
- */
73606
74040
  SurveyModel.prototype.ensureUniqueNames = function (element) {
73607
74041
  if (element === void 0) { element = null; }
73608
74042
  if (element == null) {
@@ -73709,8 +74143,12 @@ var SurveyModel = /** @class */ (function (_super) {
73709
74143
  });
73710
74144
  };
73711
74145
  /**
73712
- * Navigates user to a previous page. If the current page is the first page, `prevPage` returns `false`. `prevPage` does not perform any checks, required questions can be empty.
74146
+ * Switches the survey to the previous page.
74147
+ *
74148
+ * This method returns a Boolean value that indicates whether the page was successfully switched. `false` is returned if the current page is the first page.
74149
+ * @returns `true` if the page was successfully switched; `false` otherwise.
73713
74150
  * @see isFirstPage
74151
+ * @see nextPage
73714
74152
  */
73715
74153
  SurveyModel.prototype.prevPage = function () {
73716
74154
  var _this = this;
@@ -74036,7 +74474,9 @@ var SurveyModel = /** @class */ (function (_super) {
74036
74474
  };
74037
74475
  Object.defineProperty(SurveyModel.prototype, "isFirstPage", {
74038
74476
  /**
74039
- * Gets whether the current page is the first one.
74477
+ * Indicates whether the [current page](#currentPage) is the first page.
74478
+ *
74479
+ * > If the survey displays the [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page), this property contains `false`. Use the [`isShowStartingPage`](#isShowStartingPage) property to find out whether the start page is currently displayed.
74040
74480
  */
74041
74481
  get: function () {
74042
74482
  return this.getPropertyValue("isFirstPage");
@@ -74046,7 +74486,7 @@ var SurveyModel = /** @class */ (function (_super) {
74046
74486
  });
74047
74487
  Object.defineProperty(SurveyModel.prototype, "isLastPage", {
74048
74488
  /**
74049
- * Gets whether the current page is the last one.
74489
+ * Indicates whether the [current page](#currentPage) is the last page.
74050
74490
  */
74051
74491
  get: function () {
74052
74492
  return this.getPropertyValue("isLastPage");
@@ -74236,8 +74676,9 @@ var SurveyModel = /** @class */ (function (_super) {
74236
74676
  return options.allowComplete && options.allow;
74237
74677
  };
74238
74678
  /**
74239
- * Starts the survey. Changes the survey mode from "starting" to "running". Call this function if your survey has a start page, otherwise this function does nothing.
74679
+ * Starts the survey. Applies only if the survey has a [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
74240
74680
  * @see firstPageIsStarted
74681
+ * @see completeLastPage
74241
74682
  */
74242
74683
  SurveyModel.prototype.start = function () {
74243
74684
  if (!this.firstPageIsStarted)
@@ -74256,8 +74697,7 @@ var SurveyModel = /** @class */ (function (_super) {
74256
74697
  };
74257
74698
  Object.defineProperty(SurveyModel.prototype, "isValidatingOnServer", {
74258
74699
  /**
74259
- * Gets whether the question values on the current page are validating on the server at the current moment.
74260
- * @see onServerValidateQuestions
74700
+ * Indicates whether the current page is being [validated on a server](#onServerValidateQuestions).
74261
74701
  */
74262
74702
  get: function () {
74263
74703
  return this.getPropertyValue("isValidatingOnServer", false);
@@ -74380,13 +74820,14 @@ var SurveyModel = /** @class */ (function (_super) {
74380
74820
  this.doComplete(true, trigger);
74381
74821
  };
74382
74822
  SurveyModel.prototype.canBeCompleted = function (trigger, isCompleted) {
74823
+ var _a;
74383
74824
  if (!_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].triggers.changeNavigationButtonsOnComplete)
74384
74825
  return;
74385
74826
  var prevCanBeCompleted = this.canBeCompletedByTrigger;
74386
74827
  if (!this.completedByTriggers)
74387
74828
  this.completedByTriggers = {};
74388
74829
  if (isCompleted) {
74389
- this.completedByTriggers[trigger.id] = trigger;
74830
+ this.completedByTriggers[trigger.id] = { trigger: trigger, pageId: (_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.id };
74390
74831
  }
74391
74832
  else {
74392
74833
  delete this.completedByTriggers[trigger.id];
@@ -74397,9 +74838,20 @@ var SurveyModel = /** @class */ (function (_super) {
74397
74838
  };
74398
74839
  Object.defineProperty(SurveyModel.prototype, "canBeCompletedByTrigger", {
74399
74840
  get: function () {
74841
+ var _a;
74400
74842
  if (!this.completedByTriggers)
74401
74843
  return false;
74402
- return Object.keys(this.completedByTriggers).length > 0;
74844
+ var keys = Object.keys(this.completedByTriggers);
74845
+ if (keys.length === 0)
74846
+ return false;
74847
+ var id = (_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.id;
74848
+ if (!id)
74849
+ return true;
74850
+ for (var i = 0; i < keys.length; i++) {
74851
+ if (id === this.completedByTriggers[keys[i]].pageId)
74852
+ return true;
74853
+ }
74854
+ return false;
74403
74855
  },
74404
74856
  enumerable: false,
74405
74857
  configurable: true
@@ -74409,15 +74861,16 @@ var SurveyModel = /** @class */ (function (_super) {
74409
74861
  if (!this.canBeCompletedByTrigger)
74410
74862
  return undefined;
74411
74863
  var key = Object.keys(this.completedByTriggers)[0];
74412
- return this.completedByTriggers[key];
74864
+ return this.completedByTriggers[key].trigger;
74413
74865
  },
74414
74866
  enumerable: false,
74415
74867
  configurable: true
74416
74868
  });
74417
74869
  Object.defineProperty(SurveyModel.prototype, "processedCompletedHtml", {
74418
74870
  /**
74419
- * Returns the HTML content for the complete page.
74420
- * @see completedHtml
74871
+ * Returns HTML content displayed on the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
74872
+ *
74873
+ * To specify HTML content, use the [`completedHtml`](#completedHtml) property.
74421
74874
  */
74422
74875
  get: function () {
74423
74876
  var html = this.renderedCompletedHtml;
@@ -74428,9 +74881,9 @@ var SurveyModel = /** @class */ (function (_super) {
74428
74881
  });
74429
74882
  Object.defineProperty(SurveyModel.prototype, "processedCompletedBeforeHtml", {
74430
74883
  /**
74431
- * Returns the HTML content, that is shown to a user that had completed the survey before.
74432
- * @see completedHtml
74433
- * @see cookieName
74884
+ * Returns HTML content displayed to a user who has completed the survey before. To identify such users, the survey uses a [cookie name](#cookieName) or [client ID](#clientId).
74885
+ *
74886
+ * To specify HTML content, use the [`completedBeforeHtml`](#completedBeforeHtml) property.
74434
74887
  */
74435
74888
  get: function () {
74436
74889
  return this.locCompletedBeforeHtml.textOrHtml;
@@ -74440,7 +74893,9 @@ var SurveyModel = /** @class */ (function (_super) {
74440
74893
  });
74441
74894
  Object.defineProperty(SurveyModel.prototype, "processedLoadingHtml", {
74442
74895
  /**
74443
- * Returns the HTML content, that is shows when a survey loads the survey JSON.
74896
+ * Returns HTML content displayed while a survey JSON schema is being loaded from [SurveyJS Service](https://api.surveyjs.io).
74897
+ *
74898
+ * To specify HTML content, use the [`loadingHtml`](#loadingHtml) property.
74444
74899
  */
74445
74900
  get: function () {
74446
74901
  return this.locLoadingHtml.textOrHtml;
@@ -74454,7 +74909,10 @@ var SurveyModel = /** @class */ (function (_super) {
74454
74909
  };
74455
74910
  Object.defineProperty(SurveyModel.prototype, "progressText", {
74456
74911
  /**
74457
- * Returns the text for the current progress.
74912
+ * Returns text displayed by the progress bar (for instance, "Page 2 of 3" or "Answered 3/8 questions"). Handle the [`onProgressText`](#onProgressText) event to change this text.
74913
+ * @see progressValue
74914
+ * @see showProgressBar
74915
+ * @see progressBarType
74458
74916
  */
74459
74917
  get: function () {
74460
74918
  var res = this.getPropertyValue("progressText", "");
@@ -74543,13 +75001,15 @@ var SurveyModel = /** @class */ (function (_super) {
74543
75001
  var mobileWidth_1 = Number.parseFloat(window.getComputedStyle(observedElement).getPropertyValue(cssVariables.mobileWidth));
74544
75002
  if (!!mobileWidth_1) {
74545
75003
  var isProcessed_1 = false;
74546
- this.resizeObserver = new ResizeObserver(function () {
74547
- if (isProcessed_1 || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["isContainerVisible"])(observedElement)) {
74548
- isProcessed_1 = false;
74549
- }
74550
- else {
74551
- isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
74552
- }
75004
+ this.resizeObserver = new ResizeObserver(function (entries) {
75005
+ window.requestAnimationFrame(function () {
75006
+ if (isProcessed_1 || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_15__["isContainerVisible"])(observedElement)) {
75007
+ isProcessed_1 = false;
75008
+ }
75009
+ else {
75010
+ isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
75011
+ }
75012
+ });
74553
75013
  });
74554
75014
  this.resizeObserver.observe(observedElement);
74555
75015
  }
@@ -75075,8 +75535,16 @@ var SurveyModel = /** @class */ (function (_super) {
75075
75535
  return page;
75076
75536
  };
75077
75537
  /**
75078
- * Removes a page from a survey.
75079
- * @param page
75538
+ * Removes a page from the survey.
75539
+ *
75540
+ * Pass a `PageModel` object to this method. You can get this object in different ways. For example, you can call the [`getPageByName()`](#getPageByName) method to obtain a `PageModel` object with a specific name or use the [`currentPage`](#currentPage) property to access and delete the current page, as shown in the code below.
75541
+ *
75542
+ * ```js
75543
+ * // Delete the current page
75544
+ * survey.removePage(survey.currentPage);
75545
+ * ```
75546
+ * @param page A page to remove.
75547
+ * @see addNewPage
75080
75548
  */
75081
75549
  SurveyModel.prototype.removePage = function (page) {
75082
75550
  var index = this.pages.indexOf(page);
@@ -75388,7 +75856,7 @@ var SurveyModel = /** @class */ (function (_super) {
75388
75856
  }
75389
75857
  return res;
75390
75858
  };
75391
- SurveyModel.prototype.notifyQuestionOnValueChanged = function (valueName, newValue) {
75859
+ SurveyModel.prototype.notifyQuestionOnValueChanged = function (valueName, newValue, questionName) {
75392
75860
  if (this.isLoadingFromJson)
75393
75861
  return;
75394
75862
  var questions = this.getQuestionsByValueName(valueName);
@@ -75414,7 +75882,7 @@ var SurveyModel = /** @class */ (function (_super) {
75414
75882
  if (this.isDisposed)
75415
75883
  return;
75416
75884
  this.checkElementsBindings(valueName, newValue);
75417
- this.notifyElementsOnAnyValueOrVariableChanged(valueName);
75885
+ this.notifyElementsOnAnyValueOrVariableChanged(valueName, questionName);
75418
75886
  };
75419
75887
  SurveyModel.prototype.checkElementsBindings = function (valueName, newValue) {
75420
75888
  this.isRunningElementsBindings = true;
@@ -75427,7 +75895,7 @@ var SurveyModel = /** @class */ (function (_super) {
75427
75895
  this.updateVisibleIndexAfterBindings = false;
75428
75896
  }
75429
75897
  };
75430
- SurveyModel.prototype.notifyElementsOnAnyValueOrVariableChanged = function (name) {
75898
+ SurveyModel.prototype.notifyElementsOnAnyValueOrVariableChanged = function (name, questionName) {
75431
75899
  if (this.isEndLoadingFromJson === "processing")
75432
75900
  return;
75433
75901
  if (this.isRunningConditions) {
@@ -75435,7 +75903,7 @@ var SurveyModel = /** @class */ (function (_super) {
75435
75903
  return;
75436
75904
  }
75437
75905
  for (var i = 0; i < this.pages.length; i++) {
75438
- this.pages[i].onAnyValueChanged(name);
75906
+ this.pages[i].onAnyValueChanged(name, questionName);
75439
75907
  }
75440
75908
  if (!this.isEndLoadingFromJson) {
75441
75909
  this.locStrsChanged();
@@ -75664,26 +76132,23 @@ var SurveyModel = /** @class */ (function (_super) {
75664
76132
  });
75665
76133
  };
75666
76134
  /**
75667
- * Loads the survey JSON from the [api.surveyjs.io](https://api.surveyjs.io) service.
75668
- * If `clientId` is not `null` and a user had completed a survey before, the survey switches to `completedbefore` state.
75669
- * @param surveyId [api.surveyjs.io](https://api.surveyjs.io) service surveyId
75670
- * @param clientId users' indentifier, for example an e-mail or a unique customer id in your web application.
75671
- * @see state
75672
- * @see onLoadedSurveyFromService
76135
+ * Loads a survey JSON schema from the [SurveyJS Service](https://api.surveyjs.io). You can handle the [`onLoadedSurveyFromService`](#onLoadedSurveyFromService) event to modify the schema after loading if required.
76136
+ * @param surveyId The identifier of a survey JSON schema to load. Refer to the following help topic for more information: [Store Survey Results in the SurveyJS Service](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-the-surveyjs-service).
76137
+ * @param clientId A user identifier (e-mail or other unique ID) used to determine whether the user has already taken the survey.
75673
76138
  */
75674
- SurveyModel.prototype.loadSurveyFromService = function (surveyId, cliendId) {
76139
+ SurveyModel.prototype.loadSurveyFromService = function (surveyId, clientId) {
75675
76140
  if (surveyId === void 0) { surveyId = null; }
75676
- if (cliendId === void 0) { cliendId = null; }
76141
+ if (clientId === void 0) { clientId = null; }
75677
76142
  if (surveyId) {
75678
76143
  this.surveyId = surveyId;
75679
76144
  }
75680
- if (cliendId) {
75681
- this.clientId = cliendId;
76145
+ if (clientId) {
76146
+ this.clientId = clientId;
75682
76147
  }
75683
76148
  var self = this;
75684
76149
  this.isLoading = true;
75685
76150
  this.onLoadingSurveyFromService();
75686
- if (cliendId) {
76151
+ if (clientId) {
75687
76152
  this.createSurveyService().getSurveyJsonAndIsCompleted(this.surveyId, this.clientId, function (success, json, isCompleted, response) {
75688
76153
  self.isLoading = false;
75689
76154
  if (success) {
@@ -76099,7 +76564,7 @@ var SurveyModel = /** @class */ (function (_super) {
76099
76564
  * @see data
76100
76565
  * @see getValue
76101
76566
  */
76102
- SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged) {
76567
+ SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
76103
76568
  if (locNotification === void 0) { locNotification = false; }
76104
76569
  if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
76105
76570
  var newValue = newQuestionValue;
@@ -76121,7 +76586,7 @@ var SurveyModel = /** @class */ (function (_super) {
76121
76586
  newValue = this.getUnbindValue(newValue);
76122
76587
  this.setDataValueCore(this.valuesHash, name, newValue);
76123
76588
  }
76124
- this.updateOnSetValue(name, newValue, oldValue, locNotification, allowNotifyValueChanged);
76589
+ this.updateOnSetValue(name, newValue, oldValue, locNotification, allowNotifyValueChanged, questionName);
76125
76590
  };
76126
76591
  SurveyModel.prototype.isValueEmpyOnSetValue = function (name, val) {
76127
76592
  if (!this.isValueEmpty(val, false))
@@ -76130,18 +76595,19 @@ var SurveyModel = /** @class */ (function (_super) {
76130
76595
  return true;
76131
76596
  return this.editingObj.getDefaultPropertyValue(name) === val;
76132
76597
  };
76133
- SurveyModel.prototype.updateOnSetValue = function (name, newValue, oldValue, locNotification, allowNotifyValueChanged) {
76598
+ SurveyModel.prototype.updateOnSetValue = function (name, newValue, oldValue, locNotification, allowNotifyValueChanged, questionName) {
76134
76599
  if (locNotification === void 0) { locNotification = false; }
76135
76600
  if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
76136
76601
  this.updateQuestionValue(name, newValue);
76137
76602
  if (locNotification === true || this.isDisposed || this.isRunningElementsBindings)
76138
76603
  return;
76604
+ questionName = questionName || name;
76139
76605
  var triggerKeys = {};
76140
76606
  triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
76141
76607
  this.runConditionOnValueChanged(name, newValue);
76142
76608
  this.checkTriggers(triggerKeys, false, false, name);
76143
76609
  if (allowNotifyValueChanged)
76144
- this.notifyQuestionOnValueChanged(name, newValue);
76610
+ this.notifyQuestionOnValueChanged(name, newValue, questionName);
76145
76611
  if (locNotification !== "text") {
76146
76612
  this.tryGoNextPageAutomatic(name);
76147
76613
  }
@@ -76280,8 +76746,8 @@ var SurveyModel = /** @class */ (function (_super) {
76280
76746
  }
76281
76747
  };
76282
76748
  /**
76283
- * Removes a value from the survey results.
76284
- * @param {string} name The name of the value. Typically it is a question name.
76749
+ * Deletes an answer from survey results.
76750
+ * @param {string} name An object property that stores the answer to delete. Pass a question's [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName) or [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name).
76285
76751
  */
76286
76752
  SurveyModel.prototype.clearValue = function (name) {
76287
76753
  this.setValue(name, null);
@@ -76494,6 +76960,20 @@ var SurveyModel = /** @class */ (function (_super) {
76494
76960
  res.hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
76495
76961
  return res;
76496
76962
  };
76963
+ Object.defineProperty(SurveyModel.prototype, "textPreProcessor", {
76964
+ get: function () {
76965
+ var _this = this;
76966
+ if (!this.textPreProcessorValue) {
76967
+ this.textPreProcessorValue = new _textPreProcessor__WEBPACK_IMPORTED_MODULE_5__["TextPreProcessor"]();
76968
+ this.textPreProcessorValue.onProcess = function (textValue) {
76969
+ _this.getProcessedTextValue(textValue);
76970
+ };
76971
+ }
76972
+ return this.textPreProcessorValue;
76973
+ },
76974
+ enumerable: false,
76975
+ configurable: true
76976
+ });
76497
76977
  SurveyModel.prototype.processTextCore = function (text, returnDisplayValue, doEncoding) {
76498
76978
  if (doEncoding === void 0) { doEncoding = false; }
76499
76979
  if (this.isDesignMode)
@@ -76511,7 +76991,7 @@ var SurveyModel = /** @class */ (function (_super) {
76511
76991
  return options.html;
76512
76992
  };
76513
76993
  SurveyModel.prototype.getCorrectedAnswerCount = function () {
76514
- return this.getCorrectedAnswerCountCore(true);
76994
+ return this.getCorrectAnswerCount();
76515
76995
  };
76516
76996
  /**
76517
76997
  * Returns the number of correct answers in a quiz.
@@ -76542,7 +77022,7 @@ var SurveyModel = /** @class */ (function (_super) {
76542
77022
  return res;
76543
77023
  };
76544
77024
  SurveyModel.prototype.getInCorrectedAnswerCount = function () {
76545
- return this.getCorrectedAnswerCountCore(false);
77025
+ return this.getInCorrectAnswerCount();
76546
77026
  };
76547
77027
  /**
76548
77028
  * Returns the number of incorrect answers in a quiz.
@@ -76563,32 +77043,14 @@ var SurveyModel = /** @class */ (function (_super) {
76563
77043
  SurveyModel.prototype.getCorrectedAnswerCountCore = function (isCorrect) {
76564
77044
  var questions = this.getQuizQuestions();
76565
77045
  var counter = 0;
76566
- var options = {
76567
- question: null,
76568
- result: false,
76569
- correctAnswers: 0,
76570
- incorrectAnswers: 0,
76571
- };
76572
77046
  for (var i = 0; i < questions.length; i++) {
76573
77047
  var q = questions[i];
76574
- var quizQuestionCount = q.quizQuestionCount;
76575
- options.question = q;
76576
- options.correctAnswers = q.correctAnswerCount;
76577
- options.incorrectAnswers = quizQuestionCount - options.correctAnswers;
76578
- options.result = options.question.isAnswerCorrect();
76579
- this.onIsAnswerCorrect.fire(this, options);
77048
+ var correctCount = q.correctAnswerCount;
76580
77049
  if (isCorrect) {
76581
- if (options.result || options.correctAnswers < quizQuestionCount) {
76582
- var addCount = options.correctAnswers;
76583
- if (addCount == 0 && options.result)
76584
- addCount = 1;
76585
- counter += addCount;
76586
- }
77050
+ counter += correctCount;
76587
77051
  }
76588
77052
  else {
76589
- if (!options.result || options.incorrectAnswers < quizQuestionCount) {
76590
- counter += options.incorrectAnswers;
76591
- }
77053
+ counter += q.quizQuestionCount - correctCount;
76592
77054
  }
76593
77055
  }
76594
77056
  return counter;
@@ -76665,13 +77127,13 @@ var SurveyModel = /** @class */ (function (_super) {
76665
77127
  });
76666
77128
  Object.defineProperty(SurveyModel.prototype, "widthMode", {
76667
77129
  /**
76668
- * Gets or sets a value that specifies how the survey width is calculated.
77130
+ * Specifies how to calculate the survey width.
76669
77131
  *
76670
- * The available options:
77132
+ * Possible values:
76671
77133
  *
76672
- * - `static` - A survey has a fixed width that mostly depends upon the applied theme. Resizing a browser window does not affect the survey width.
76673
- * - `responsive` - A survey takes all available horizontal space. A survey stretches or shrinks horizonally according to the screen size.
76674
- * - `auto` - Depends on the question type and corresponds to the static or responsive mode.
77134
+ * - `"static"` - A survey has a [fixed width](#width).
77135
+ * - `"responsive"` - A survey occupies all available horizontal space and stretches or shrinks horizontally to fit in the screen size.
77136
+ * - `"auto"` (default) - Survey width depends on a question type and corresponds to the `"static"` or `"responsive"` mode.
76675
77137
  */
76676
77138
  // `custom/precise` - The survey width is specified by the width property. // in-future
76677
77139
  get: function () {
@@ -77245,7 +77707,9 @@ var SurveyModel = /** @class */ (function (_super) {
77245
77707
  this.onThemeApplied.fire(this, { theme: theme });
77246
77708
  };
77247
77709
  /**
77248
- * Use this method to dispose survey model properly.
77710
+ * Disposes of the survey model.
77711
+ *
77712
+ * Call this method to release resources if your application contains multiple survey models or if you re-create a survey model at runtime.
77249
77713
  */
77250
77714
  SurveyModel.prototype.dispose = function () {
77251
77715
  this.removeScrollEventListener();
@@ -77477,8 +77941,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
77477
77941
  name: "showTOC:switch",
77478
77942
  default: false
77479
77943
  },
77480
- { name: "tocLocation", default: "left", choices: ["left", "right"],
77481
- dependsOn: ["showTOC"], visibleIf: function (survey) { return !!survey && survey.showTOC; }
77944
+ {
77945
+ name: "tocLocation", default: "left", choices: ["left", "right"],
77946
+ dependsOn: ["showTOC"],
77947
+ visibleIf: function (survey) { return !!survey && survey.showTOC; }
77482
77948
  },
77483
77949
  { name: "mode", default: "edit", choices: ["edit", "display"] },
77484
77950
  { name: "storeOthersAsComment:boolean", default: true },
@@ -78038,9 +78504,11 @@ function createTOCListModel(survey, onAction) {
78038
78504
  var _a;
78039
78505
  var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
78040
78506
  var items = (pagesSource || []).map(function (page) {
78507
+ var _a, _b;
78041
78508
  return new _actions_action__WEBPACK_IMPORTED_MODULE_0__["Action"]({
78042
78509
  id: page.name,
78043
- title: (page["navigationTitle"]) || page.title || page.name,
78510
+ locTitle: ((_a = page.locTitle) === null || _a === void 0 ? void 0 : _a.text) ? page.locTitle : (((_b = page.locNavigationTitle) === null || _b === void 0 ? void 0 : _b.text) ? page.locNavigationTitle : undefined),
78511
+ title: page.renderedNavigationTitle,
78044
78512
  action: function () {
78045
78513
  if (typeof document !== undefined && !!document.activeElement) {
78046
78514
  !!document.activeElement.blur && document.activeElement.blur();
@@ -78216,11 +78684,17 @@ var SvgIconRegistry = /** @class */ (function () {
78216
78684
  this.icons = {};
78217
78685
  this.iconPrefix = "icon-";
78218
78686
  }
78687
+ SvgIconRegistry.prototype.processId = function (iconId, iconPrefix) {
78688
+ if (iconId.indexOf(iconPrefix) == 0)
78689
+ iconId = iconId.substring(iconPrefix.length);
78690
+ return iconId;
78691
+ };
78219
78692
  SvgIconRegistry.prototype.registerIconFromSymbol = function (iconId, iconSymbolSvg) {
78220
78693
  this.icons[iconId] = iconSymbolSvg;
78221
78694
  };
78222
78695
  SvgIconRegistry.prototype.registerIconFromSvgViaElement = function (iconId, iconSvg, iconPrefix) {
78223
78696
  if (iconPrefix === void 0) { iconPrefix = this.iconPrefix; }
78697
+ iconId = this.processId(iconId, iconPrefix);
78224
78698
  var divSvg = document.createElement("div");
78225
78699
  divSvg.innerHTML = iconSvg;
78226
78700
  var symbol = document.createElement("symbol");
@@ -78234,6 +78708,7 @@ var SvgIconRegistry = /** @class */ (function () {
78234
78708
  };
78235
78709
  SvgIconRegistry.prototype.registerIconFromSvg = function (iconId, iconSvg, iconPrefix) {
78236
78710
  if (iconPrefix === void 0) { iconPrefix = this.iconPrefix; }
78711
+ iconId = this.processId(iconId, iconPrefix);
78237
78712
  var startStr = "<svg ";
78238
78713
  var endStr = "</svg>";
78239
78714
  iconSvg = iconSvg.trim();
@@ -79378,8 +79853,8 @@ var PopupUtils = /** @class */ (function () {
79378
79853
  }
79379
79854
  return { left: Math.round(currentLeft), top: Math.round(currentTop) };
79380
79855
  };
79381
- PopupUtils.updateVerticalDimensions = function (top, height, windowHeight) {
79382
- var result;
79856
+ PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight) {
79857
+ var result = { height: height, top: top };
79383
79858
  if (top < 0) {
79384
79859
  result = { height: height + top, top: 0 };
79385
79860
  }
@@ -79537,7 +80012,11 @@ var ResponsivityManager = /** @class */ (function () {
79537
80012
  setTimeout(function () { _this.process(); }, 1);
79538
80013
  };
79539
80014
  if (typeof ResizeObserver !== "undefined") {
79540
- this.resizeObserver = new ResizeObserver(function (_) { return _this.process(); });
80015
+ this.resizeObserver = new ResizeObserver(function (entries) {
80016
+ window.requestAnimationFrame(function () {
80017
+ _this.process();
80018
+ });
80019
+ });
79541
80020
  this.resizeObserver.observe(this.container.parentElement);
79542
80021
  }
79543
80022
  }