survey-react 1.11.3 → 1.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.3
2
+ * surveyjs - Survey JavaScript library v1.11.5
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -909,6 +909,13 @@ var BaseAction = /** @class */ (function (_super) {
909
909
  enumerable: false,
910
910
  configurable: true
911
911
  });
912
+ Object.defineProperty(BaseAction.prototype, "hasSubItems", {
913
+ get: function () {
914
+ return !!this.items && this.items.length > 0;
915
+ },
916
+ enumerable: false,
917
+ configurable: true
918
+ });
912
919
  BaseAction.prototype.getActionBarItemTitleCss = function () {
913
920
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
914
921
  .append(this.cssClasses.itemTitle)
@@ -1095,11 +1102,13 @@ var Action = /** @class */ (function (_super) {
1095
1102
  Action.prototype.createLocTitle = function () {
1096
1103
  return this.createLocalizableString("title", this, true);
1097
1104
  };
1098
- Action.prototype.setItems = function (items, onSelectionChanged) {
1105
+ Action.prototype.setSubItems = function (options) {
1099
1106
  this.markerIconName = "icon-next_16x16";
1100
1107
  this.component = "sv-list-item-group";
1101
- this.items = __spreadArray([], items);
1102
- var popupModel = createPopupModelWithListModel({ items: items, onSelectionChanged: onSelectionChanged, searchEnabled: false }, { horizontalPosition: "right", showPointer: false, canShrink: false });
1108
+ this.items = __spreadArray([], options.items);
1109
+ var listOptions = Object.assign({}, options);
1110
+ listOptions.searchEnabled = false;
1111
+ var popupModel = createPopupModelWithListModel(listOptions, { horizontalPosition: "right", showPointer: false, canShrink: false });
1103
1112
  popupModel.cssClass = "sv-popup-inner";
1104
1113
  this.popupModel = popupModel;
1105
1114
  };
@@ -1650,9 +1659,6 @@ var ActionContainer = /** @class */ (function (_super) {
1650
1659
  itemValue.showPopupDelayed(_this.subItemsShowDelay);
1651
1660
  _this.popupAfterShowCallback(itemValue);
1652
1661
  }
1653
- else if (!!action.popupModel && action.popupModel.isVisible) {
1654
- action.hidePopupDelayed(_this.subItemsHideDelay);
1655
- }
1656
1662
  });
1657
1663
  };
1658
1664
  ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
@@ -2925,7 +2931,8 @@ var Base = /** @class */ (function () {
2925
2931
  configurable: true
2926
2932
  });
2927
2933
  Base.prototype.afterRerender = function () {
2928
- this.onElementRerendered.fire(this, undefined);
2934
+ var _a;
2935
+ (_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, undefined);
2929
2936
  };
2930
2937
  Base.currentDependencis = undefined;
2931
2938
  return Base;
@@ -4639,6 +4646,7 @@ __webpack_require__.r(__webpack_exports__);
4639
4646
 
4640
4647
  var modernCss = {
4641
4648
  root: "sv-root-modern",
4649
+ rootProgress: "sv-progress",
4642
4650
  timerRoot: "sv-body__timer",
4643
4651
  container: "sv-container-modern",
4644
4652
  header: "sv-title sv-container-modern__title",
@@ -5106,6 +5114,7 @@ __webpack_require__.r(__webpack_exports__);
5106
5114
 
5107
5115
  var defaultStandardCss = {
5108
5116
  root: "sv_main sv_default_css",
5117
+ rootProgress: "sv_progress",
5109
5118
  container: "sv_container",
5110
5119
  header: "sv_header",
5111
5120
  bodyContainer: "sv-components-row",
@@ -5549,6 +5558,7 @@ var surveyCss = {
5549
5558
  };
5550
5559
  var defaultV2Css = {
5551
5560
  root: "sd-root-modern",
5561
+ rootProgress: "sd-progress",
5552
5562
  rootMobile: "sd-root-modern--mobile",
5553
5563
  rootAnimationDisabled: "sd-root-modern--animation-disabled",
5554
5564
  rootReadOnly: "sd-root--readonly",
@@ -6939,12 +6949,12 @@ var DragDropChoices = /** @class */ (function (_super) {
6939
6949
  if (!draggedElementShortcut)
6940
6950
  return;
6941
6951
  // draggedElementShortcut.innerText = text;
6942
- draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n font-family: var(--sjs-font-family, var(--font-family, var(--sjs-default-font-family)));\n ";
6952
+ draggedElementShortcut.className = "sv-drag-drop-choices-shortcut";
6943
6953
  var isDeepClone = true;
6944
6954
  var clone = (draggedElementNode
6945
6955
  .closest("[data-sv-drop-target-item-value]")
6946
6956
  .cloneNode(isDeepClone));
6947
- clone.style.cssText = "\n min-width: 100px;\n box-shadow: var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n border-radius: calc(4.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n padding-right: calc(2* var(--sjs-base-unit, var(--base-unit, 8px)));\n margin-left: 0;\n ";
6957
+ clone.classList.add("sv-drag-drop-choices-shortcut__content");
6948
6958
  var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
6949
6959
  dragIcon.style.visibility = "visible";
6950
6960
  var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
@@ -6958,6 +6968,9 @@ var DragDropChoices = /** @class */ (function (_super) {
6958
6968
  draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
6959
6969
  draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
6960
6970
  this.isBottom = null;
6971
+ if (typeof this.onShortcutCreated === "function") {
6972
+ this.onShortcutCreated(draggedElementShortcut);
6973
+ }
6961
6974
  return draggedElementShortcut;
6962
6975
  };
6963
6976
  DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
@@ -7912,9 +7925,13 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7912
7925
  }
7913
7926
  return _super.prototype.calculateIsBottom.call(this, clientY);
7914
7927
  };
7915
- DragDropRankingChoices.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
7928
+ DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
7916
7929
  var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
7917
7930
  var toIndex = toChoicesArray.indexOf(this.dropTarget);
7931
+ if (fromIndex < 0 && !!this.draggedElement) {
7932
+ this.draggedElement = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(fromChoicesArray, this.draggedElement.value) || this.draggedElement;
7933
+ fromIndex = fromChoicesArray.indexOf(this.draggedElement);
7934
+ }
7918
7935
  if (toIndex === -1) {
7919
7936
  var length_1 = model.value.length;
7920
7937
  toIndex = length_1;
@@ -7932,7 +7949,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7932
7949
  return { fromIndex: fromIndex, toIndex: toIndex };
7933
7950
  };
7934
7951
  DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
7935
- var _a = this.getIndixies(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
7952
+ var _a = this.getIndices(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
7936
7953
  this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
7937
7954
  };
7938
7955
  DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
@@ -8062,7 +8079,7 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
8062
8079
  };
8063
8080
  DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
8064
8081
  var questionModel = this.parentElement;
8065
- var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
8082
+ var _a = this.getIndices(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
8066
8083
  rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
8067
8084
  };
8068
8085
  Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
@@ -8161,6 +8178,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8161
8178
  _this.onSelectionChanged = onSelectionChanged;
8162
8179
  _this.minPageSize = 25;
8163
8180
  _this.loadingItemHeight = 40;
8181
+ _this.timer = undefined;
8164
8182
  _this._markdownMode = false;
8165
8183
  _this.filteredItems = undefined;
8166
8184
  _this.selectedItemSelector = ".sv-list__item--selected";
@@ -8215,28 +8233,43 @@ var DropdownListModel = /** @class */ (function (_super) {
8215
8233
  this.listModel.isAllDataLoaded = this.question.choicesLazyLoadEnabled && this.itemsSettings.items.length == this.itemsSettings.totalCount;
8216
8234
  this.question.choices = this.itemsSettings.items;
8217
8235
  };
8236
+ DropdownListModel.prototype.loadQuestionChoices = function (callbackAfterItemsLoaded) {
8237
+ var _this = this;
8238
+ this.isRunningLoadQuestionChoices = true;
8239
+ this.question.survey.loadQuestionChoices({
8240
+ question: this.question,
8241
+ filter: this.filterString,
8242
+ skip: this.itemsSettings.skip,
8243
+ take: this.itemsSettings.take,
8244
+ setItems: function (items, totalCount) {
8245
+ _this.isRunningLoadQuestionChoices = false;
8246
+ _this.setItems(items || [], totalCount || 0);
8247
+ _this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
8248
+ if (!!callbackAfterItemsLoaded) {
8249
+ callbackAfterItemsLoaded();
8250
+ }
8251
+ }
8252
+ });
8253
+ this.itemsSettings.skip += this.itemsSettings.take;
8254
+ };
8218
8255
  DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
8219
8256
  var _this = this;
8220
8257
  if (this.isRunningLoadQuestionChoices)
8221
8258
  return;
8222
8259
  var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
8223
8260
  if (!this.itemsSettings.skip || isUpdate) {
8224
- this.isRunningLoadQuestionChoices = true;
8225
- this.question.survey.loadQuestionChoices({
8226
- question: this.question,
8227
- filter: this.filterString,
8228
- skip: this.itemsSettings.skip,
8229
- take: this.itemsSettings.take,
8230
- setItems: function (items, totalCount) {
8231
- _this.isRunningLoadQuestionChoices = false;
8232
- _this.setItems(items || [], totalCount || 0);
8233
- _this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
8234
- if (!!callbackAfterItemsLoaded) {
8235
- callbackAfterItemsLoaded();
8236
- }
8261
+ if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
8262
+ if (!!this.timer) {
8263
+ clearTimeout(this.timer);
8264
+ this.timer = undefined;
8237
8265
  }
8238
- });
8239
- this.itemsSettings.skip += this.itemsSettings.take;
8266
+ this.timer = setTimeout(function () {
8267
+ _this.loadQuestionChoices(callbackAfterItemsLoaded);
8268
+ }, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay);
8269
+ }
8270
+ else {
8271
+ this.loadQuestionChoices(callbackAfterItemsLoaded);
8272
+ }
8240
8273
  }
8241
8274
  };
8242
8275
  DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
@@ -8579,7 +8612,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8579
8612
  this.listModel.setItems(this.getAvailableItems());
8580
8613
  };
8581
8614
  DropdownListModel.prototype.onClick = function (event) {
8582
- if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle)
8615
+ if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle || this.question.isReadOnlyAttr)
8583
8616
  return;
8584
8617
  this._popupModel.toggleVisibility();
8585
8618
  this.focusItemOnClickAndPopup();
@@ -9904,8 +9937,8 @@ __webpack_require__.r(__webpack_exports__);
9904
9937
 
9905
9938
  var Version;
9906
9939
  var ReleaseDate;
9907
- Version = "" + "1.11.3";
9908
- ReleaseDate = "" + "2024-06-18";
9940
+ Version = "" + "1.11.5";
9941
+ ReleaseDate = "" + "2024-07-03";
9909
9942
  function checkLibraryVersion(ver, libraryName) {
9910
9943
  if (Version != ver) {
9911
9944
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -17133,6 +17166,11 @@ var DomWindowHelper = /** @class */ (function () {
17133
17166
  return;
17134
17167
  window.removeEventListener(type, listener);
17135
17168
  };
17169
+ DomWindowHelper.matchMedia = function (mediaQueryString) {
17170
+ if (!DomWindowHelper.isAvailable() || typeof window.matchMedia === "undefined")
17171
+ return null;
17172
+ return window.matchMedia(mediaQueryString);
17173
+ };
17136
17174
  return DomWindowHelper;
17137
17175
  }());
17138
17176
 
@@ -18656,7 +18694,7 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\
18656
18694
  /*! no static exports found */
18657
18695
  /***/ (function(module, exports) {
18658
18696
 
18659
- module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><g><path d=\"M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z\" fill=\"none\"></path><path d=\"M24.4663 34.6154L24 34.3695L23.5336 34.6154L14.4788 39.389L16.2156 29.2691L16.3044 28.7517L15.9289 28.3848L8.57358 21.1966L18.7249 19.7094L19.245 19.6332L19.4772 19.1616L24 9.97413L28.5228 19.1616L28.755 19.6332L29.275 19.7094L39.4264 21.1966L32.0711 28.3848L31.6956 28.7517L31.7844 29.2691L33.5211 39.389L24.4663 34.6154Z\"></path></g></svg>"
18697
+ module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z\" fill=\"none\" stroke-width=\"2\"></path><path d=\"M24.3981 33.1305L24 32.9206L23.6019 33.1305L15.8715 37.2059L17.3542 28.5663L17.43 28.1246L17.1095 27.8113L10.83 21.6746L19.4965 20.4049L19.9405 20.3399L20.1387 19.9373L24 12.0936L27.8613 19.9373L28.0595 20.3399L28.5035 20.4049L37.17 21.6746L30.8905 27.8113L30.57 28.1246L30.6458 28.5663L32.1285 37.2059L24.3981 33.1305Z\" stroke-width=\"1.70746\"></path></svg>"
18660
18698
 
18661
18699
  /***/ }),
18662
18700
 
@@ -21521,6 +21559,7 @@ var defaultListCss = {
21521
21559
  searchClearButtonIcon: "sv-list__filter-clear-button",
21522
21560
  loadingIndicator: "sv-list__loading-indicator",
21523
21561
  itemSelected: "sv-list__item--selected",
21562
+ itemGroup: "sv-list__item--group",
21524
21563
  itemWithIcon: "sv-list__item--with-icon",
21525
21564
  itemDisabled: "sv-list__item--disabled",
21526
21565
  itemFocused: "sv-list__item--focused",
@@ -21586,6 +21625,7 @@ var ListModel = /** @class */ (function (_super) {
21586
21625
  .append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
21587
21626
  .append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
21588
21627
  .append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
21628
+ .append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
21589
21629
  .append(_this.cssClasses.itemHovered, itemValue.isHovered)
21590
21630
  .append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
21591
21631
  .append(itemValue.css)
@@ -22690,6 +22730,7 @@ var arabicSurveyStrings = {
22690
22730
  };
22691
22731
  survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ar"] = arabicSurveyStrings;
22692
22732
  survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ar"] = "العربية";
22733
+ survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeDirections["ar"] = "rtl";
22693
22734
  // The following strings have been translated by a machine translation service
22694
22735
  // Remove those strings that you have corrected manually
22695
22736
  // indexText: "{0} of {1}" => "{0} من {1}"
@@ -30490,11 +30531,15 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
30490
30531
  };
30491
30532
  QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
30492
30533
  if (this.hideIfRowsEmpty) {
30493
- this.visible =
30494
- this.rows.length > 0 &&
30495
- (!this.filteredRows || this.filteredRows.length > 0);
30534
+ this.onVisibleChanged();
30496
30535
  }
30497
30536
  };
30537
+ QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
30538
+ var res = _super.prototype.isVisibleCore.call(this);
30539
+ if (!res || !this.hideIfRowsEmpty)
30540
+ return res;
30541
+ return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
30542
+ };
30498
30543
  QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
30499
30544
  return !this.survey || !this.survey.areInvisibleElementsShowing;
30500
30545
  };
@@ -30537,6 +30582,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
30537
30582
  : null;
30538
30583
  this.filteredRows = [];
30539
30584
  var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
30585
+ _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
30540
30586
  if (this.filteredRows.length === this.rows.length) {
30541
30587
  this.filteredRows = null;
30542
30588
  }
@@ -30838,6 +30884,10 @@ var InputMaskBase = /** @class */ (function (_super) {
30838
30884
  function InputMaskBase() {
30839
30885
  return _super !== null && _super.apply(this, arguments) || this;
30840
30886
  }
30887
+ InputMaskBase.prototype.getSurvey = function (live) {
30888
+ if (live === void 0) { live = false; }
30889
+ return this.owner;
30890
+ };
30841
30891
  InputMaskBase.prototype.getType = function () {
30842
30892
  return "masksettings";
30843
30893
  };
@@ -33373,11 +33423,22 @@ var PanelModelBase = /** @class */ (function (_super) {
33373
33423
  });
33374
33424
  PanelModelBase.prototype.delete = function (doDispose) {
33375
33425
  if (doDispose === void 0) { doDispose = true; }
33426
+ this.deletePanel();
33376
33427
  this.removeFromParent();
33377
33428
  if (doDispose) {
33378
33429
  this.dispose();
33379
33430
  }
33380
33431
  };
33432
+ PanelModelBase.prototype.deletePanel = function () {
33433
+ var els = this.elements;
33434
+ for (var i = 0; i < els.length; i++) {
33435
+ var el = els[i];
33436
+ if (el.isPanel) {
33437
+ el.deletePanel();
33438
+ }
33439
+ this.onRemoveElementNotifySurvey(el);
33440
+ }
33441
+ };
33381
33442
  PanelModelBase.prototype.removeFromParent = function () { };
33382
33443
  PanelModelBase.prototype.canShowTitle = function () { return true; };
33383
33444
  Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
@@ -34156,6 +34217,23 @@ var PanelModelBase = /** @class */ (function (_super) {
34156
34217
  return this.parent.getQuestionTitleLocation();
34157
34218
  return this.survey ? this.survey.questionTitleLocation : "top";
34158
34219
  };
34220
+ PanelModelBase.prototype.availableQuestionTitleWidth = function () {
34221
+ var questionTitleLocation = this.getQuestionTitleLocation();
34222
+ if (questionTitleLocation === "left")
34223
+ return true;
34224
+ return this.hasElementWithTitleLocationLeft();
34225
+ };
34226
+ PanelModelBase.prototype.hasElementWithTitleLocationLeft = function () {
34227
+ var result = this.elements.some(function (el) {
34228
+ if (el instanceof PanelModelBase) {
34229
+ return el.hasElementWithTitleLocationLeft();
34230
+ }
34231
+ else if (el instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
34232
+ return el.getTitleLocation() === "left";
34233
+ }
34234
+ });
34235
+ return result;
34236
+ };
34159
34237
  PanelModelBase.prototype.getQuestionTitleWidth = function () {
34160
34238
  return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
34161
34239
  };
@@ -34362,17 +34440,20 @@ var PanelModelBase = /** @class */ (function (_super) {
34362
34440
  this.updateRowsOnElementRemoved(element);
34363
34441
  if (this.isRandomizing)
34364
34442
  return;
34443
+ this.onRemoveElementNotifySurvey(element);
34444
+ if (!!this.removeElementCallback)
34445
+ this.removeElementCallback(element);
34446
+ this.onElementVisibilityChanged(this);
34447
+ };
34448
+ PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
34449
+ if (!this.survey)
34450
+ return;
34365
34451
  if (!element.isPanel) {
34366
- if (this.survey)
34367
- this.survey.questionRemoved(element);
34452
+ this.survey.questionRemoved(element);
34368
34453
  }
34369
34454
  else {
34370
- if (this.survey)
34371
- this.survey.panelRemoved(element);
34455
+ this.survey.panelRemoved(element);
34372
34456
  }
34373
- if (!!this.removeElementCallback)
34374
- this.removeElementCallback(element);
34375
- this.onElementVisibilityChanged(this);
34376
34457
  };
34377
34458
  PanelModelBase.prototype.onElementVisibilityChanged = function (element) {
34378
34459
  if (this.isLoadingFromJson || this.isRandomizing)
@@ -35363,7 +35444,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
35363
35444
  {
35364
35445
  name: "questionTitleWidth",
35365
35446
  visibleIf: function (obj) {
35366
- return !!obj && obj["getQuestionTitleLocation"]() === "left";
35447
+ return !!obj && obj["availableQuestionTitleWidth"]();
35367
35448
  }
35368
35449
  },
35369
35450
  {
@@ -38448,7 +38529,8 @@ var ProgressButtons = /** @class */ (function (_super) {
38448
38529
  return;
38449
38530
  var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
38450
38531
  var circleWidth = this.showItemNumbers ? 17 : 5;
38451
- var connectorWidth = listContainerElement.clientWidth / (listContainerElement.children.length - 1) - circleWidth;
38532
+ var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
38533
+ var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
38452
38534
  for (var i = 0; i < listContainerElements.length; i++) {
38453
38535
  listContainerElements[i].style.width = connectorWidth + "px";
38454
38536
  }
@@ -38466,7 +38548,7 @@ var ProgressButtons = /** @class */ (function (_super) {
38466
38548
  Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
38467
38549
  get: function () {
38468
38550
  if (this.isFitToSurveyWidth) {
38469
- return this.survey.width;
38551
+ return this.survey.renderedWidth;
38470
38552
  }
38471
38553
  return "";
38472
38554
  },
@@ -38646,6 +38728,9 @@ var TriggerExpressionInfo = /** @class */ (function () {
38646
38728
  }
38647
38729
  return TriggerExpressionInfo;
38648
38730
  }());
38731
+ function querySelectorIncludingSelf(el, selector) {
38732
+ return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
38733
+ }
38649
38734
  /**
38650
38735
  * A base class for all questions.
38651
38736
  */
@@ -39149,9 +39234,7 @@ var Question = /** @class */ (function (_super) {
39149
39234
  if (!this.setValueExpressionRunner) {
39150
39235
  this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
39151
39236
  this.setValueExpressionRunner.onRunComplete = function (res) {
39152
- if (!_this.isTwoValueEquals(_this.value, res)) {
39153
- _this.value = res;
39154
- }
39237
+ _this.runExpressionSetValue(res);
39155
39238
  };
39156
39239
  }
39157
39240
  else {
@@ -40210,7 +40293,8 @@ var Question = /** @class */ (function (_super) {
40210
40293
  var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
40211
40294
  var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
40212
40295
  var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
40213
- return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly;
40296
+ var callbackVal = !!this.readOnlyCallback && this.readOnlyCallback();
40297
+ return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly || callbackVal;
40214
40298
  },
40215
40299
  enumerable: false,
40216
40300
  configurable: true
@@ -40369,6 +40453,13 @@ var Question = /** @class */ (function (_super) {
40369
40453
  return undefined;
40370
40454
  return this.survey.runExpression(expression);
40371
40455
  };
40456
+ Object.defineProperty(Question.prototype, "commentAreaRows", {
40457
+ get: function () {
40458
+ return this.survey && this.survey.commentAreaRows;
40459
+ },
40460
+ enumerable: false,
40461
+ configurable: true
40462
+ });
40372
40463
  Object.defineProperty(Question.prototype, "autoGrowComment", {
40373
40464
  get: function () {
40374
40465
  return this.survey && this.survey.autoGrowComment;
@@ -40923,7 +41014,7 @@ var Question = /** @class */ (function (_super) {
40923
41014
  if (values === void 0) { values = null; }
40924
41015
  if (properties === void 0) { properties = null; }
40925
41016
  var func = function (val) {
40926
- _this.runExpressionSetValue(val, setFunc);
41017
+ _this.runExpressionSetValueCore(val, setFunc);
40927
41018
  };
40928
41019
  if (!this.runDefaultValueExpression(runner, values, properties, func)) {
40929
41020
  func(defaultValue);
@@ -40932,9 +41023,17 @@ var Question = /** @class */ (function (_super) {
40932
41023
  Question.prototype.convertFuncValuetoQuestionValue = function (val) {
40933
41024
  return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val);
40934
41025
  };
40935
- Question.prototype.runExpressionSetValue = function (val, setFunc) {
41026
+ Question.prototype.runExpressionSetValueCore = function (val, setFunc) {
40936
41027
  setFunc(this.convertFuncValuetoQuestionValue(val));
40937
41028
  };
41029
+ Question.prototype.runExpressionSetValue = function (val) {
41030
+ var _this = this;
41031
+ this.runExpressionSetValueCore(val, function (val) {
41032
+ if (!_this.isTwoValueEquals(_this.value, val)) {
41033
+ _this.value = val;
41034
+ }
41035
+ });
41036
+ };
40938
41037
  Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
40939
41038
  var _this = this;
40940
41039
  if (values === void 0) { values = null; }
@@ -40943,11 +41042,7 @@ var Question = /** @class */ (function (_super) {
40943
41042
  return false;
40944
41043
  if (!setFunc) {
40945
41044
  setFunc = function (val) {
40946
- _this.runExpressionSetValue(val, function (val) {
40947
- if (!_this.isTwoValueEquals(_this.value, val)) {
40948
- _this.value = val;
40949
- }
40950
- });
41045
+ _this.runExpressionSetValue(val);
40951
41046
  };
40952
41047
  }
40953
41048
  if (!values)
@@ -41564,7 +41659,7 @@ var Question = /** @class */ (function (_super) {
41564
41659
  var scrollableSelector_1 = this.getObservedElementSelector();
41565
41660
  if (!scrollableSelector_1)
41566
41661
  return;
41567
- var defaultRootEl = el.querySelector(scrollableSelector_1);
41662
+ var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
41568
41663
  if (!defaultRootEl)
41569
41664
  return;
41570
41665
  var isProcessed_1 = false;
@@ -41576,7 +41671,7 @@ var Question = /** @class */ (function (_super) {
41576
41671
  isProcessed_1 = false;
41577
41672
  }
41578
41673
  var callback = function () {
41579
- var rootEl = el.querySelector(scrollableSelector_1);
41674
+ var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
41580
41675
  if (!requiredWidth_1 && _this.isDefaultRendering()) {
41581
41676
  requiredWidth_1 = rootEl.scrollWidth;
41582
41677
  }
@@ -41601,8 +41696,10 @@ var Question = /** @class */ (function (_super) {
41601
41696
  });
41602
41697
  this.onMobileChangedCallback = function () {
41603
41698
  setTimeout(function () {
41604
- var rootEl = el.querySelector(scrollableSelector_1);
41605
- _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
41699
+ var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
41700
+ if (rootEl) {
41701
+ _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
41702
+ }
41606
41703
  }, 0);
41607
41704
  };
41608
41705
  this.resizeObserver.observe(el);
@@ -42235,6 +42332,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
42235
42332
  _this.isUpdatingChoicesDependedQuestions = false;
42236
42333
  _this.headItemsCount = 0;
42237
42334
  _this.footItemsCount = 0;
42335
+ _this.allowMultiColumns = true;
42238
42336
  _this.prevIsOtherSelected = false;
42239
42337
  _this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
42240
42338
  _this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
@@ -44255,9 +44353,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
44255
44353
  enumerable: false,
44256
44354
  configurable: true
44257
44355
  });
44356
+ QuestionSelectBase.prototype.getObservedElementSelector = function () {
44357
+ return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
44358
+ };
44359
+ QuestionSelectBase.prototype.supportResponsiveness = function () {
44360
+ return true;
44361
+ };
44362
+ QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
44363
+ _super.prototype.onBeforeSetDesktopRenderer.call(this);
44364
+ this.allowMultiColumns = false;
44365
+ };
44366
+ QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
44367
+ _super.prototype.onBeforeSetDesktopRenderer.call(this);
44368
+ this.allowMultiColumns = true;
44369
+ };
44258
44370
  Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
44259
44371
  get: function () {
44260
- return !this.isMobile &&
44372
+ return !this.isMobile && this.allowMultiColumns &&
44261
44373
  (this.getCurrentColCount() > 1);
44262
44374
  },
44263
44375
  enumerable: false,
@@ -44374,6 +44486,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
44374
44486
  Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
44375
44487
  /**
44376
44488
  * The name of a component used to render items.
44489
+ *
44490
+ * [View Dropdown Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
44491
+ *
44492
+ * [View Ranking Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
44377
44493
  */
44378
44494
  get: function () {
44379
44495
  return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
@@ -44411,6 +44527,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
44411
44527
  __decorate([
44412
44528
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
44413
44529
  ], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
44530
+ __decorate([
44531
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
44532
+ ], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
44414
44533
  return QuestionSelectBase;
44415
44534
  }(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
44416
44535
 
@@ -44761,23 +44880,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
44761
44880
  enumerable: false,
44762
44881
  configurable: true
44763
44882
  });
44764
- QuestionBooleanModel.prototype.updateThumbMargin = function () {
44765
- var _this = this;
44766
- if (!this.isIndeterminate && this.leftAnswerElement) {
44767
- if (!this.swapOrder && this.value === this.getValueTrue() || this.swapOrder && this.value === this.getValueFalse()) {
44768
- var el_1 = this.leftAnswerElement;
44769
- setTimeout(function () {
44770
- _this.thumbMargin = el_1.clientWidth + (_this.swapOrder ? 4 : 2) + "px";
44771
- }, 50);
44772
- }
44773
- }
44774
- this.thumbMargin = undefined;
44775
- };
44776
- QuestionBooleanModel.prototype.afterRender = function (el) {
44777
- _super.prototype.afterRender.call(this, el);
44778
- this.leftAnswerElement = el.querySelectorAll("." + this.cssClasses.sliderGhost)[0];
44779
- this.updateThumbMargin();
44780
- };
44781
44883
  QuestionBooleanModel.prototype.beforeDestroyQuestionElement = function (el) {
44782
44884
  _super.prototype.beforeDestroyQuestionElement.call(this, el);
44783
44885
  this.leftAnswerElement = undefined;
@@ -44929,11 +45031,9 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
44929
45031
  QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
44930
45032
  if (clearData === void 0) { clearData = false; }
44931
45033
  _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
44932
- this.updateThumbMargin();
44933
45034
  };
44934
45035
  QuestionBooleanModel.prototype.onValueChanged = function () {
44935
45036
  _super.prototype.onValueChanged.call(this);
44936
- this.updateThumbMargin();
44937
45037
  };
44938
45038
  Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
44939
45039
  get: function () {
@@ -45061,12 +45161,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
45061
45161
  __decorate([
45062
45162
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
45063
45163
  ], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
45064
- __decorate([
45065
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
45066
- ], QuestionBooleanModel.prototype, "leftAnswerElement", void 0);
45067
- __decorate([
45068
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
45069
- ], QuestionBooleanModel.prototype, "thumbMargin", void 0);
45070
45164
  __decorate([
45071
45165
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
45072
45166
  ], QuestionBooleanModel.prototype, "showTitle", void 0);
@@ -45566,7 +45660,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
45566
45660
  }
45567
45661
  else {
45568
45662
  if (this.isNoneItem(item)) {
45569
- this.renderedValue = [item.value];
45663
+ this.renderedValue = checked ? [item.value] : [];
45570
45664
  }
45571
45665
  else {
45572
45666
  var newValue = [].concat(this.renderedValue || []);
@@ -45665,7 +45759,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
45665
45759
  if (!itemValues.length && !selectedItemValues) {
45666
45760
  this.updateSelectedItemValues();
45667
45761
  }
45668
- return this.validateItemValues(itemValues);
45762
+ var validValues = this.validateItemValues(itemValues);
45763
+ return validValues;
45669
45764
  },
45670
45765
  enumerable: false,
45671
45766
  configurable: true
@@ -46123,7 +46218,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
46123
46218
  });
46124
46219
  Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
46125
46220
  get: function () {
46126
- return "listbox";
46221
+ return "group";
46222
+ },
46223
+ enumerable: false,
46224
+ configurable: true
46225
+ });
46226
+ Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRequired", {
46227
+ get: function () {
46228
+ return null;
46127
46229
  },
46128
46230
  enumerable: false,
46129
46231
  configurable: true
@@ -46475,9 +46577,12 @@ var ComponentQuestionJSON = /** @class */ (function () {
46475
46577
  this.json.onUpdateQuestionCssClasses(question, element, css);
46476
46578
  };
46477
46579
  ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
46478
- if (!this.json.onSetQuestionValue)
46479
- return;
46480
- this.json.onSetQuestionValue(question, newValue);
46580
+ if (this.json.onSetQuestionValue) {
46581
+ this.json.onSetQuestionValue(question, newValue);
46582
+ }
46583
+ if (this.json.onValueSet) {
46584
+ this.json.onValueSet(question, newValue);
46585
+ }
46481
46586
  };
46482
46587
  ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
46483
46588
  if (!this.json.onPropertyChanged)
@@ -47868,7 +47973,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
47868
47973
  return _super.prototype.hasUnknownValue.call(this, val, true, false);
47869
47974
  };
47870
47975
  QuestionDropdownModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
47871
- if (this.choicesLazyLoadEnabled && !this.dropdownListModel.isAllDataLoaded) {
47976
+ if (this.choicesLazyLoadEnabled) {
47872
47977
  return this.createItemValue(value, text);
47873
47978
  }
47874
47979
  else {
@@ -51967,6 +52072,8 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
51967
52072
  enumerable: false,
51968
52073
  configurable: true
51969
52074
  });
52075
+ MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
52076
+ MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
51970
52077
  return MatrixDropdownRowModel;
51971
52078
  }(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));
51972
52079
 
@@ -52265,7 +52372,9 @@ var MatrixDropdownCell = /** @class */ (function () {
52265
52372
  this.question.locStrsChanged();
52266
52373
  };
52267
52374
  MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
52375
+ var _this = this;
52268
52376
  var res = data.createQuestion(this.row, this.column);
52377
+ res.readOnlyCallback = function () { return !_this.row.isRowEnabled(); };
52269
52378
  res.validateValueCallback = function () {
52270
52379
  return data.validateCell(row, column.name, row.value);
52271
52380
  };
@@ -52451,6 +52560,8 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
52451
52560
  enumerable: false,
52452
52561
  configurable: true
52453
52562
  });
52563
+ MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
52564
+ MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
52454
52565
  Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
52455
52566
  get: function () {
52456
52567
  var result = {};
@@ -52627,6 +52738,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
52627
52738
  if (!!this.detailPanel) {
52628
52739
  this.detailPanel.runCondition(values, newProps);
52629
52740
  }
52741
+ if (this.isRowHasEnabledCondition()) {
52742
+ this.onQuestionReadOnlyChanged();
52743
+ }
52630
52744
  };
52631
52745
  MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
52632
52746
  var res = [];
@@ -52881,14 +52995,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
52881
52995
  return;
52882
52996
  this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
52883
52997
  };
52884
- MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (parentIsReadOnly) {
52998
+ MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function () {
52885
52999
  var questions = this.questions;
52886
53000
  for (var i = 0; i < questions.length; i++) {
52887
53001
  var q = questions[i];
52888
53002
  q.setPropertyValue("isReadOnly", q.isReadOnly);
52889
53003
  }
52890
53004
  if (!!this.detailPanel) {
52891
- this.detailPanel.readOnly = parentIsReadOnly;
53005
+ var parentIsReadOnly = !!this.data && this.data.isMatrixReadOnly();
53006
+ this.detailPanel.readOnly = parentIsReadOnly || !this.isRowEnabled();
52892
53007
  }
52893
53008
  };
52894
53009
  MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
@@ -54151,7 +54266,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54151
54266
  return questionPlainData;
54152
54267
  };
54153
54268
  QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
54154
- var hasContext = !!context ? context === true || this.columns.indexOf(context) > -1 : false;
54269
+ var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
54270
+ var hasContext = context === true || hasColumnContext;
54155
54271
  var rowsIndeces = this.getConditionObjectsRowIndeces();
54156
54272
  if (hasContext) {
54157
54273
  rowsIndeces.push(-1);
@@ -54178,6 +54294,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54178
54294
  if (index === -1 && context === true) {
54179
54295
  obj.context = this;
54180
54296
  }
54297
+ else {
54298
+ if (hasColumnContext && prefixName.startsWith("row.")) {
54299
+ obj.context = context;
54300
+ }
54301
+ }
54181
54302
  objects.push(obj);
54182
54303
  }
54183
54304
  }
@@ -54512,7 +54633,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54512
54633
  if (!this.generateRows)
54513
54634
  return;
54514
54635
  for (var i = 0; i < this.visibleRows.length; i++) {
54515
- this.visibleRows[i].onQuestionReadOnlyChanged(this.isReadOnly);
54636
+ this.visibleRows[i].onQuestionReadOnlyChanged();
54516
54637
  }
54517
54638
  };
54518
54639
  //IMatrixDropdownData
@@ -54738,7 +54859,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54738
54859
  if (this.isDesignMode)
54739
54860
  return this.detailPanel;
54740
54861
  var panel = this.createNewDetailPanel();
54741
- panel.readOnly = this.isReadOnly;
54862
+ panel.readOnly = this.isReadOnly || !row.isRowEnabled();
54742
54863
  panel.setSurveyImpl(row);
54743
54864
  var json = this.detailPanel.toJSON();
54744
54865
  new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
@@ -54778,6 +54899,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54778
54899
  return data.getTextProcessor();
54779
54900
  return null;
54780
54901
  };
54902
+ QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
54781
54903
  QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
54782
54904
  if (index >= this.visibleRows.length)
54783
54905
  return null;
@@ -54856,6 +54978,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
54856
54978
  visible: false,
54857
54979
  isLightSerializable: false,
54858
54980
  },
54981
+ { name: "columnsVisibleIf", visible: false },
54859
54982
  {
54860
54983
  name: "detailPanelMode",
54861
54984
  choices: ["none", "underRow", "underRowSingle"],
@@ -62971,13 +63094,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62971
63094
  if (_this.allowStartDrag &&
62972
63095
  _this.canStartDragDueMaxSelectedChoices(target) &&
62973
63096
  _this.canStartDragDueItemEnabled(choice)) {
62974
- _this.draggedChoise = choice;
63097
+ _this.draggedChoiceValue = choice.value;
62975
63098
  _this.draggedTargetNode = node;
62976
63099
  _this.dragOrClickHelper.onPointerDown(event);
62977
63100
  }
62978
63101
  };
62979
63102
  _this.startDrag = function (event) {
62980
- _this.dragDropRankingChoices.startDrag(event, _this.draggedChoise, _this, _this.draggedTargetNode);
63103
+ var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(_this.activeChoices, _this.draggedChoiceValue);
63104
+ _this.dragDropRankingChoices.startDrag(event, choice, _this, _this.draggedTargetNode);
62981
63105
  };
62982
63106
  _this.handlePointerUp = function (event, choice, node) {
62983
63107
  if (!_this.selectToRankEnabled)
@@ -63033,9 +63157,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
63033
63157
  _this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__["DragOrClickHelper"](_this.startDrag);
63034
63158
  return _this;
63035
63159
  }
63036
- QuestionRankingModel.prototype.getDefaultItemComponent = function () {
63037
- return "";
63038
- };
63039
63160
  QuestionRankingModel.prototype.getType = function () {
63040
63161
  return "ranking";
63041
63162
  };
@@ -63458,19 +63579,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
63458
63579
  enumerable: false,
63459
63580
  configurable: true
63460
63581
  });
63461
- Object.defineProperty(QuestionRankingModel.prototype, "itemContentComponent", {
63462
- /**
63463
- * The name of a component used to render items.
63464
- */
63465
- get: function () {
63466
- return this.getPropertyValue("itemContentComponent", "sv-ranking-item-content");
63467
- },
63468
- set: function (value) {
63469
- this.setPropertyValue("itemContentComponent", value);
63470
- },
63471
- enumerable: false,
63472
- configurable: true
63473
- });
63582
+ QuestionRankingModel.prototype.getDefaultItemComponent = function () {
63583
+ return "sv-ranking-item";
63584
+ };
63474
63585
  Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
63475
63586
  /**
63476
63587
  * Specifies whether users can select choices they want to rank.
@@ -63663,8 +63774,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
63663
63774
  dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
63664
63775
  return !!obj.selectToRankEnabled;
63665
63776
  }, isSerializable: true },
63666
- { name: "itemComponent", visible: false, default: "" },
63667
- { name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
63777
+ { name: "itemComponent", visible: false, default: "sv-ranking-item" },
63668
63778
  ], function () {
63669
63779
  return new QuestionRankingModel("");
63670
63780
  }, "checkbox");
@@ -64433,20 +64543,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
64433
64543
  if (this.scaleColorMode === "monochrome" && this.rateColorMode == "default" ||
64434
64544
  this.isPreviewStyle ||
64435
64545
  this.isReadOnlyStyle)
64436
- return { borderColor: null, fill: null, backgroundColor: null };
64546
+ return {};
64437
64547
  var index = this.visibleRateValues.indexOf(item);
64438
64548
  var color = this.getRenderedItemColor(index, false);
64439
- if (this.value != this.renderedRateItems[index].value) {
64440
- var colorLight = this.getRenderedItemColor(index, true);
64441
- if (highlight == "highlighted" && this.scaleColorMode === "colored")
64442
- return { borderColor: color, fill: color, backgroundColor: colorLight };
64443
- if (this.scaleColorMode === "colored" && this.errors.length == 0)
64444
- return { borderColor: color, fill: color, backgroundColor: null };
64445
- return { borderColor: null, fill: null, backgroundColor: null };
64446
- }
64447
- else {
64448
- return { borderColor: color, fill: null, backgroundColor: color };
64449
- }
64549
+ var colorLight = highlight == "highlighted" && this.scaleColorMode === "colored" && this.getRenderedItemColor(index, true);
64550
+ return colorLight ? { "--sd-rating-item-color": color, "--sd-rating-item-color-light": colorLight } : { "--sd-rating-item-color": color };
64450
64551
  };
64451
64552
  QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
64452
64553
  var _this = this;
@@ -65632,8 +65733,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
65632
65733
  }
65633
65734
  };
65634
65735
  QuestionTagboxModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
65635
- var _a;
65636
- if (this.choicesLazyLoadEnabled && !((_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.isAllDataLoaded)) {
65736
+ if (this.choicesLazyLoadEnabled) {
65637
65737
  return this.createItemValue(value, text);
65638
65738
  }
65639
65739
  else {
@@ -65914,7 +66014,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
65914
66014
  };
65915
66015
  Object.defineProperty(QuestionTextModel.prototype, "maskTypeIsEmpty", {
65916
66016
  get: function () {
65917
- return this.maskType === "none" || this.inputType !== "text";
66017
+ switch (this.inputType) {
66018
+ case "tel":
66019
+ case "text": return this.maskType === "none";
66020
+ default: return true;
66021
+ }
65918
66022
  },
65919
66023
  enumerable: false,
65920
66024
  configurable: true
@@ -65956,6 +66060,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
65956
66060
  maskClassName = "masksettings";
65957
66061
  }
65958
66062
  var inputMask = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(maskClassName);
66063
+ inputMask.owner = this.survey;
65959
66064
  return inputMask;
65960
66065
  };
65961
66066
  QuestionTextModel.prototype.isTextValue = function () {
@@ -66451,7 +66556,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
66451
66556
  if (this.inputTextAlignment !== "auto") {
66452
66557
  style.textAlign = this.inputTextAlignment;
66453
66558
  }
66454
- else if (this.maskSettings.getTextAlignment() !== "auto") {
66559
+ else if (!this.maskTypeIsEmpty && this.maskSettings.getTextAlignment() !== "auto") {
66455
66560
  style.textAlign = this.maskSettings.getTextAlignment();
66456
66561
  }
66457
66562
  };
@@ -66652,7 +66757,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
66652
66757
  visibleIndex: 0,
66653
66758
  dependsOn: "inputType",
66654
66759
  visibleIf: function (obj) {
66655
- return obj.inputType === "text";
66760
+ return obj.inputType === "text" || obj.inputType === "tel";
66656
66761
  }
66657
66762
  },
66658
66763
  {
@@ -66661,7 +66766,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
66661
66766
  visibleIndex: 1,
66662
66767
  dependsOn: "inputType",
66663
66768
  visibleIf: function (obj) {
66664
- return obj.inputType === "text";
66769
+ return obj.inputType === "text" || obj.inputType === "tel";
66665
66770
  },
66666
66771
  onGetValue: function (obj) {
66667
66772
  return obj.maskSettings.getData();
@@ -67450,7 +67555,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
67450
67555
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
67451
67556
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
67452
67557
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
67453
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider, style: { marginLeft: this.question.thumbMargin } }, this.question.isDeterminated && cssClasses.sliderText ?
67558
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider }, this.question.isDeterminated && cssClasses.sliderText ?
67454
67559
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.sliderText }, this.renderLocString(this.question.getCheckedLabel()))
67455
67560
  : null)),
67456
67561
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, !_this.question.swapOrder); } },
@@ -67964,7 +68069,7 @@ var ComponentsContainer = /** @class */ (function (_super) {
67964
68069
  return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
67965
68070
  }));
67966
68071
  }
67967
- return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" }, components.map(function (component) {
68072
+ return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" + " sv-components-container-" + this.props.container }, components.map(function (component) {
67968
68073
  return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
67969
68074
  }));
67970
68075
  };
@@ -69942,7 +70047,7 @@ var RatingItem = /** @class */ (function (_super) {
69942
70047
  var itemText = this.renderLocString(this.item.locText);
69943
70048
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
69944
70049
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69945
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
70050
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
69946
70051
  };
69947
70052
  RatingItem.prototype.componentDidMount = function () {
69948
70053
  _super.prototype.componentDidMount.call(this);
@@ -72683,7 +72788,7 @@ var Survey = /** @class */ (function (_super) {
72683
72788
  }
72684
72789
  var rootCss = this.survey.getRootCss();
72685
72790
  var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
72686
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables },
72791
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
72687
72792
  this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svgbundle__WEBPACK_IMPORTED_MODULE_10__["SvgBundleComponent"], null) : null,
72688
72793
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.wrapperFormCss },
72689
72794
  backgroundImage,
@@ -73719,7 +73824,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
73719
73824
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
73720
73825
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
73721
73826
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
73722
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange }),
73827
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError() }),
73723
73828
  this.cssClasses.materialDecorator ?
73724
73829
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
73725
73830
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -73868,7 +73973,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
73868
73973
  var comment = this.getComment() || "";
73869
73974
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
73870
73975
  }
73871
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, ref: function (textarea) { return (_this.setControl(textarea)); }, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onBlur: function (e) { _this.onCommentChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
73976
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, ref: function (textarea) { return (_this.setControl(textarea)); }, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), rows: question.commentAreaRows, placeholder: this.getPlaceholder(), onBlur: function (e) { _this.onCommentChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
73872
73977
  };
73873
73978
  return SurveyQuestionCommentItem;
73874
73979
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -76468,7 +76573,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
76468
76573
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.dashSvgIcon })));
76469
76574
  };
