survey-react 1.9.123 → 1.9.124

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,6 +1,6 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.123
3
- * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
2
+ * surveyjs - Survey JavaScript library v1.9.124
3
+ * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
6
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -1964,6 +1964,13 @@ var Base = /** @class */ (function () {
1964
1964
  enumerable: false,
1965
1965
  configurable: true
1966
1966
  });
1967
+ Object.defineProperty(Base.prototype, "isDesignModeV2", {
1968
+ get: function () {
1969
+ return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2 && this.isDesignMode;
1970
+ },
1971
+ enumerable: false,
1972
+ configurable: true
1973
+ });
1967
1974
  Object.defineProperty(Base.prototype, "inSurvey", {
1968
1975
  /**
1969
1976
  * Returns `true` if the object is included in a survey.
@@ -2139,6 +2146,7 @@ var Base = /** @class */ (function () {
2139
2146
  Base.prototype.resetPropertyValue = function (name) {
2140
2147
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
2141
2148
  if (locStr) {
2149
+ this.setLocalizableStringText(name, undefined);
2142
2150
  locStr.clear();
2143
2151
  }
2144
2152
  else {
@@ -3152,6 +3160,10 @@ var ChoicesRestful = /** @class */ (function (_super) {
3152
3160
  _this.createItemValue = function (value) {
3153
3161
  return new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](value);
3154
3162
  };
3163
+ _this.registerPropertyChangedHandlers(["url"], function () {
3164
+ if (_this.owner)
3165
+ _this.owner.setPropertyValue("isUsingRestful", !!_this.url);
3166
+ });
3155
3167
  return _this;
3156
3168
  }
3157
3169
  Object.defineProperty(ChoicesRestful, "EncodeParameters", {
@@ -3444,7 +3456,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
3444
3456
  * @see titleName
3445
3457
  */
3446
3458
  get: function () {
3447
- return this.getPropertyValue("url", "");
3459
+ return this.getPropertyValue("url") || "";
3448
3460
  },
3449
3461
  set: function (val) {
3450
3462
  this.setPropertyValue("url", val);
@@ -3482,8 +3494,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
3482
3494
  * @see titleName
3483
3495
  */
3484
3496
  get: function () {
3485
- var res = this.getPropertyValue("path");
3486
- return !!res ? res : "";
3497
+ return this.getPropertyValue("path") || "";
3487
3498
  },
3488
3499
  set: function (val) {
3489
3500
  this.setPropertyValue("path", val);
@@ -6145,8 +6156,6 @@ var DragDropInfo = /** @class */ (function () {
6145
6156
  __webpack_require__.r(__webpack_exports__);
6146
6157
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPageHelperV1", function() { return DragDropPageHelperV1; });
6147
6158
  /* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
6148
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
6149
-
6150
6159
 
6151
6160
  var DragDropPageHelperV1 = /** @class */ (function () {
6152
6161
  function DragDropPageHelperV1(page) {
@@ -6244,7 +6253,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
6244
6253
  var elementsToResetSWNL = [];
6245
6254
  if (!isCancel && !!row) {
6246
6255
  var isSamePanel = false;
6247
- if (this.page.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
6256
+ if (this.page.isDesignModeV2) {
6248
6257
  var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
6249
6258
  if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
6250
6259
  elementsToSetSWNL.push(target);
@@ -6263,8 +6272,8 @@ var DragDropPageHelperV1 = /** @class */ (function () {
6263
6272
  elementsToResetSWNL.push(target);
6264
6273
  }
6265
6274
  }
6275
+ this.page.survey.startMovingQuestion();
6266
6276
  if (!!src && !!src.parent) {
6267
- this.page.survey.startMovingQuestion();
6268
6277
  isSamePanel = row.panel == src.parent;
6269
6278
  if (isSamePanel) {
6270
6279
  row.panel.dragDropMoveElement(src, target, targetIndex);
@@ -6307,7 +6316,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
6307
6316
  var destination = this.dragDropInfo.destination;
6308
6317
  if (!this.dragDropCanDropCore(source, destination))
6309
6318
  return false;
6310
- if (this.page.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
6319
+ if (this.page.isDesignModeV2) {
6311
6320
  var rowSource = this.page.dragDropFindRow(source);
6312
6321
  var rowDestination = this.page.dragDropFindRow(destination);
6313
6322
  if (rowSource !== rowDestination) {
@@ -6373,8 +6382,6 @@ var DragDropPageHelperV1 = /** @class */ (function () {
6373
6382
  __webpack_require__.r(__webpack_exports__);
6374
6383
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPanelHelperV1", function() { return DragDropPanelHelperV1; });
6375
6384
  /* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
6376
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
6377
-
6378
6385
 
6379
6386
  var DragDropPanelHelperV1 = /** @class */ (function () {
6380
6387
  function DragDropPanelHelperV1(panel) {
@@ -6479,7 +6486,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
6479
6486
  var index = destRow.elements.indexOf(dragDropInfo.destination);
6480
6487
  if (index == 0 &&
6481
6488
  !dragDropInfo.isBottom) {
6482
- if (this.panel.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
6489
+ if (this.panel.isDesignModeV2) {
6483
6490
  }
6484
6491
  else if (destRow.elements[0].startWithNewLine) {
6485
6492
  if (destRow.index > 0) {
@@ -6517,7 +6524,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
6517
6524
  };
6518
6525
  DragDropPanelHelperV1.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
6519
6526
  var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
6520
- if (this.panel.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
6527
+ if (this.panel.isDesignModeV2) {
6521
6528
  targetRow.setIsLazyRendering(false);
6522
6529
  }
6523
6530
  targetRow.addElement(dragDropInfo.target);
@@ -9443,8 +9450,8 @@ __webpack_require__.r(__webpack_exports__);
9443
9450
  //import "../../modern.scss";
9444
9451
  var Version;
9445
9452
  var ReleaseDate;
9446
- Version = "" + "1.9.123";
9447
- ReleaseDate = "" + "2023-12-26";
9453
+ Version = "" + "1.9.124";
9454
+ ReleaseDate = "" + "2024-01-04";
9448
9455
  function checkLibraryVersion(ver, libraryName) {
9449
9456
  if (Version != ver) {
9450
9457
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -10567,7 +10574,7 @@ var defaultBootstrapMaterialCss = _plugins_themes_bootstrapmaterial_cssbootstrap
10567
10574
  /*!***************************************!*\
10568
10575
  !*** ./src/entries/react-ui-model.ts ***!
10569
10576
  \***************************************/
10570
- /*! 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, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
10577
+ /*! 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, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
10571
10578
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10572
10579
 
10573
10580
  "use strict";
@@ -10665,6 +10672,8 @@ __webpack_require__.r(__webpack_exports__);
10665
10672
 
10666
10673
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixRow", function() { return _react_reactquestion_matrix__WEBPACK_IMPORTED_MODULE_24__["SurveyQuestionMatrixRow"]; });
10667
10674
 
10675
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixCell", function() { return _react_reactquestion_matrix__WEBPACK_IMPORTED_MODULE_24__["SurveyQuestionMatrixCell"]; });
10676
+
10668
10677
  /* harmony import */ var _react_reactquestion_html__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../react/reactquestion_html */ "./src/react/reactquestion_html.tsx");
10669
10678
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionHtml", function() { return _react_reactquestion_html__WEBPACK_IMPORTED_MODULE_25__["SurveyQuestionHtml"]; });
10670
10679
 
@@ -10939,7 +10948,7 @@ __webpack_require__.r(__webpack_exports__);
10939
10948
  /*!******************************!*\
10940
10949
  !*** ./src/entries/react.ts ***!
10941
10950
  \******************************/
10942
- /*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, 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, Cover, CoverCell, 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, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
10951
+ /*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, 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, Cover, CoverCell, 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, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
10943
10952
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10944
10953
 
10945
10954
  "use strict";
@@ -11460,6 +11469,8 @@ __webpack_require__.r(__webpack_exports__);
11460
11469
 
11461
11470
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixRow", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionMatrixRow"]; });
11462
11471
 
11472
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixCell", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionMatrixCell"]; });
11473
+
11463
11474
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionHtml", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionHtml"]; });
11464
11475
 
11465
11476
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionFile", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionFile"]; });
@@ -35729,8 +35740,7 @@ var Question = /** @class */ (function (_super) {
35729
35740
  if (this.forceIsInputReadOnly !== undefined) {
35730
35741
  return this.forceIsInputReadOnly;
35731
35742
  }
35732
- var isDesignModeV2 = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].supportCreatorV2 && this.isDesignMode;
35733
- return this.isReadOnly || isDesignModeV2;
35743
+ return this.isReadOnly || this.isDesignModeV2;
35734
35744
  },
35735
35745
  enumerable: false,
35736
35746
  configurable: true
@@ -37692,7 +37702,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37692
37702
  _this.onVisibleChoicesChanged();
37693
37703
  }
37694
37704
  });
37695
- _this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion", "choiceTextsFromQuestion", "showNoneItem"], function () {
37705
+ _this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
37706
+ "choiceTextsFromQuestion", "showNoneItem", "isUsingRestful"], function () {
37696
37707
  _this.onVisibleChoicesChanged();
37697
37708
  });
37698
37709
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
@@ -37723,7 +37734,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37723
37734
  }
37724
37735
  Object.defineProperty(QuestionSelectBase.prototype, "waitingChoicesByURL", {
37725
37736
  get: function () {
37726
- return !this.isChoicesLoaded && !this.choicesByUrl.isEmpty;
37737
+ return !this.isChoicesLoaded && this.hasChoicesUrl;
37727
37738
  },
37728
37739
  enumerable: false,
37729
37740
  configurable: true
@@ -37779,6 +37790,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37779
37790
  var mode = selBaseQuestion ? "select" : (arrayQuestion ? "array" : undefined);
37780
37791
  this.setPropertyValue("carryForwardQuestionType", mode);
37781
37792
  };
37793
+ Object.defineProperty(QuestionSelectBase.prototype, "isUsingRestful", {
37794
+ get: function () {
37795
+ return this.getPropertyValueWithoutDefault("isUsingRestful") || false;
37796
+ },
37797
+ enumerable: false,
37798
+ configurable: true
37799
+ });
37800
+ QuestionSelectBase.prototype.updateIsUsingRestful = function () {
37801
+ this.setPropertyValueDirectly("isUsingRestful", this.hasChoicesUrl);
37802
+ };
37782
37803
  QuestionSelectBase.prototype.supportGoNextPageError = function () {
37783
37804
  return !this.isOtherSelected || !!this.otherValue;
37784
37805
  };
@@ -38286,7 +38307,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38286
38307
  var value = this.value;
38287
38308
  var valueArray = Array.isArray(value) ? value : [value];
38288
38309
  var hasItemWithoutValues = valueArray.some(function (val) { return !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.choices, val); });
38289
- if (hasItemWithoutValues && (this.choicesLazyLoadEnabled || !this.choicesByUrl.isEmpty)) {
38310
+ if (hasItemWithoutValues && (this.choicesLazyLoadEnabled || this.hasChoicesUrl)) {
38290
38311
  this.waitingGetChoiceDisplayValueResponse = true;
38291
38312
  this.updateIsReady();
38292
38313
  this.survey.getChoiceDisplayValue({
@@ -38676,7 +38697,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38676
38697
  QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
38677
38698
  this.headItemsCount = 0;
38678
38699
  this.footItemsCount = 0;
38679
- this.addNewItemToVisibleChoices(items, isAddAll);
38700
+ if (!this.hasChoicesUrl) {
38701
+ this.addNewItemToVisibleChoices(items, isAddAll);
38702
+ }
38680
38703
  var dict = new Array();
38681
38704
  this.addNonChoicesItems(dict, isAddAll);
38682
38705
  dict.sort(function (a, b) {
@@ -38738,8 +38761,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38738
38761
  };
38739
38762
  Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
38740
38763
  get: function () {
38741
- return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].supportCreatorV2 && _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showDefaultItemsInCreatorV2 &&
38742
- this.isDesignMode && !this.customWidget && !this.isContentElement;
38764
+ return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showDefaultItemsInCreatorV2 && this.isDesignModeV2 &&
38765
+ !this.customWidget && !this.isContentElement;
38743
38766
  },
38744
38767
  enumerable: false,
38745
38768
  configurable: true
@@ -38838,6 +38861,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38838
38861
  question.addDependedQuestion(this);
38839
38862
  return this.getChoicesFromArrayQuestion(question);
38840
38863
  }
38864
+ if (this.isDesignModeV2 && this.hasChoicesUrl)
38865
+ return [];
38841
38866
  return this.choicesFromUrl ? this.choicesFromUrl : this.getChoices();
38842
38867
  },
38843
38868
  enumerable: false,
@@ -39000,7 +39025,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39000
39025
  return (this.storeOthersAsComment === true ||
39001
39026
  (this.storeOthersAsComment == "default" &&
39002
39027
  (this.survey != null ? this.survey.storeOthersAsComment : true)) ||
39003
- (!this.choicesByUrl.isEmpty && !this.choicesFromUrl));
39028
+ (this.hasChoicesUrl && !this.choicesFromUrl));
39004
39029
  };
39005
39030
  QuestionSelectBase.prototype.onSurveyLoad = function () {
39006
39031
  this.runChoicesByUrl();
@@ -39062,7 +39087,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39062
39087
  }
39063
39088
  };
39064
39089
  QuestionSelectBase.prototype.runChoicesByUrl = function () {
39065
- if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices)
39090
+ this.updateIsUsingRestful();
39091
+ if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isDesignModeV2)
39066
39092
  return;
39067
39093
  var processor = this.surveyImpl
39068
39094
  ? this.surveyImpl.getTextProcessor()
@@ -39236,6 +39262,13 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39236
39262
  QuestionSelectBase.prototype.randomizeArray = function (array) {
39237
39263
  return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].randomizeArray(array);
39238
39264
  };
39265
+ Object.defineProperty(QuestionSelectBase.prototype, "hasChoicesUrl", {
39266
+ get: function () {
39267
+ return this.choicesByUrl && !!this.choicesByUrl.url;
39268
+ },
39269
+ enumerable: false,
39270
+ configurable: true
39271
+ });
39239
39272
  QuestionSelectBase.prototype.clearIncorrectValues = function () {
39240
39273
  if (!this.hasValueToClearIncorrectValues())
39241
39274
  return;
@@ -39244,8 +39277,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39244
39277
  if (!!this.survey &&
39245
39278
  this.survey.questionsByValueName(this.getValueName()).length > 1)
39246
39279
  return;
39247
- if (!!this.choicesByUrl &&
39248
- !this.choicesByUrl.isEmpty &&
39280
+ if (this.hasChoicesUrl &&
39249
39281
  (!this.choicesFromUrl || this.choicesFromUrl.length == 0))
39250
39282
  return;
39251
39283
  if (this.clearIncorrectValuesCallback) {
@@ -41174,8 +41206,20 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
41174
41206
  _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkbox", [
41175
41207
  { name: "showSelectAllItem:boolean", alternativeName: "hasSelectAll" },
41176
41208
  { name: "separateSpecialChoices", visible: true },
41177
- { name: "maxSelectedChoices:number", default: 0 },
41178
- { name: "minSelectedChoices:number", default: 0 },
41209
+ { name: "maxSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
41210
+ if (val <= 0)
41211
+ return 0;
41212
+ var min = obj.minSelectedChoices;
41213
+ return min > 0 && val < min ? min : val;
41214
+ }
41215
+ },
41216
+ { name: "minSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
41217
+ if (val <= 0)
41218
+ return 0;
41219
+ var max = obj.maxSelectedChoices;
41220
+ return max > 0 && val > max ? max : val;
41221
+ }
41222
+ },
41179
41223
  {
41180
41224
  name: "selectAllText",
41181
41225
  serializationProperty: "locSelectAllText",
@@ -46121,6 +46165,23 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
46121
46165
  QuestionMatrixModel.prototype.getType = function () {
46122
46166
  return "matrix";
46123
46167
  };
46168
+ Object.defineProperty(QuestionMatrixModel.prototype, "cellComponent", {
46169
+ /**
46170
+ * The name of a component used to render cells.
46171
+ */
46172
+ get: function () {
46173
+ return this.getPropertyValue("cellComponent");
46174
+ },
46175
+ enumerable: false,
46176
+ configurable: true
46177
+ });
46178
+ Object.defineProperty(QuestionMatrixModel.prototype, "itemComponent", {
46179
+ set: function (value) {
46180
+ this.setPropertyValue("cellComponent", value);
46181
+ },
46182
+ enumerable: false,
46183
+ configurable: true
46184
+ });
46124
46185
  Object.defineProperty(QuestionMatrixModel.prototype, "hasSingleInput", {
46125
46186
  get: function () {
46126
46187
  return false;
@@ -46544,6 +46605,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("matrix", [
46544
46605
  },
46545
46606
  "isAllRowRequired:boolean",
46546
46607
  "hideIfRowsEmpty:boolean",
46608
+ { name: "cellComponent", visible: false, default: "survey-matrix-cell" }
46547
46609
  ], function () {
46548
46610
  return new QuestionMatrixModel("");
46549
46611
  }, "matrixbase");
@@ -46841,6 +46903,7 @@ __webpack_require__.r(__webpack_exports__);
46841
46903
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
46842
46904
  /* harmony import */ var _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./question_matrixdropdowncolumn */ "./src/question_matrixdropdowncolumn.ts");
46843
46905
  /* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
46906
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
46844
46907
  var __extends = (undefined && undefined.__extends) || (function () {
46845
46908
  var extendStatics = function (d, b) {
46846
46909
  extendStatics = Object.setPrototypeOf ||
@@ -46870,6 +46933,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
46870
46933
 
46871
46934
 
46872
46935
 
46936
+
46873
46937
  var MatrixDropdownCell = /** @class */ (function () {
46874
46938
  function MatrixDropdownCell(column, row, data) {
46875
46939
  this.column = column;
@@ -47217,12 +47281,17 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
47217
47281
  if (!!this.data) {
47218
47282
  values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
47219
47283
  }
47220
- values[MatrixDropdownRowModelBase.IndexVariableName] = this.rowIndex;
47284
+ var rowIndex = this.rowIndex;
47285
+ values[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
47221
47286
  values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
47222
47287
  var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
47223
47288
  newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
47289
+ var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
47224
47290
  for (var i = 0; i < this.cells.length; i++) {
47225
- values[MatrixDropdownRowModelBase.RowVariableName] = this.value;
47291
+ if (i > 0) {
47292
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_14__["mergeValues"])(this.value, rowValues);
47293
+ }
47294
+ values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
47226
47295
  this.cells[i].runCondition(values, newProps);
47227
47296
  }
47228
47297
  if (!!this.detailPanel) {
@@ -48366,7 +48435,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
48366
48435
  if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
48367
48436
  return true;
48368
48437
  }
48369
- return curVis != column.isVisible;
48438
+ return curVis !== column.isColumnVisible;
48370
48439
  };
48371
48440
  QuestionMatrixDropdownModelBase.prototype.updateNewVisibleChoices = function (q, dest) {
48372
48441
  var choices = q.visibleChoices;
@@ -50443,6 +50512,13 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
50443
50512
  this.classNameValue = "";
50444
50513
  this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
50445
50514
  }
50515
+ Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "requiredText", {
50516
+ get: function () {
50517
+ return this.column && this.column.isRenderedRequired ? this.column.requiredText : undefined;
50518
+ },
50519
+ enumerable: false,
50520
+ configurable: true
50521
+ });
50446
50522
  Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasQuestion", {
50447
50523
  get: function () {
50448
50524
  return !!this.question && !this.isErrorsCell;
@@ -50777,9 +50853,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50777
50853
  enumerable: false,
50778
50854
  configurable: true
50779
50855
  });
50780
- Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "allowRowsDragAndDrop", {
50856
+ Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "isRowsDragAndDrop", {
50781
50857
  get: function () {
50782
- return this.matrix.allowRowsDragAndDrop && this.matrix.isColumnLayoutHorizontal;
50858
+ return this.matrix.isRowsDragAndDrop && this.matrix.isColumnLayoutHorizontal;
50783
50859
  },
50784
50860
  enumerable: false,
50785
50861
  configurable: true
@@ -50938,7 +51014,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50938
51014
  if (!isShown)
50939
51015
  return;
50940
51016
  this.headerRowValue = this.createRenderedRow(this.cssClasses);
50941
- if (this.allowRowsDragAndDrop) {
51017
+ if (this.isRowsDragAndDrop) {
50942
51018
  this.headerRow.cells.push(this.createHeaderCell(null, "action"));
50943
51019
  }
50944
51020
  if (this.hasActionCellInRows("start")) {
@@ -50982,7 +51058,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50982
51058
  if (!this.showFooter)
50983
51059
  return;
50984
51060
  this.footerRowValue = this.createRenderedRow(this.cssClasses);
50985
- if (this.allowRowsDragAndDrop) {
51061
+ if (this.isRowsDragAndDrop) {
50986
51062
  this.footerRow.cells.push(this.createHeaderCell(null));
50987
51063
  }
50988
51064
  if (this.hasActionCellInRows("start")) {
@@ -51227,7 +51303,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
51227
51303
  };
51228
51304
  QuestionMatrixDropdownRenderedTable.prototype.createHorizontalRow = function (row, useAsHeader) {
51229
51305
  var res = this.createRenderedRow(this.cssClasses);
51230
- if (this.allowRowsDragAndDrop) {
51306
+ if (this.isRowsDragAndDrop) {
51231
51307
  var rowIndex = this.matrix.visibleRows.indexOf(row);
51232
51308
  res.cells.push(this.getRowDragCell(rowIndex));
51233
51309
  }
@@ -51375,9 +51451,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
51375
51451
  .append(hCell.className)
51376
51452
  .append(this.cssClasses.rowTextCell)
51377
51453
  .append(this.cssClasses.columnTitleCell).toString();
51378
- if (!choice) {
51379
- this.setRequriedToHeaderCell(column, hCell);
51380
- }
51381
51454
  res.cells.push(hCell);
51382
51455
  }
51383
51456
  var rows = this.matrix.visibleRows;
@@ -51507,26 +51580,11 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
51507
51580
  };
51508
51581
  QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
51509
51582
  this.setHeaderCellWidth(column, cell);
51510
- this.setRequriedToHeaderCell(column, cell);
51511
51583
  };
51512
51584
  QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellWidth = function (column, cell) {
51513
51585
  cell.minWidth = column != null ? this.matrix.getColumnWidth(column) : this.matrix.getRowTitleWidth();
51514
51586
  cell.width = column != null ? column.width : this.matrix.getRowTitleWidth();
51515
51587
  };
51516
- QuestionMatrixDropdownRenderedTable.prototype.setRequriedToHeaderCell = function (column, cell) {
51517
- if (!!column && column.isRequired && this.matrix.survey) {
51518
- cell.requiredText = this.matrix.survey.requiredText;
51519
- }
51520
- };
51521
- QuestionMatrixDropdownRenderedTable.prototype.createRemoveRowCell = function (row) {
51522
- var res = new QuestionMatrixDropdownRenderedCell();
51523
- res.row = row;
51524
- res.isRemoveRow = this.canRemoveRow(row);
51525
- if (!!this.cssClasses.cell) {
51526
- res.className = this.cssClasses.cell;
51527
- }
51528
- return res;
51529
- };
51530
51588
  QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
51531
51589
  var cell = new QuestionMatrixDropdownRenderedCell();
51532
51590
  cell.locTitle = locTitle;
@@ -51684,7 +51742,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
51684
51742
  _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
51685
51743
  _this.updateShowTableAndAddRow();
51686
51744
  });
51687
- _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop"], function () { _this.clearRowsAndResetRenderedTable(); });
51745
+ _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
51688
51746
  _this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
51689
51747
  return _this;
51690
51748
  }
@@ -51703,7 +51761,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
51703
51761
  return true;
51704
51762
  };
51705
51763
  QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
51706
- if (!row || !this.allowRowsDragAndDrop)
51764
+ if (!row || !this.isRowsDragAndDrop)
51707
51765
  return;
51708
51766
  if (this.isBanStartDrag(pointerDownEvent))
51709
51767
  return;
@@ -51900,8 +51958,6 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
51900
51958
  * Default value: `false`
51901
51959
  */
51902
51960
  get: function () {
51903
- if (this.readOnly)
51904
- return false;
51905
51961
  return this.getPropertyValue("allowRowsDragAndDrop");
51906
51962
  },
51907
51963
  set: function (val) {
@@ -51910,6 +51966,13 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
51910
51966
  enumerable: false,
51911
51967
  configurable: true
51912
51968
  });
51969
+ Object.defineProperty(QuestionMatrixDynamicModel.prototype, "isRowsDragAndDrop", {
51970
+ get: function () {
51971
+ return this.allowRowsDragAndDrop && !this.isReadOnly;
51972
+ },
51973
+ enumerable: false,
51974
+ configurable: true
51975
+ });
51913
51976
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
51914
51977
  get: function () {
51915
51978
  return this.cssClasses.iconDragElement;
@@ -54329,9 +54392,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
54329
54392
  * @see visiblePanels
54330
54393
  */
54331
54394
  get: function () {
54332
- return this.template.visibleIf;
54395
+ return this.getPropertyValue("templateVisibleIf");
54333
54396
  },
54334
54397
  set: function (val) {
54398
+ this.setPropertyValue("templateVisibleIf", val);
54335
54399
  this.template.visibleIf = val;
54336
54400
  },
54337
54401
  enumerable: false,
@@ -67850,18 +67914,20 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Inst
67850
67914
  /*!********************************************!*\
67851
67915
  !*** ./src/react/reactquestion_matrix.tsx ***!
67852
67916
  \********************************************/
67853
- /*! exports provided: SurveyQuestionMatrix, SurveyQuestionMatrixRow */
67917
+ /*! exports provided: SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell */
67854
67918
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
67855
67919
 
67856
67920
  "use strict";
67857
67921
  __webpack_require__.r(__webpack_exports__);
67858
67922
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrix", function() { return SurveyQuestionMatrix; });
67859
67923
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixRow", function() { return SurveyQuestionMatrixRow; });
67924
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixCell", function() { return SurveyQuestionMatrixCell; });
67860
67925
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
67861
67926
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
67862
67927
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
67863
67928
  /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
67864
67929
  /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
67930
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
67865
67931
  var __extends = (undefined && undefined.__extends) || (function () {
67866
67932
  var extendStatics = function (d, b) {
67867
67933
  extendStatics = Object.setPrototypeOf ||
@@ -67881,6 +67947,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
67881
67947
 
67882
67948
 
67883
67949
 
67950
+
67884
67951
  var SurveyQuestionMatrix = /** @class */ (function (_super) {
67885
67952
  __extends(SurveyQuestionMatrix, _super);
67886
67953
  function SurveyQuestionMatrix(props) {
@@ -67950,10 +68017,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
67950
68017
  var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
67951
68018
  __extends(SurveyQuestionMatrixRow, _super);
67952
68019
  function SurveyQuestionMatrixRow(props) {
67953
- var _this = _super.call(this, props) || this;
67954
- _this.handleOnChange = _this.handleOnChange.bind(_this);
67955
- _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
67956
- return _this;
68020
+ return _super.call(this, props) || this;
67957
68021
  }
67958
68022
  Object.defineProperty(SurveyQuestionMatrixRow.prototype, "question", {
67959
68023
  get: function () {
@@ -67969,13 +68033,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
67969
68033
  enumerable: false,
67970
68034
  configurable: true
67971
68035
  });
67972
- SurveyQuestionMatrixRow.prototype.handleOnChange = function (event) {
67973
- this.row.value = event.target.value;
67974
- this.setState({ value: this.row.value });
67975
- };
67976
- SurveyQuestionMatrixRow.prototype.handleOnMouseDown = function (event) {
67977
- this.question.onMouseDown();
67978
- };
67979
68036
  SurveyQuestionMatrixRow.prototype.wrapCell = function (cell, element, reason) {
67980
68037
  if (!reason) {
67981
68038
  return element;
@@ -68010,33 +68067,35 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68010
68067
  var _this = this;
68011
68068
  var tds = [];
68012
68069
  var row = this.row;
68013
- for (var i = 0; i < this.question.visibleColumns.length; i++) {
68070
+ var cellComponent = this.question.cellComponent;
68071
+ var _loop_1 = function () {
68014
68072
  var td = null;
68015
- var column = this.question.visibleColumns[i];
68073
+ var column = this_1.question.visibleColumns[i];
68016
68074
  var key = "value" + i;
68017
- var isChecked = row.value == column.value;
68018
- var itemClass = this.question.getItemClass(row, column);
68019
- var inputId = this.question.inputId + "_" + row.name + "_" + i;
68020
- if (this.question.hasCellText) {
68021
- var getHandler = !this.question.isInputReadOnly
68075
+ var itemClass = this_1.question.getItemClass(row, column);
68076
+ if (this_1.question.hasCellText) {
68077
+ var getHandler = !this_1.question.isInputReadOnly
68022
68078
  ? function (column) { return function () { return _this.cellClick(row, column); }; }
68023
68079
  : null;
68024
- td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } }, this.renderLocString(this.question.getCellDisplayLocText(row.name, column))));
68080
+ td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } }, this_1.renderLocString(this_1.question.getCellDisplayLocText(row.name, column))));
68025
68081
  }
68026
68082
  else {
68027
- var mobileSpan = this.question.isMobile ?
68028
- (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(column.locText)))
68029
- : undefined;
68030
- td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this.question.cssClasses.cell },
68031
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
68032
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: row.fullName, value: column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(row.locText.renderedHtml, column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }),
68033
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
68034
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
68035
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.itemSvgIcon })) :
68036
- null),
68037
- mobileSpan)));
68083
+ var renderedCell = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(cellComponent, {
68084
+ question: this_1.question,
68085
+ row: this_1.row,
68086
+ column: column,
68087
+ columnIndex: i,
68088
+ cssClasses: this_1.cssClasses,
68089
+ isDisplayMode: this_1.isDisplayMode,
68090
+ cellChanged: function () { _this.cellClick(_this.row, column); }
68091
+ });
68092
+ td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this_1.question.cssClasses.cell }, renderedCell));
68038
68093
  }
68039
68094
  tds.push(td);
68095
+ };
68096
+ var this_1 = this;
68097
+ for (var i = 0; i < this.question.visibleColumns.length; i++) {
68098
+ _loop_1();
68040
68099
  }
68041
68100
  return tds;
68042
68101
  };
@@ -68047,6 +68106,77 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68047
68106
  return SurveyQuestionMatrixRow;
68048
68107
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
68049
68108
 
68109
+ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
68110
+ __extends(SurveyQuestionMatrixCell, _super);
68111
+ function SurveyQuestionMatrixCell(props) {
68112
+ var _this = _super.call(this, props) || this;
68113
+ _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
68114
+ _this.handleOnChange = _this.handleOnChange.bind(_this);
68115
+ return _this;
68116
+ }
68117
+ SurveyQuestionMatrixCell.prototype.handleOnChange = function (event) {
68118
+ if (!!this.props.cellChanged) {
68119
+ this.props.cellChanged();
68120
+ }
68121
+ };
68122
+ SurveyQuestionMatrixCell.prototype.handleOnMouseDown = function (event) {
68123
+ this.question.onMouseDown();
68124
+ };
68125
+ Object.defineProperty(SurveyQuestionMatrixCell.prototype, "question", {
68126
+ get: function () {
68127
+ return this.props.question;
68128
+ },
68129
+ enumerable: false,
68130
+ configurable: true
68131
+ });
68132
+ Object.defineProperty(SurveyQuestionMatrixCell.prototype, "row", {
68133
+ get: function () {
68134
+ return this.props.row;
68135
+ },
68136
+ enumerable: false,
68137
+ configurable: true
68138
+ });
68139
+ Object.defineProperty(SurveyQuestionMatrixCell.prototype, "column", {
68140
+ get: function () {
68141
+ return this.props.column;
68142
+ },
68143
+ enumerable: false,
68144
+ configurable: true
68145
+ });
68146
+ Object.defineProperty(SurveyQuestionMatrixCell.prototype, "columnIndex", {
68147
+ get: function () {
68148
+ return this.props.columnIndex;
68149
+ },
68150
+ enumerable: false,
68151
+ configurable: true
68152
+ });
68153
+ SurveyQuestionMatrixCell.prototype.canRender = function () {
68154
+ return !!this.question && !!this.row;
68155
+ };
68156
+ SurveyQuestionMatrixCell.prototype.renderElement = function () {
68157
+ var isChecked = this.row.value == this.column.value;
68158
+ var inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
68159
+ var itemClass = this.question.getItemClass(this.row, this.column);
68160
+ var mobileSpan = this.question.isMobile ?
68161
+ (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
68162
+ : undefined;
68163
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
68164
+ this.renderInput(inputId, isChecked),
68165
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
68166
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
68167
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.itemSvgIcon })) :
68168
+ null),
68169
+ mobileSpan));
68170
+ };
68171
+ SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
68172
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
68173
+ };
68174
+ return SurveyQuestionMatrixCell;
68175
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
68176
+
68177
+ _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("survey-matrix-cell", function (props) {
68178
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixCell, props);
68179
+ });
68050
68180
  _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("matrix", function (props) {
68051
68181
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrix, props);
68052
68182
  });
@@ -73873,6 +74003,7 @@ var SurveyModel = /** @class */ (function (_super) {
73873
74003
  _this.registerPropertyChangedHandlers(["renderBackgroundImage", "backgroundOpacity", "backgroundImageFit", "fitToContainer", "backgroundImageAttachment"], function () {
73874
74004
  _this.updateBackgroundImageStyle();
73875
74005
  });
74006
+ _this.registerPropertyChangedHandlers(["showPrevButton", "showCompleteButton"], function () { _this.updateButtonsVisibility(); });
73876
74007
  _this.onGetQuestionNo.onCallbacksChanged = function () {
73877
74008
  _this.resetVisibleIndexes();
73878
74009
  };
@@ -74456,6 +74587,7 @@ var SurveyModel = /** @class */ (function (_super) {
74456
74587
  * - `"none"` - Hides the navigation buttons. This setting may be useful if you [implement custom external navigation](https://surveyjs.io/form-library/examples/external-form-navigation-system/).
74457
74588
  * @see goNextPageAutomatic
74458
74589
  * @see showPrevButton
74590
+ * @see showCompleteButton
74459
74591
  */
74460
74592
  get: function () {
74461
74593
  return this.getPropertyValue("showNavigationButtons");
@@ -74476,6 +74608,7 @@ var SurveyModel = /** @class */ (function (_super) {
74476
74608
  /**
74477
74609
  * Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
74478
74610
  * @see showNavigationButtons
74611
+ * @see showCompleteButton
74479
74612
  */
74480
74613
  get: function () {
74481
74614
  return this.getPropertyValue("showPrevButton");
@@ -74486,6 +74619,21 @@ var SurveyModel = /** @class */ (function (_super) {
74486
74619
  enumerable: false,
74487
74620
  configurable: true
74488
74621
  });
74622
+ Object.defineProperty(SurveyModel.prototype, "showCompleteButton", {
74623
+ /**
74624
+ * Specifies whether to display the Complete button. Set this property to `false` if respondents should not complete the survey.
74625
+ * @see showNavigationButtons
74626
+ * @see showPrevButton
74627
+ */
74628
+ get: function () {
74629
+ return this.getPropertyValue("showCompleteButton", true);
74630
+ },
74631
+ set: function (val) {
74632
+ this.setPropertyValue("showCompleteButton", val);
74633
+ },
74634
+ enumerable: false,
74635
+ configurable: true
74636
+ });
74489
74637
  Object.defineProperty(SurveyModel.prototype, "showTOC", {
74490
74638
  /**
74491
74639
  * Gets or sets the visibility of the table of contents.
@@ -77827,7 +77975,7 @@ var SurveyModel = /** @class */ (function (_super) {
77827
77975
  var state = this.state;
77828
77976
  return this.isEditMode && (this.state === "running" &&
77829
77977
  (this.isLastPage && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
77830
- || state === "preview");
77978
+ || state === "preview") && this.showCompleteButton;
77831
77979
  };
77832
77980
  SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
77833
77981
  return (this.isEditMode &&
@@ -80112,7 +80260,7 @@ var SurveyModel = /** @class */ (function (_super) {
80112
80260
  }
80113
80261
  this.updateVisibleIndexes();
80114
80262
  this.setCalculatedWidthModeUpdater();
80115
- if (!this.isMovingQuestion || this.isDesignMode && !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2) {
80263
+ if (this.canFireAddElement()) {
80116
80264
  this.onQuestionAdded.fire(this, {
80117
80265
  question: question,
80118
80266
  name: question.name,
@@ -80124,6 +80272,9 @@ var SurveyModel = /** @class */ (function (_super) {
80124
80272
  });
80125
80273
  }
80126
80274
  };
80275
+ SurveyModel.prototype.canFireAddElement = function () {
80276
+ return !this.isMovingQuestion || this.isDesignMode && !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2;
80277
+ };
80127
80278
  SurveyModel.prototype.questionRemoved = function (question) {
80128
80279
  this.questionHashesRemoved(question, question.name, question.getValueName());
80129
80280
  this.updateVisibleIndexes();
@@ -80197,15 +80348,17 @@ var SurveyModel = /** @class */ (function (_super) {
80197
80348
  }
80198
80349
  this.questionHashesPanelAdded(panel);
80199
80350
  this.updateVisibleIndexes();
80200
- this.onPanelAdded.fire(this, {
80201
- panel: panel,
80202
- name: panel.name,
80203
- index: index,
80204
- parent: parentPanel,
80205
- page: rootPanel,
80206
- parentPanel: parentPanel,
80207
- rootPanel: rootPanel,
80208
- });
80351
+ if (this.canFireAddElement()) {
80352
+ this.onPanelAdded.fire(this, {
80353
+ panel: panel,
80354
+ name: panel.name,
80355
+ index: index,
80356
+ parent: parentPanel,
80357
+ page: rootPanel,
80358
+ parentPanel: parentPanel,
80359
+ rootPanel: rootPanel,
80360
+ });
80361
+ }
80209
80362
  };
80210
80363
  SurveyModel.prototype.panelRemoved = function (panel) {
80211
80364
  this.updateVisibleIndexes();
@@ -80934,7 +81087,7 @@ var SurveyModel = /** @class */ (function (_super) {
80934
81087
  var containerLayoutElements = [];
80935
81088
  for (var _i = 0, _a = this.layoutElements; _i < _a.length; _i++) {
80936
81089
  var layoutElement = _a[_i];
80937
- if (isStrCiEqual(layoutElement.id, "timerpanel")) {
81090
+ if (this.mode !== "display" && isStrCiEqual(layoutElement.id, "timerpanel")) {
80938
81091
  if (container === "header") {
80939
81092
  if (this.isTimerPanelShowingOnTop && !this.isShowStartingPage) {
80940
81093
  containerLayoutElements.push(layoutElement);
@@ -81834,9 +81987,12 @@ var SurveyTimerModel = /** @class */ (function (_super) {
81834
81987
  _this.progress = Math.floor((spent + 1) / limit * 100) / 100;
81835
81988
  }, 0);
81836
81989
  }
81837
- else if (spent !== limit) {
81990
+ else if (spent <= limit) {
81838
81991
  this.progress = Math.floor((spent + 1) / limit * 100) / 100;
81839
81992
  }
81993
+ if (this.progress > 1) {
81994
+ this.progress = undefined;
81995
+ }
81840
81996
  }
81841
81997
  };
81842
81998
  SurveyTimerModel.prototype.updateText = function () {
@@ -83377,12 +83533,13 @@ var CssClassBuilder = /** @class */ (function () {
83377
83533
  /*!******************************!*\
83378
83534
  !*** ./src/utils/devices.ts ***!
83379
83535
  \******************************/
83380
- /*! exports provided: IsMobile, IsTouch, _setIsTouch */
83536
+ /*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
83381
83537
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
83382
83538
 
83383
83539
  "use strict";
83384
83540
  __webpack_require__.r(__webpack_exports__);
83385
83541
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return IsMobile; });
83542
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
83386
83543
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
83387
83544
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
83388
83545
  // isMobile
@@ -83406,12 +83563,18 @@ if (typeof navigator !== "undefined" &&
83406
83563
  })(vendor);
83407
83564
  var _IPad = false;
83408
83565
  var IsMobile = _isMobile || _IPad;
83409
- // isTouch
83410
- var _isTouch = false;
83411
- if (typeof window !== "undefined") {
83412
- _isTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
83413
- }
83414
- var IsTouch = IsMobile && _isTouch;
83566
+ var mouseInfo = {
83567
+ get isTouch() {
83568
+ return !this.hasMouse && this.hasTouchEvent;
83569
+ },
83570
+ get hasTouchEvent() {
83571
+ return typeof window !== "undefined" && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
83572
+ },
83573
+ hasMouse: true
83574
+ };
83575
+ var pointerMatches = (typeof matchMedia !== "undefined" && !!matchMedia && matchMedia("(pointer:fine)")) || undefined;
83576
+ mouseInfo.hasMouse = !!pointerMatches && !!pointerMatches.matches;
83577
+ var IsTouch = mouseInfo.isTouch;
83415
83578
  //for tests
83416
83579
  function _setIsTouch(val) {
83417
83580
  IsTouch = val;
@@ -84750,7 +84913,7 @@ var RegexValidator = /** @class */ (function (_super) {
84750
84913
  if (properties === void 0) { properties = null; }
84751
84914
  if (!this.regex || this.isValueEmpty(value))
84752
84915
  return null;
84753
- var re = new RegExp(this.regex);
84916
+ var re = this.createRegExp();
84754
84917
  if (Array.isArray(value)) {
84755
84918
  for (var i = 0; i < value.length; i++) {
84756
84919
  var res = this.hasError(re, value[i], name);
@@ -84778,6 +84941,19 @@ var RegexValidator = /** @class */ (function (_super) {
84778
84941
  enumerable: false,
84779
84942
  configurable: true
84780
84943
  });
84944
+ Object.defineProperty(RegexValidator.prototype, "insensitive", {
84945
+ get: function () {
84946
+ return this.getPropertyValue("insensitive");
84947
+ },
84948
+ set: function (val) {
84949
+ this.setPropertyValue("insensitive", val);
84950
+ },
84951
+ enumerable: false,
84952
+ configurable: true
84953
+ });
84954
+ RegexValidator.prototype.createRegExp = function () {
84955
+ return new RegExp(this.regex, this.insensitive ? "i" : "");
84956
+ };
84781
84957
  return RegexValidator;
84782
84958
  }(SurveyValidator));
84783
84959
 
@@ -84918,7 +85094,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("textvalidator",
84918
85094
  _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
84919
85095
  return new AnswerCountValidator();
84920
85096
  }, "surveyvalidator");
84921
- _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex"], function () {
85097
+ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
84922
85098
  return new RegexValidator();
84923
85099
  }, "surveyvalidator");
84924
85100
  _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("emailvalidator", [], function () {