76470
76575
  SurveyQuestionRankingItem.prototype.renderElement = function () {
76471
- var itemContentComponent = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(this.question.itemContentComponent, { item: this.item, cssClasses: this.cssClasses });
76576
+ var itemContent = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(this.question.itemComponent, { item: this.item, cssClasses: this.cssClasses });
76472
76577
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
76473
76578
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
76474
76579
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
@@ -76479,7 +76584,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
76479
76584
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.question.getIconFocusCss() },
76480
76585
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.arrowsSvgIcon }))),
76481
76586
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses(this.item) }, (!this.unrankedItem && this.indexText) ? this.indexText : this.renderEmptyIcon()),
76482
- itemContentComponent))));
76587
+ itemContent))));
76483
76588
  };
76484
76589
  return SurveyQuestionRankingItem;
76485
76590
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -76509,7 +76614,7 @@ var SurveyQuestionRankingItemContent = /** @class */ (function (_super) {
76509
76614
  return SurveyQuestionRankingItemContent;
76510
76615
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
76511
76616
 
76512
- _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item-content", function (props) {
76617
+ _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item", function (props) {
76513
76618
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItemContent, props);
76514
76619
  });
76515
76620
  _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("ranking", function (props) {
@@ -78085,11 +78190,19 @@ var settings = {
78085
78190
  */
78086
78191
  ratingMaximumRateValueCount: 20,
78087
78192
  /**
78088
- * Specifies whether to close the drop-down menu of a [TagBox](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
78193
+ * Specifies whether to close the drop-down menu of a [Multi-Select Dropdown (Tag Box)](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
78089
78194
  *
78090
- * This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
78195
+ * This setting applies to all Multi-Select Dropdown questions on a web page. You can use the [`closeOnSelect`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual Multi-Select Dropdown question.
78091
78196
  */
78092
78197
  tagboxCloseOnSelect: false,
78198
+ /**
78199
+ * A time interval in milliseconds between the last entered character and the beginning of search in [Single-](https://surveyjs.io/form-library/examples/create-dropdown-menu-in-javascript/) and [Multi-Select Dropdown](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) questions. Applies only to questions with the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#choicesLazyLoadEnabled) property set to `true`.
78200
+ *
78201
+ * Default value: 500
78202
+ *
78203
+ * [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
78204
+ */
78205
+ dropdownSearchDelay: 500,
78093
78206
  /**
78094
78207
  * A function that activates a browser confirm dialog.
78095
78208
  *
@@ -80849,7 +80962,7 @@ var SurveyModel = /** @class */ (function (_super) {
80849
80962
  */
80850
80963
  _this.onUpdatePageCssClasses = _this.addEvent();
80851
80964
  /**
80852
- * An event that is raised before rendering a choice item in Radio Button Group, Checkboxes, and Dropdown questions. Use it to override default CSS classes applied to choice items.
80965
+ * An event that is raised before rendering a choice item in Radio Button Group and Checkboxes questions. Use it to override default CSS classes applied to choice items.
80853
80966
  *
80854
80967
  * For information on event handler parameters, refer to descriptions within the interface.
80855
80968
  *
@@ -82177,6 +82290,8 @@ var SurveyModel = /** @class */ (function (_super) {
82177
82290
  * - `"onValueChanged"` - Triggers validation each time a question value is changed.
82178
82291
  * - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
82179
82292
  *
82293
+ * > The `"onValueChanged"` doesn't work with date input fields because of the way browsers process date values. In most browsers, the value is considered changed as soon as a user starts entering the date in a text input field. This means that a user may only enter the day without having the chance to enter the month and year before validation is triggered. For this reason, date input fields are validated before the survey is switched to the next page or completed.
82294
+ *
82180
82295
  * Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
82181
82296
  * @see validationEnabled
82182
82297
  * @see validationAllowSwitchPages
@@ -82200,6 +82315,7 @@ var SurveyModel = /** @class */ (function (_super) {
82200
82315
  *
82201
82316
  * You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
82202
82317
  * @see allowResizeComment
82318
+ * @see commentAreaRows
82203
82319
  */
82204
82320
  get: function () {
82205
82321
  return this.getPropertyValue("autoGrowComment");
@@ -82218,6 +82334,7 @@ var SurveyModel = /** @class */ (function (_super) {
82218
82334
  *
82219
82335
  * You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
82220
82336
  * @see autoGrowComment
82337
+ * @see commentAreaRows
82221
82338
  */
82222
82339
  get: function () {
82223
82340
  return this.getPropertyValue("allowResizeComment");
@@ -82228,6 +82345,25 @@ var SurveyModel = /** @class */ (function (_super) {
82228
82345
  enumerable: false,
82229
82346
  configurable: true
82230
82347
  });
82348
+ Object.defineProperty(SurveyModel.prototype, "commentAreaRows", {
82349
+ /**
82350
+ * Specifies the visible height of comment areas, measured in lines. Applies to the questions with the [`showCommentArea`](https://surveyjs.io/form-library/documentation/api-reference/question#showCommentArea) or [`showOtherItem`](https://surveyjs.io/form-library/documentation/api-reference/question#showOtherItem) property enabled.
82351
+ *
82352
+ * Default value: 2
82353
+ *
82354
+ * The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
82355
+ * @see autoGrowComment
82356
+ * @see allowResizeComment
82357
+ */
82358
+ get: function () {
82359
+ return this.getPropertyValue("commentAreaRows");
82360
+ },
82361
+ set: function (val) {
82362
+ this.setPropertyValue("commentAreaRows", val);
82363
+ },
82364
+ enumerable: false,
82365
+ configurable: true
82366
+ });
82231
82367
  Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
82232
82368
  /**
82233
82369
  * Specifies when to update the question value in questions with a text input field.
@@ -82359,6 +82495,13 @@ var SurveyModel = /** @class */ (function (_super) {
82359
82495
  this.localeChanged();
82360
82496
  this.onLocaleChangedEvent.fire(this, this.locale);
82361
82497
  };
82498
+ Object.defineProperty(SurveyModel.prototype, "localeDir", {
82499
+ get: function () {
82500
+ return _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].localeDirections[this.locale];
82501
+ },
82502
+ enumerable: false,
82503
+ configurable: true
82504
+ });
82362
82505
  /**
82363
82506
  * Returns an array of locales whose translations are used in the survey.
82364
82507
  *
@@ -85727,6 +85870,7 @@ var SurveyModel = /** @class */ (function (_super) {
85727
85870
  SurveyModel.prototype.getRootCss = function () {
85728
85871
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
85729
85872
  .append(this.css.root)
85873
+ .append(this.css.rootProgress + "--" + this.progressBarType)
85730
85874
  .append(this.css.rootMobile, this.isMobile)
85731
85875
  .append(this.css.rootAnimationDisabled, !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].animationEnabled)
85732
85876
  .append(this.css.rootReadOnly, this.mode === "display" && !this.isDesignMode)
@@ -88629,6 +88773,15 @@ var SurveyModel = /** @class */ (function (_super) {
88629
88773
  }
88630
88774
  };
88631
88775
  SurveyModel.prototype.onScroll = function () {
88776
+ if (!!this.rootElement) {
88777
+ var topStickyContainer = this.rootElement.querySelector(".sv-components-container-center");
88778
+ if (!!topStickyContainer && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y) {
88779
+ this.rootElement.classList && this.rootElement.classList.add("sv-root--sticky-top");
88780
+ }
88781
+ else {
88782
+ this.rootElement.classList && this.rootElement.classList.remove("sv-root--sticky-top");
88783
+ }
88784
+ }
88632
88785
  if (this.onScrollCallback) {
88633
88786
  this.onScrollCallback();
88634
88787
  }
@@ -88970,6 +89123,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
88970
89123
  },
88971
89124
  { name: "autoGrowComment:boolean", default: false },
88972
89125
  { name: "allowResizeComment:boolean", default: true },
89126
+ { name: "commentAreaRows:number", minValue: 1 },
88973
89127
  {
88974
89128
  name: "startSurveyText",
88975
89129
  serializationProperty: "locStartSurveyText",
@@ -89121,6 +89275,7 @@ var surveyLocalization = {
89121
89275
  defaultLocaleValue: "en",
89122
89276
  locales: {},
89123
89277
  localeNames: {},
89278
+ localeDirections: {},
89124
89279
  supportedLocales: [],
89125
89280
  get currentLocale() {
89126
89281
  return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
@@ -89620,7 +89775,7 @@ var TOCModel = /** @class */ (function () {
89620
89775
  var titleElement = rootElement.querySelector(titleSelector);
89621
89776
  var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
89622
89777
  var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
89623
- tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 2) + "px";
89778
+ tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 1) + "px";
89624
89779
  }
89625
89780
  }
89626
89781
  };
@@ -91427,7 +91582,7 @@ var CssClassBuilder = /** @class */ (function () {
91427
91582
  /*!******************************!*\
91428
91583
  !*** ./src/utils/devices.ts ***!
91429
91584
  \******************************/
91430
- /*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
91585
+ /*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch, detectMouseSupport */
91431
91586
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
91432
91587
 
91433
91588
  "use strict";
@@ -91436,6 +91591,7 @@ __webpack_require__.r(__webpack_exports__);
91436
91591
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
91437
91592
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
91438
91593
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
91594
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectMouseSupport", function() { return detectMouseSupport; });
91439
91595
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
91440
91596
 
91441
91597
  // isMobile
@@ -91465,13 +91621,20 @@ var mouseInfo = {
91465
91621
  },
91466
91622
  hasMouse: true
91467
91623
  };
91468
- var pointerMatches = (typeof matchMedia !== "undefined" && !!matchMedia && matchMedia("(pointer:fine)")) || undefined;
91469
- mouseInfo.hasMouse = !!pointerMatches && !!pointerMatches.matches;
91624
+ var matchMediaMethod = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].matchMedia;
91625
+ mouseInfo.hasMouse = detectMouseSupport(matchMediaMethod);
91470
91626
  var IsTouch = mouseInfo.isTouch;
91471
91627
  //for tests
91472
91628
  function _setIsTouch(val) {
91473
91629
  IsTouch = val;
91474
91630
  }
91631
+ function detectMouseSupport(matchMedia) {
91632
+ if (!matchMedia)
91633
+ return false;
91634
+ var pointerQuery = matchMedia("(pointer:fine)");
91635
+ var hoverQuery = matchMedia("(any-hover:hover)");
91636
+ return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
91637
+ }
91475
91638
 
91476
91639
 
91477
91640
  /***/ }),