survey-react 1.9.86 → 1.9.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.86
2
+ * surveyjs - Survey JavaScript library v1.9.88
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -5563,7 +5563,11 @@ var defaultStandardCss = {
5563
5563
  controlValue: "sv_q_tagbox__value sv_q_dropdown__value",
5564
5564
  controlEmpty: "sv_q_dropdown--empty sv_q_tagbox--empty",
5565
5565
  placeholderInput: "sv_q_tagbox__placeholder",
5566
- filterStringInput: "sv_q_tagbox__filter-string-input sv_q_dropdown__filter-string-input"
5566
+ filterStringInput: "sv_q_tagbox__filter-string-input sv_q_dropdown__filter-string-input",
5567
+ hint: "sv_q_tagbox__hint",
5568
+ hintPrefix: "sv_q_dropdown__hint-prefix sv_q_tagbox__hint-prefix",
5569
+ hintSuffix: "sv_q_dropdown__hint-suffix sv_q_tagbox__hint-suffix",
5570
+ hintSuffixWrapper: "sv_q_tagbox__hint-suffix-wrapper"
5567
5571
  },
5568
5572
  };
5569
5573
  _defaultV2Css__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]["default"] = defaultStandardCss;
@@ -6051,6 +6055,7 @@ var defaultV2Css = {
6051
6055
  itemStarDisabled: "sd-rating__item-star--disabled",
6052
6056
  itemStarHighlighted: "sd-rating__item-star--highlighted",
6053
6057
  itemStarUnhighlighted: "sd-rating__item-star--unhighlighted",
6058
+ itemStarSmall: "sd-rating__item-star--small",
6054
6059
  itemSmiley: "sd-rating__item-smiley",
6055
6060
  itemSmileyOnError: "sd-rating__item-smiley--error",
6056
6061
  itemSmileyHover: "sd-rating__item-smiley--allowhover",
@@ -6059,12 +6064,14 @@ var defaultV2Css = {
6059
6064
  itemSmileyHighlighted: "sd-rating__item-star--highlighted",
6060
6065
  itemSmileyScaleColored: "sd-rating__item-smiley--scale-colored",
6061
6066
  itemSmileyRateColored: "sd-rating__item-smiley--rate-colored",
6067
+ itemSmileySmall: "sd-rating__item-smiley--small",
6062
6068
  minText: "sd-rating__item-text sd-rating__min-text",
6063
6069
  itemText: "sd-rating__item-text",
6064
6070
  maxText: "sd-rating__item-text sd-rating__max-text",
6065
6071
  itemDisabled: "sd-rating__item--disabled",
6066
6072
  itemFixedSize: "sd-rating__item--fixed-size",
6067
6073
  control: "sd-input sd-dropdown",
6074
+ itemSmall: "sd-rating--small",
6068
6075
  controlValue: "sd-dropdown__value",
6069
6076
  controlDisabled: "sd-input--disabled",
6070
6077
  controlEmpty: "sd-dropdown--empty",
@@ -6231,7 +6238,11 @@ var defaultV2Css = {
6231
6238
  controlEmpty: "sd-dropdown--empty sd-tagbox--empty",
6232
6239
  controlLabel: "sd-item__control-label",
6233
6240
  filterStringInput: "sd-tagbox__filter-string-input sd-dropdown__filter-string-input",
6234
- materialDecorator: "sd-item__decorator sd-checkbox__decorator"
6241
+ materialDecorator: "sd-item__decorator sd-checkbox__decorator",
6242
+ hint: "sd-tagbox__hint",
6243
+ hintPrefix: "sd-dropdown__hint-prefix sd-tagbox__hint-prefix",
6244
+ hintSuffix: "sd-dropdown__hint-suffix sd-tagbox__hint-suffix",
6245
+ hintSuffixWrapper: "sd-tagbox__hint-suffix-wrapper"
6235
6246
  },
6236
6247
  };
6237
6248
  var defaultV2ThemeName = "defaultV2";
@@ -6786,7 +6797,7 @@ var DragDropChoices = /** @class */ (function (_super) {
6786
6797
  };
6787
6798
  DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
6788
6799
  var draggedElementShortcut = document.createElement("div");
6789
- draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n padding: 4px;\n border-radius: 4px;\n background: white;\n ";
6800
+ draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1), 0px 2px 6px rgba(0, 0, 0, 0.1);\n padding: 4px;\n border-radius: 4px;\n background: white;\n ";
6790
6801
  var itemValueNode = draggedElementNode.closest("[data-sv-drop-target-item-value]");
6791
6802
  var controlsNode = itemValueNode.querySelector(".svc-image-item-value-controls");
6792
6803
  var imageContainerNode = itemValueNode.querySelector(".sd-imagepicker__image-container");
@@ -6901,6 +6912,7 @@ __webpack_require__.r(__webpack_exports__);
6901
6912
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
6902
6913
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
6903
6914
  /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
6915
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../settings */ "./src/settings.ts");
6904
6916
  var __extends = (undefined && undefined.__extends) || (function () {
6905
6917
  var extendStatics = function (d, b) {
6906
6918
  extendStatics = Object.setPrototypeOf ||
@@ -6926,6 +6938,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
6926
6938
 
6927
6939
 
6928
6940
 
6941
+
6929
6942
  // WebKit requires cancelable `touchmove` events to be added as early as possible
6930
6943
  // see https://bugs.webkit.org/show_bug.cgi?id=184250
6931
6944
  if (typeof window !== "undefined") {
@@ -7035,7 +7048,7 @@ var DragDropCore = /** @class */ (function (_super) {
7035
7048
  if (_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
7036
7049
  _this.draggedElementShortcut.removeEventListener("contextmenu", _this.onContextMenu);
7037
7050
  }
7038
- document.body.removeChild(_this.draggedElementShortcut);
7051
+ _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.rootElement.removeChild(_this.draggedElementShortcut);
7039
7052
  _this.doClear();
7040
7053
  _this.dropTarget = null;
7041
7054
  _this.draggedElementShortcut = null;
@@ -7044,7 +7057,7 @@ var DragDropCore = /** @class */ (function (_super) {
7044
7057
  _this.parentElement = null;
7045
7058
  _this.scrollIntervalId = null;
7046
7059
  if (_utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
7047
- _this.savedTargetNode && document.body.removeChild(_this.savedTargetNode);
7060
+ _this.savedTargetNode && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.rootElement.removeChild(_this.savedTargetNode);
7048
7061
  DragDropCore.PreventScrolling = false;
7049
7062
  }
7050
7063
  document.body.style.setProperty("touch-action", "");
@@ -7092,7 +7105,7 @@ var DragDropCore = /** @class */ (function (_super) {
7092
7105
  _this.savedTargetNode = event.target;
7093
7106
  _this.savedTargetNode.style.cssText =
7094
7107
  "\n position: absolute;\n height: 1px!important;\n width: 1px!important;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n ";
7095
- document.body.appendChild(_this.savedTargetNode);
7108
+ _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.rootElement.appendChild(_this.savedTargetNode);
7096
7109
  }
7097
7110
  _this.stopLongTap();
7098
7111
  }, this.longTap ? 500 : 0);
@@ -7171,8 +7184,8 @@ var DragDropCore = /** @class */ (function (_super) {
7171
7184
  shortcutXOffset = shortcutWidth / 2;
7172
7185
  shortcutYOffset = shortcutHeight / 2;
7173
7186
  }
7174
- var documentBottom = document.documentElement.clientHeight;
7175
- var documentRight = document.documentElement.clientWidth;
7187
+ var documentBottom = (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isShadowDOM"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root) ? _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.host : _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.documentElement).clientHeight;
7188
+ var documentRight = (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isShadowDOM"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root) ? _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.host : _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.documentElement).clientWidth;
7176
7189
  var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(event.clientY, shortcutHeight, shortcutYOffset);
7177
7190
  var shortcutRightCoordinate = this.getShortcutRightCoordinate(event.clientX, shortcutWidth, shortcutXOffset);
7178
7191
  if (shortcutRightCoordinate >= documentRight) {
@@ -7371,7 +7384,7 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
7371
7384
  var row = (draggedElementNode
7372
7385
  .closest("[data-sv-drop-target-matrix-row]"));
7373
7386
  var clone = (row.cloneNode(isDeepClone));
7374
- clone.style.cssText = "\n filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));\n box-shadow: rgb(0 0 0 / 10%) 0px 8px 16px;\n background-color: white;\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n align-items: center;\n line-height: 0;\n width: " + row.offsetWidth + "px;\n ";
7387
+ clone.style.cssText = "\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1), 0px 2px 6px rgba(0, 0, 0, 0.1);\n background-color: white;\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n align-items: center;\n line-height: 0;\n width: " + row.offsetWidth + "px;\n ";
7375
7388
  clone.classList.remove("sv-matrix__drag-drop--moveup");
7376
7389
  clone.classList.remove("sv-matrix__drag-drop--movedown");
7377
7390
  this.draggedElement.isDragDropMoveDown = false;
@@ -7538,7 +7551,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7538
7551
  DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
7539
7552
  var draggedElementShortcut = document.createElement("div");
7540
7553
  draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
7541
- draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n border-radius: 36px;\n min-width: 100px;\n filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n background-color: var(--background, white);\n font-family: var(--font-family, $font-family);\n ";
7554
+ draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n border-radius: 36px;\n min-width: 100px;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1), 0px 2px 6px rgba(0, 0, 0, 0.1);\n background-color: var(--background, white);\n font-family: var(--font-family, $font-family);\n ";
7542
7555
  var isDeepClone = true;
7543
7556
  var clone = draggedElementNode.cloneNode(isDeepClone);
7544
7557
  draggedElementShortcut.appendChild(clone);
@@ -7646,6 +7659,7 @@ __webpack_require__.r(__webpack_exports__);
7646
7659
  /* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../survey-element */ "./src/survey-element.ts");
7647
7660
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
7648
7661
  /* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core */ "./src/dragdrop/core.ts");
7662
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../settings */ "./src/settings.ts");
7649
7663
  var __extends = (undefined && undefined.__extends) || (function () {
7650
7664
  var extendStatics = function (d, b) {
7651
7665
  extendStatics = Object.setPrototypeOf ||
@@ -7664,6 +7678,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
7664
7678
 
7665
7679
 
7666
7680
 
7681
+
7667
7682
  var DragDropSurveyElements = /** @class */ (function (_super) {
7668
7683
  __extends(DragDropSurveyElements, _super);
7669
7684
  function DragDropSurveyElements() {
@@ -7678,7 +7693,7 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
7678
7693
  };
7679
7694
  _this.doDrop = function () {
7680
7695
  if (_this.dropTarget) {
7681
- document.activeElement.blur();
7696
+ _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].environment.root.activeElement.blur();
7682
7697
  return _this.insertRealElementIntoSurvey();
7683
7698
  }
7684
7699
  return null;
@@ -8312,12 +8327,18 @@ var DropdownListModel = /** @class */ (function (_super) {
8312
8327
  if (hasHtml || this.question.inputFieldComponentName) {
8313
8328
  this._markdownMode = true;
8314
8329
  this.inputString = "";
8330
+ this.hintString = "";
8315
8331
  }
8316
8332
  else {
8317
8333
  this.inputString = item === null || item === void 0 ? void 0 : item.title;
8318
8334
  this.hintString = item === null || item === void 0 ? void 0 : item.title;
8319
8335
  }
8320
8336
  };
8337
+ DropdownListModel.prototype.fixInputCase = function () {
8338
+ var hintStringMiddle = this.hintStringMiddle;
8339
+ if (hintStringMiddle && this.inputString != hintStringMiddle)
8340
+ this.inputString = hintStringMiddle;
8341
+ };
8321
8342
  DropdownListModel.prototype.applyHintString = function (item) {
8322
8343
  var hasHtml = item === null || item === void 0 ? void 0 : item.locText.hasHtml;
8323
8344
  if (hasHtml || this.question.inputFieldComponentName) {
@@ -8330,10 +8351,10 @@ var DropdownListModel = /** @class */ (function (_super) {
8330
8351
  };
8331
8352
  Object.defineProperty(DropdownListModel.prototype, "inputStringRendered", {
8332
8353
  get: function () {
8333
- return this.getPropertyValue("inputString") || "";
8354
+ return this.inputString || "";
8334
8355
  },
8335
8356
  set: function (val) {
8336
- this.setPropertyValue("inputString", val);
8357
+ this.inputString = val;
8337
8358
  this.filterString = val;
8338
8359
  this.applyHintString(this.listModel.focusedItem);
8339
8360
  },
@@ -8401,6 +8422,16 @@ var DropdownListModel = /** @class */ (function (_super) {
8401
8422
  enumerable: false,
8402
8423
  configurable: true
8403
8424
  });
8425
+ Object.defineProperty(DropdownListModel.prototype, "hintStringMiddle", {
8426
+ get: function () {
8427
+ var start = this.hintStringLC.indexOf(this.inputStringLC);
8428
+ if (start == -1)
8429
+ return null;
8430
+ return this.hintString.substring(start, start + this.inputStringLC.length);
8431
+ },
8432
+ enumerable: false,
8433
+ configurable: true
8434
+ });
8404
8435
  Object.defineProperty(DropdownListModel.prototype, "popupModel", {
8405
8436
  get: function () {
8406
8437
  return this._popupModel;
@@ -8439,8 +8470,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8439
8470
  };
8440
8471
  DropdownListModel.prototype.onClick = function (event) {
8441
8472
  this._popupModel.toggleVisibility();
8442
- if (this._popupModel.isVisible && this.question.value && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"])
8443
- this.changeSelectionWithKeyboard(false);
8473
+ this.focusItemOnClickAndPopup();
8444
8474
  if (this.searchEnabled && !!event && !!event.target) {
8445
8475
  var input = event.target.querySelector("input");
8446
8476
  if (!!input) {
@@ -8448,8 +8478,13 @@ var DropdownListModel = /** @class */ (function (_super) {
8448
8478
  }
8449
8479
  }
8450
8480
  };
8481
+ DropdownListModel.prototype.focusItemOnClickAndPopup = function () {
8482
+ if (this._popupModel.isVisible && this.question.value)
8483
+ this.changeSelectionWithKeyboard(false);
8484
+ };
8451
8485
  DropdownListModel.prototype.onClear = function (event) {
8452
8486
  this.question.clearValue();
8487
+ this._popupModel.isVisible = false;
8453
8488
  if (event) {
8454
8489
  event.preventDefault();
8455
8490
  event.stopPropagation();
@@ -8467,18 +8502,27 @@ var DropdownListModel = /** @class */ (function (_super) {
8467
8502
  else {
8468
8503
  this.listModel.focusNextVisibleItem();
8469
8504
  }
8470
- if (this.question.value && focusedItem && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
8505
+ this.beforeScrollToFocusedItem(focusedItem);
8506
+ this.scrollToFocusedItem();
8507
+ this.afterScrollToFocusedItem();
8508
+ this.ariaActivedescendant = (_a = this.listModel.focusedItem) === null || _a === void 0 ? void 0 : _a.elementId;
8509
+ };
8510
+ DropdownListModel.prototype.beforeScrollToFocusedItem = function (focusedItem) {
8511
+ if (this.question.value && focusedItem) {
8471
8512
  focusedItem.selectedValue = false;
8472
8513
  this.listModel.focusedItem.selectedValue = !this.listModel.filterString;
8473
8514
  this.question.suggestedItem = this.listModel.focusedItem;
8474
8515
  }
8475
- this.scrollToFocusedItem();
8476
- if (this.question.value && !this.listModel.filterString && this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
8516
+ };
8517
+ DropdownListModel.prototype.afterScrollToFocusedItem = function () {
8518
+ var _a;
8519
+ if (this.question.value && !this.listModel.filterString && this.question.searchEnabled) {
8477
8520
  this.applyInputString(this.listModel.focusedItem || this.question.selectedItem);
8478
8521
  }
8479
8522
  else {
8480
8523
  this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
8481
8524
  }
8525
+ this.fixInputCase();
8482
8526
  this.ariaActivedescendant = (_a = this.listModel.focusedItem) === null || _a === void 0 ? void 0 : _a.elementId;
8483
8527
  };
8484
8528
  DropdownListModel.prototype.keyHandler = function (event) {
@@ -8502,7 +8546,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8502
8546
  event.preventDefault();
8503
8547
  event.stopPropagation();
8504
8548
  }
8505
- else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32 && !this.question.searchEnabled)) {
8549
+ else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32 && (!this.question.searchEnabled || !this.inputString))) {
8506
8550
  if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
8507
8551
  this._popupModel.isVisible = false;
8508
8552
  this.onClear(event);
@@ -8524,8 +8568,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8524
8568
  else if (event.keyCode === 27) {
8525
8569
  this._popupModel.isVisible = false;
8526
8570
  this.hintString = "";
8527
- if (this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"])
8528
- this.applyInputString(this.question.selectedItem);
8571
+ this.onEscape();
8529
8572
  }
8530
8573
  else {
8531
8574
  if (event.keyCode === 38 || event.keyCode === 40 || event.keyCode === 32 && !this.question.searchEnabled) {
@@ -8538,6 +8581,10 @@ var DropdownListModel = /** @class */ (function (_super) {
8538
8581
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_7__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
8539
8582
  }
8540
8583
  };
8584
+ DropdownListModel.prototype.onEscape = function () {
8585
+ if (this.question.searchEnabled)
8586
+ this.applyInputString(this.question.selectedItem);
8587
+ };
8541
8588
  DropdownListModel.prototype.onScroll = function (event) {
8542
8589
  var target = event.target;
8543
8590
  if ((target.scrollHeight - (target.scrollTop + target.offsetHeight)) <= this.loadingItemHeight) {
@@ -8693,7 +8740,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8693
8740
  };
8694
8741
  DropdownMultiSelectListModel.prototype.syncFilterStringPlaceholder = function () {
8695
8742
  var selectedActions = this.getSelectedActions();
8696
- if (selectedActions.length || this.question.selectedItems.length) {
8743
+ if (selectedActions.length || this.question.selectedItems.length || this.listModel.focusedItem) {
8697
8744
  this.filterStringPlaceholder = undefined;
8698
8745
  }
8699
8746
  else {
@@ -8741,6 +8788,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8741
8788
  DropdownMultiSelectListModel.prototype.resetFilterString = function () {
8742
8789
  _super.prototype.resetFilterString.call(this);
8743
8790
  this.inputString = null;
8791
+ this.hintString = "";
8744
8792
  };
8745
8793
  Object.defineProperty(DropdownMultiSelectListModel.prototype, "shouldResetAfterCancel", {
8746
8794
  get: function () {
@@ -8794,6 +8842,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8794
8842
  var newValue = [].concat(this.question.renderedValue || []);
8795
8843
  newValue.splice(newValue.indexOf(id), 1);
8796
8844
  this.question.renderedValue = newValue;
8845
+ this.applyHintString(this.listModel.focusedItem);
8797
8846
  this.updateListState();
8798
8847
  };
8799
8848
  DropdownMultiSelectListModel.prototype.clear = function () {
@@ -8824,6 +8873,25 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8824
8873
  this.inputString = null;
8825
8874
  }
8826
8875
  };
8876
+ DropdownMultiSelectListModel.prototype.focusItemOnClickAndPopup = function () {
8877
+ return;
8878
+ };
8879
+ DropdownMultiSelectListModel.prototype.onEscape = function () {
8880
+ return;
8881
+ };
8882
+ DropdownMultiSelectListModel.prototype.beforeScrollToFocusedItem = function (focusedItem) {
8883
+ return;
8884
+ };
8885
+ DropdownMultiSelectListModel.prototype.afterScrollToFocusedItem = function () {
8886
+ var _a;
8887
+ if (!((_a = this.listModel.focusedItem) === null || _a === void 0 ? void 0 : _a.selected)) {
8888
+ this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
8889
+ }
8890
+ else {
8891
+ this.hintString = "";
8892
+ }
8893
+ this.syncFilterStringPlaceholder();
8894
+ };
8827
8895
  __decorate([
8828
8896
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "" })
8829
8897
  ], DropdownMultiSelectListModel.prototype, "filterStringPlaceholder", void 0);
@@ -9591,7 +9659,7 @@ __webpack_require__.r(__webpack_exports__);
9591
9659
  // import "../../main.scss";
9592
9660
  //import "../../modern.scss";
9593
9661
  var Version;
9594
- Version = "" + "1.9.86";
9662
+ Version = "" + "1.9.88";
9595
9663
  function checkLibraryVersion(ver, libraryName) {
9596
9664
  if (Version != ver) {
9597
9665
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -9696,7 +9764,7 @@ function checkLibraryVersion(ver, libraryName) {
9696
9764
  /*!**************************************!*\
9697
9765
  !*** ./src/entries/core-wo-model.ts ***!
9698
9766
  \**************************************/
9699
- /*! exports provided: Version, checkLibraryVersion, 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, QuestionMultipleTextModel, 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, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper */
9767
+ /*! exports provided: Version, checkLibraryVersion, 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, QuestionMultipleTextModel, 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, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper */
9700
9768
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
9701
9769
 
9702
9770
  "use strict";
@@ -10080,6 +10148,8 @@ __webpack_require__.r(__webpack_exports__);
10080
10148
 
10081
10149
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["getOriginalEvent"]; });
10082
10150
 
10151
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_6__["getElement"]; });
10152
+
10083
10153
  /* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../actions/action */ "./src/actions/action.ts");
10084
10154
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["createDropdownActionModel"]; });
10085
10155
 
@@ -10129,7 +10199,7 @@ __webpack_require__.r(__webpack_exports__);
10129
10199
  /*!*****************************!*\
10130
10200
  !*** ./src/entries/core.ts ***!
10131
10201
  \*****************************/
10132
- /*! exports provided: Version, checkLibraryVersion, 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, QuestionMultipleTextModel, 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, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model */
10202
+ /*! exports provided: Version, checkLibraryVersion, 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, QuestionMultipleTextModel, 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, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model */
10133
10203
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10134
10204
 
10135
10205
  "use strict";
@@ -10507,6 +10577,8 @@ __webpack_require__.r(__webpack_exports__);
10507
10577
 
10508
10578
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["getOriginalEvent"]; });
10509
10579
 
10580
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["getElement"]; });
10581
+
10510
10582
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModel"]; });
10511
10583
 
10512
10584
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModelAdvanced"]; });
@@ -10922,7 +10994,7 @@ __webpack_require__.r(__webpack_exports__);
10922
10994
  /*!******************************!*\
10923
10995
  !*** ./src/entries/react.ts ***!
10924
10996
  \******************************/
10925
- /*! exports provided: Version, checkLibraryVersion, 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, QuestionMultipleTextModel, 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, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor */
10997
+ /*! exports provided: Version, checkLibraryVersion, 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, QuestionMultipleTextModel, 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, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor */
10926
10998
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10927
10999
 
10928
11000
  "use strict";
@@ -11300,6 +11372,8 @@ __webpack_require__.r(__webpack_exports__);
11300
11372
 
11301
11373
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["getOriginalEvent"]; });
11302
11374
 
11375
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["getElement"]; });
11376
+
11303
11377
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModel"]; });
11304
11378
 
11305
11379
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModelAdvanced"]; });
@@ -16725,6 +16799,8 @@ var map = {
16725
16799
  "./expandDetail.svg": "./src/images/expandDetail.svg",
16726
16800
  "./no-image.svg": "./src/images/no-image.svg",
16727
16801
  "./rating-star-2.svg": "./src/images/rating-star-2.svg",
16802
+ "./rating-star-small-2.svg": "./src/images/rating-star-small-2.svg",
16803
+ "./rating-star-small.svg": "./src/images/rating-star-small.svg",
16728
16804
  "./rating-star.svg": "./src/images/rating-star.svg",
16729
16805
  "./search.svg": "./src/images/search.svg"
16730
16806
  };
@@ -17081,6 +17157,28 @@ module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\
17081
17157
 
17082
17158
  /***/ }),
17083
17159
 
17160
+ /***/ "./src/images/rating-star-small-2.svg":
17161
+ /*!********************************************!*\
17162
+ !*** ./src/images/rating-star-small-2.svg ***!
17163
+ \********************************************/
17164
+ /*! no static exports found */
17165
+ /***/ (function(module, exports) {
17166
+
17167
+ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19.3373L6.13001 22.4373C5.50001 22.7673 4.77001 22.2373 4.89001 21.5373L6.01001 14.9773L1.26001 10.3273C0.750007 9.83728 1.03001 8.96728 1.73001 8.86728L8.29001 7.90728L11.23 1.93728C11.54 1.29728 12.45 1.29728 12.77 1.93728L15.7 7.90728L22.26 8.86728C22.96 8.96728 23.24 9.83728 22.73 10.3273L17.98 14.9773L19.1 21.5373C19.22 22.2373 18.49 22.7773 17.86 22.4373L11.99 19.3373H12Z\" fill=\"none\" stroke-width=\"2\"></path><path d=\"M12 15.9472L8.58001 17.7572L9.23001 13.9272L6.45001 11.2072L10.29 10.6472L12 7.17725L13.71 10.6472L17.55 11.2072L14.77 13.9272L15.42 17.7572L12 15.9472Z\"></path></svg>"
17168
+
17169
+ /***/ }),
17170
+
17171
+ /***/ "./src/images/rating-star-small.svg":
17172
+ /*!******************************************!*\
17173
+ !*** ./src/images/rating-star-small.svg ***!
17174
+ \******************************************/
17175
+ /*! no static exports found */
17176
+ /***/ (function(module, exports) {
17177
+
17178
+ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><g><path d=\"M12 19.3373L6.13001 22.4373C5.50001 22.7673 4.77001 22.2373 4.89001 21.5373L6.01001 14.9773L1.26001 10.3273C0.750007 9.83728 1.03001 8.96728 1.73001 8.86728L8.29001 7.90728L11.23 1.93728C11.54 1.29728 12.45 1.29728 12.77 1.93728L15.7 7.90728L22.26 8.86728C22.96 8.96728 23.24 9.83728 22.73 10.3273L17.98 14.9773L19.1 21.5373C19.22 22.2373 18.49 22.7773 17.86 22.4373L11.99 19.3373H12Z\" stroke-width=\"2\"></path></g></svg>"
17179
+
17180
+ /***/ }),
17181
+
17084
17182
  /***/ "./src/images/rating-star.svg":
17085
17183
  /*!************************************!*\
17086
17184
  !*** ./src/images/rating-star.svg ***!
@@ -30285,6 +30383,7 @@ __webpack_require__.r(__webpack_exports__);
30285
30383
  /* harmony import */ var _utils_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/popup */ "./src/utils/popup.ts");
30286
30384
  /* harmony import */ var _popup_view_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popup-view-model */ "./src/popup-view-model.ts");
30287
30385
  /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
30386
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
30288
30387
  var __extends = (undefined && undefined.__extends) || (function () {
30289
30388
  var extendStatics = function (d, b) {
30290
30389
  extendStatics = Object.setPrototypeOf ||
@@ -30310,6 +30409,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
30310
30409
 
30311
30410
 
30312
30411
 
30412
+
30313
30413
  var PopupDropdownViewModel = /** @class */ (function (_super) {
30314
30414
  __extends(PopupDropdownViewModel, _super);
30315
30415
  function PopupDropdownViewModel(model, targetElement) {
@@ -30434,7 +30534,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
30434
30534
  return "popup-pointer";
30435
30535
  };
30436
30536
  PopupDropdownViewModel.prototype.updateOnShowing = function () {
30437
- this.prevActiveElement = document.activeElement;
30537
+ var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
30538
+ this.prevActiveElement = root.activeElement;
30438
30539
  if (this.isOverlay) {
30439
30540
  this.resetDimensionsAndPositionStyleProperties();
30440
30541
  }
@@ -30942,6 +31043,8 @@ __webpack_require__.r(__webpack_exports__);
30942
31043
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
30943
31044
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
30944
31045
  /* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
31046
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
31047
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
30945
31048
  var __extends = (undefined && undefined.__extends) || (function () {
30946
31049
  var extendStatics = function (d, b) {
30947
31050
  extendStatics = Object.setPrototypeOf ||
@@ -30967,6 +31070,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
30967
31070
 
30968
31071
 
30969
31072
 
31073
+
31074
+
30970
31075
  var FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])";
30971
31076
  var PopupBaseViewModel = /** @class */ (function (_super) {
30972
31077
  __extends(PopupBaseViewModel, _super);
@@ -31148,13 +31253,13 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
31148
31253
  var firstFocusableElement = focusableElements[0];
31149
31254
  var lastFocusableElement = focusableElements[focusableElements.length - 1];
31150
31255
  if (event.shiftKey) {
31151
- if (document.activeElement === firstFocusableElement) {
31256
+ if (_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.activeElement === firstFocusableElement) {
31152
31257
  lastFocusableElement.focus();
31153
31258
  event.preventDefault();
31154
31259
  }
31155
31260
  }
31156
31261
  else {
31157
- if (document.activeElement === lastFocusableElement) {
31262
+ if (_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.activeElement === lastFocusableElement) {
31158
31263
  firstFocusableElement.focus();
31159
31264
  event.preventDefault();
31160
31265
  }
@@ -31166,7 +31271,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
31166
31271
  }
31167
31272
  };
31168
31273
  PopupBaseViewModel.prototype.updateOnShowing = function () {
31169
- this.prevActiveElement = document.activeElement;
31274
+ this.prevActiveElement = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root.activeElement;
31170
31275
  if (this.isOverlay) {
31171
31276
  this.resetDimensionsAndPositionStyleProperties();
31172
31277
  }
@@ -31209,13 +31314,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
31209
31314
  var container = document.createElement("div");
31210
31315
  this.container = this.createdContainer = container;
31211
31316
  }
31212
- var mountContainer = document.body.querySelector(".sv-popup-mount");
31213
- if (mountContainer) {
31214
- mountContainer.appendChild(this.container);
31215
- }
31216
- else {
31217
- document.body.appendChild(this.container);
31218
- }
31317
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(this.container);
31219
31318
  };
31220
31319
  PopupBaseViewModel.prototype.unmountPopupContainer = function () {
31221
31320
  this.createdContainer.remove();
@@ -31316,6 +31415,10 @@ var PopupModel = /** @class */ (function (_super) {
31316
31415
  _this.title = title;
31317
31416
  return _this;
31318
31417
  }
31418
+ PopupModel.prototype.refreshInnerModel = function () {
31419
+ var innerModel = this.contentComponentData["model"];
31420
+ innerModel && innerModel.refresh && innerModel.refresh();
31421
+ };
31319
31422
  Object.defineProperty(PopupModel.prototype, "isVisible", {
31320
31423
  get: function () {
31321
31424
  return this.getPropertyValue("isVisible", false);
@@ -31326,9 +31429,8 @@ var PopupModel = /** @class */ (function (_super) {
31326
31429
  }
31327
31430
  this.setPropertyValue("isVisible", value);
31328
31431
  this.onVisibilityChanged.fire(this, { model: this, isVisible: value });
31432
+ this.refreshInnerModel();
31329
31433
  if (this.isVisible) {
31330
- var innerModel = this.contentComponentData["model"];
31331
- innerModel && innerModel.refresh && innerModel.refresh();
31332
31434
  this.onShow();
31333
31435
  }
31334
31436
  else {
@@ -32239,7 +32341,8 @@ var Question = /** @class */ (function (_super) {
32239
32341
  if (this.supportComment() || this.supportOther()) {
32240
32342
  this.commentElements = [];
32241
32343
  this.getCommentElementsId().forEach(function (id) {
32242
- var el = document.getElementById(id);
32344
+ var root = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].environment.root;
32345
+ var el = root.getElementById(id);
32243
32346
  if (el)
32244
32347
  _this.commentElements.push(el);
32245
32348
  });
@@ -32775,6 +32878,9 @@ var Question = /** @class */ (function (_super) {
32775
32878
  });
32776
32879
  Object.defineProperty(Question.prototype, "isInputReadOnly", {
32777
32880
  get: function () {
32881
+ if (this.forceIsInputReadOnly !== undefined) {
32882
+ return this.forceIsInputReadOnly;
32883
+ }
32778
32884
  var isDesignModeV2 = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].supportCreatorV2 && this.isDesignMode;
32779
32885
  return this.isReadOnly || isDesignModeV2;
32780
32886
  },
@@ -33924,12 +34030,18 @@ var Question = /** @class */ (function (_super) {
33924
34030
  target.setIsMobile(val);
33925
34031
  } })
33926
34032
  ], Question.prototype, "isMobile", void 0);
34033
+ __decorate([
34034
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
34035
+ ], Question.prototype, "forceIsInputReadOnly", void 0);
33927
34036
  __decorate([
33928
34037
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true })
33929
34038
  ], Question.prototype, "commentPlaceholder", void 0);
33930
34039
  __decorate([
33931
34040
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
33932
34041
  ], Question.prototype, "renderAs", void 0);
34042
+ __decorate([
34043
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
34044
+ ], Question.prototype, "inMatrixMode", void 0);
33933
34045
  return Question;
33934
34046
  }(_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"]));
33935
34047
 
@@ -34876,6 +34988,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34876
34988
  return this.hasUnknownValue(val, true, false);
34877
34989
  };
34878
34990
  QuestionSelectBase.prototype.updateSelectedItemValues = function () {
34991
+ if (this.waitingGetChoiceDisplayValueResponse)
34992
+ return;
34879
34993
  var IsMultipleValue = this.getIsMultipleValue();
34880
34994
  if (IsMultipleValue) {
34881
34995
  this.updateMultipleSelectedItemValues();
@@ -34887,10 +35001,12 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34887
35001
  QuestionSelectBase.prototype.updateSingleSelectedItemValues = function () {
34888
35002
  var _this = this;
34889
35003
  if (!!this.survey && !this.isEmpty() && !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.choices, this.value)) {
35004
+ this.waitingGetChoiceDisplayValueResponse = true;
34890
35005
  this.survey.getChoiceDisplayValue({
34891
35006
  question: this,
34892
35007
  values: [this.value],
34893
35008
  setItems: function (displayValues) {
35009
+ _this.waitingGetChoiceDisplayValueResponse = false;
34894
35010
  if (!displayValues || !displayValues.length)
34895
35011
  return;
34896
35012
  _this.selectedItemValues = _this.createItemValue(_this.value, displayValues[0]);
@@ -34903,10 +35019,12 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34903
35019
  var valueArray = this.value;
34904
35020
  var hasItemWithValues = valueArray.some(function (val) { return !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.choices, val); });
34905
35021
  if (!!this.survey && !this.isEmpty() && hasItemWithValues) {
35022
+ this.waitingGetChoiceDisplayValueResponse = true;
34906
35023
  this.survey.getChoiceDisplayValue({
34907
35024
  question: this,
34908
35025
  values: valueArray,
34909
35026
  setItems: function (displayValues) {
35027
+ _this.waitingGetChoiceDisplayValueResponse = false;
34910
35028
  if (!displayValues || !displayValues.length)
34911
35029
  return;
34912
35030
  _this.selectedItemValues = displayValues.map(function (displayValue, index) { return _this.createItemValue(_this.value[index], displayValue); });
@@ -37382,6 +37500,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
37382
37500
  if (operator == "contains" || operator == "notcontains") {
37383
37501
  json["type"] = "radiogroup";
37384
37502
  }
37503
+ json["maxSelectedChoices"] = 0;
37385
37504
  return json;
37386
37505
  };
37387
37506
  QuestionCheckboxModel.prototype.isAnswerCorrect = function () {
@@ -37533,6 +37652,7 @@ __webpack_require__.r(__webpack_exports__);
37533
37652
  /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
37534
37653
  /* harmony import */ var _question_textbase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_textbase */ "./src/question_textbase.ts");
37535
37654
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
37655
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
37536
37656
  var __extends = (undefined && undefined.__extends) || (function () {
37537
37657
  var extendStatics = function (d, b) {
37538
37658
  extendStatics = Object.setPrototypeOf ||
@@ -37552,6 +37672,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
37552
37672
 
37553
37673
 
37554
37674
 
37675
+
37555
37676
  /**
37556
37677
  * A class that describes the Comment question type.
37557
37678
  *
@@ -37628,7 +37749,8 @@ var QuestionCommentModel = /** @class */ (function (_super) {
37628
37749
  return "comment";
37629
37750
  };
37630
37751
  QuestionCommentModel.prototype.afterRenderQuestionElement = function (el) {
37631
- this.element = document.getElementById(this.inputId) || el;
37752
+ var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
37753
+ this.element = root.getElementById(this.inputId) || el;
37632
37754
  this.updateElement();
37633
37755
  _super.prototype.afterRenderQuestionElement.call(this, el);
37634
37756
  };
@@ -40071,7 +40193,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
40071
40193
  return errorLength === this.errors.length;
40072
40194
  };
40073
40195
  QuestionFileModel.prototype.isFileImage = function (file) {
40074
- if (!file)
40196
+ if (!file || !file.content || !file.content.substring)
40075
40197
  return false;
40076
40198
  var imagePrefix = "data:image";
40077
40199
  var subStr = file.content && file.content.substring(0, imagePrefix.length);
@@ -44398,6 +44520,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
44398
44520
  var question = column.createCellQuestion(row);
44399
44521
  question.setSurveyImpl(row);
44400
44522
  question.setParentQuestion(this);
44523
+ question.inMatrixMode = true;
44401
44524
  return question;
44402
44525
  };
44403
44526
  QuestionMatrixDropdownModelBase.prototype.deleteRowValue = function (newValue, row) {
@@ -48565,6 +48688,13 @@ var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
48565
48688
  enumerable: false,
48566
48689
  configurable: true
48567
48690
  });
48691
+ Object.defineProperty(QuestionPanelDynamicItemTextProcessor.prototype, "visiblePanelIndex", {
48692
+ get: function () {
48693
+ return !!this.data ? this.data.getVisibleItemIndex(this.panelItem) : -1;
48694
+ },
48695
+ enumerable: false,
48696
+ configurable: true
48697
+ });
48568
48698
  QuestionPanelDynamicItemTextProcessor.prototype.getValues = function () {
48569
48699
  return this.panelItem.getAllValues();
48570
48700
  };
@@ -48594,6 +48724,14 @@ var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
48594
48724
  return true;
48595
48725
  }
48596
48726
  }
48727
+ if (textValue.name == QuestionPanelDynamicItem.VisibleIndexVariableName) {
48728
+ var index = this.visiblePanelIndex;
48729
+ if (index > -1) {
48730
+ textValue.isExists = true;
48731
+ textValue.value = index + 1;
48732
+ return true;
48733
+ }
48734
+ }
48597
48735
  if (textValue.name.toLowerCase().indexOf(QuestionPanelDynamicItem.ParentItemVariableName + ".") == 0) {
48598
48736
  var q = this.data;
48599
48737
  if (!!q && !!q.parentQuestion && !!q.parent && !!q.parent.data) {
@@ -48679,8 +48817,11 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
48679
48817
  values[QuestionPanelDynamicItem.ItemVariableName] = this.getAllValues();
48680
48818
  if (!!this.data) {
48681
48819
  var indexStr = QuestionPanelDynamicItem.IndexVariableName;
48820
+ var visibleIndexStr = QuestionPanelDynamicItem.VisibleIndexVariableName;
48682
48821
  delete values[indexStr];
48822
+ delete values[visibleIndexStr];
48683
48823
  values[indexStr.toLowerCase()] = this.data.getItemIndex(this);
48824
+ values[visibleIndexStr.toLowerCase()] = this.data.getVisibleItemIndex(this);
48684
48825
  var q = this.data;
48685
48826
  if (!!q && !!q.parentQuestion && !!q.parent) {
48686
48827
  values[QuestionPanelDynamicItem.ParentItemVariableName] = q.parent.getValue();
@@ -48705,6 +48846,7 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
48705
48846
  QuestionPanelDynamicItem.ItemVariableName = "panel";
48706
48847
  QuestionPanelDynamicItem.ParentItemVariableName = "parentpanel";
48707
48848
  QuestionPanelDynamicItem.IndexVariableName = "panelIndex";
48849
+ QuestionPanelDynamicItem.VisibleIndexVariableName = "visiblePanelIndex";
48708
48850
  return QuestionPanelDynamicItem;
48709
48851
  }());
48710
48852
 
@@ -48740,7 +48882,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48740
48882
  _this.recalculateIsReadyValue();
48741
48883
  };
48742
48884
  _this.isSetPanelItemData = {};
48743
- _this.createNewArray("panels");
48885
+ _this.createNewArray("panels", function (panel) { _this.onPanelAdded(panel); }, function (panel) { _this.onPanelRemoved(panel); });
48886
+ _this.createNewArray("visiblePanels");
48744
48887
  _this.templateValue = _this.createAndSetupNewPanelObject();
48745
48888
  _this.template.renderWidth = "100%";
48746
48889
  _this.template.selectedElementInDesign = _this;
@@ -48776,8 +48919,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48776
48919
  configurable: true
48777
48920
  });
48778
48921
  QuestionPanelDynamicModel.prototype.getFirstQuestionToFocus = function (withError) {
48779
- for (var i = 0; i < this.panels.length; i++) {
48780
- var res = this.panels[i].getFirstQuestionToFocus(withError);
48922
+ for (var i = 0; i < this.visiblePanels.length; i++) {
48923
+ var res = this.visiblePanels[i].getFirstQuestionToFocus(withError);
48781
48924
  if (!!res)
48782
48925
  return res;
48783
48926
  }
@@ -48888,6 +49031,11 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48888
49031
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTitle", {
48889
49032
  /**
48890
49033
  * A template for panel titles.
49034
+ *
49035
+ * The template can contain the following placeholders:
49036
+ *
49037
+ * - `{panelIndex}` - A zero-based index of a panel in the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
49038
+ * - `{visiblePanelIndex}` - A zero-based index of a panel in the [`visiblePanels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#visiblePanels) array.
48891
49039
  * @see template
48892
49040
  * @see templateDescription
48893
49041
  * @see templateElements
@@ -48913,6 +49061,11 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48913
49061
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTabTitle", {
48914
49062
  /**
48915
49063
  * A template for tab titles. Applies when [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`.
49064
+ *
49065
+ * The template can contain the following placeholders:
49066
+ *
49067
+ * - `{panelIndex}` - A zero-based index of a panel in the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
49068
+ * - `{visiblePanelIndex}` - A zero-based index of a panel in the [`visiblePanels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#visiblePanels) array.
48916
49069
  * @see templateTitle
48917
49070
  * @see renderMode
48918
49071
  */
@@ -48957,6 +49110,27 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48957
49110
  enumerable: false,
48958
49111
  configurable: true
48959
49112
  });
49113
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateVisibleIf", {
49114
+ /**
49115
+ * A Boolean expression that is evaluated against each panel. If the expression evaluates to `false`, the panel becomes hidden.
49116
+ *
49117
+ * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
49118
+ *
49119
+ * Use the `{panel}` placeholder to reference the current panel in the expression.
49120
+ *
49121
+ * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
49122
+ * @see visibleIf
49123
+ * @see visiblePanels
49124
+ */
49125
+ get: function () {
49126
+ return this.template.visibleIf;
49127
+ },
49128
+ set: function (val) {
49129
+ this.template.visibleIf = val;
49130
+ },
49131
+ enumerable: false,
49132
+ configurable: true
49133
+ });
48960
49134
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "items", {
48961
49135
  get: function () {
48962
49136
  var res = [];
@@ -48981,6 +49155,53 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48981
49155
  enumerable: false,
48982
49156
  configurable: true
48983
49157
  });
49158
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "visiblePanels", {
49159
+ /**
49160
+ * An array of currently visible panels ([`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model) objects).
49161
+ * @see templateVisibleIf
49162
+ */
49163
+ get: function () {
49164
+ return this.getPropertyValue("visiblePanels");
49165
+ },
49166
+ enumerable: false,
49167
+ configurable: true
49168
+ });
49169
+ QuestionPanelDynamicModel.prototype.onPanelAdded = function (panel) {
49170
+ this.onPanelRemovedCore(panel);
49171
+ if (!panel.visible)
49172
+ return;
49173
+ var index = 0;
49174
+ var panels = this.panels;
49175
+ for (var i = 0; i < panels.length; i++) {
49176
+ if (panels[i] === panel)
49177
+ break;
49178
+ if (panels[i].visible)
49179
+ index++;
49180
+ }
49181
+ this.visiblePanels.splice(index, 0, panel);
49182
+ this.addTabFromToolbar(panel, index);
49183
+ if (!this.currentPanel) {
49184
+ this.currentPanel = panel;
49185
+ }
49186
+ };
49187
+ QuestionPanelDynamicModel.prototype.onPanelRemoved = function (panel) {
49188
+ var index = this.onPanelRemovedCore(panel);
49189
+ if (this.currentPanel === panel) {
49190
+ var visPanels = this.visiblePanels;
49191
+ if (index >= visPanels.length)
49192
+ index = visPanels.length - 1;
49193
+ this.currentPanel = index >= 0 ? visPanels[index] : null;
49194
+ }
49195
+ };
49196
+ QuestionPanelDynamicModel.prototype.onPanelRemovedCore = function (panel) {
49197
+ var visPanels = this.visiblePanels;
49198
+ var index = visPanels.indexOf(panel);
49199
+ if (index > -1) {
49200
+ visPanels.splice(index, 1);
49201
+ this.removeTabFromToolbar(panel);
49202
+ }
49203
+ return index;
49204
+ };
48984
49205
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "currentIndex", {
48985
49206
  /**
48986
49207
  * A zero-based index of the currently displayed panel.
@@ -48996,33 +49217,18 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48996
49217
  return -1;
48997
49218
  if (this.useTemplatePanel)
48998
49219
  return 0;
48999
- if (this.currentIndexValue < 0 && this.panelCount > 0) {
49000
- this.currentIndexValue = 0;
49001
- }
49002
- if (this.currentIndexValue >= this.panelCount) {
49003
- this.currentIndexValue = this.panelCount - 1;
49004
- }
49005
- return this.currentIndexValue;
49220
+ return this.visiblePanels.indexOf(this.currentPanel);
49006
49221
  },
49007
49222
  set: function (val) {
49008
- if (this.currentIndexValue !== val) {
49009
- if (val >= this.panelCount)
49010
- val = this.panelCount - 1;
49011
- this.currentIndexValue = val;
49012
- this.updateFooterActions();
49013
- this.updateTabToolbarItemsPressedState();
49014
- this.fireCallback(this.currentIndexChangedCallback);
49015
- }
49223
+ if (val < 0 || this.visiblePanelCount < 1)
49224
+ return;
49225
+ if (val >= this.visiblePanelCount)
49226
+ val = this.visiblePanelCount - 1;
49227
+ this.currentPanel = this.visiblePanels[val];
49016
49228
  },
49017
49229
  enumerable: false,
49018
49230
  configurable: true
49019
49231
  });
49020
- Object.defineProperty(QuestionPanelDynamicModel.prototype, "currentIndexValue", {
49021
- get: function () { return this.getPropertyValue("currentIndexValue", -1); },
49022
- set: function (val) { this.setPropertyValue("currentIndexValue", val); },
49023
- enumerable: false,
49024
- configurable: true
49025
- });
49026
49232
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "currentPanel", {
49027
49233
  /**
49028
49234
  * A `PanelModel` object that is the currently displayed panel.
@@ -49034,10 +49240,24 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49034
49240
  * @see renderMode
49035
49241
  */
49036
49242
  get: function () {
49037
- var index = this.currentIndex;
49038
- if (index < 0 || index >= this.panels.length)
49243
+ if (this.isRenderModeList || this.useTemplatePanel)
49039
49244
  return null;
49040
- return this.panels[index];
49245
+ var res = this.getPropertyValue("currentPanel", null);
49246
+ if (!res && this.visiblePanelCount > 0) {
49247
+ res = this.visiblePanels[0];
49248
+ this.currentPanel = res;
49249
+ }
49250
+ return res;
49251
+ },
49252
+ set: function (val) {
49253
+ if (this.isRenderModeList || this.useTemplatePanel)
49254
+ return;
49255
+ if (!!val && this.visiblePanels.indexOf(val) < 0 || val === this.getPropertyValue("currentPanel"))
49256
+ return;
49257
+ this.setPropertyValue("currentPanel", val);
49258
+ this.updateFooterActions();
49259
+ this.updateTabToolbarItemsPressedState();
49260
+ this.fireCallback(this.currentIndexChangedCallback);
49041
49261
  },
49042
49262
  enumerable: false,
49043
49263
  configurable: true
@@ -49243,7 +49463,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49243
49463
  * @see panelNextText
49244
49464
  */
49245
49465
  get: function () {
49246
- return this.currentIndex >= 0 && this.currentIndex < this.panelCount - 1;
49466
+ return this.currentIndex >= 0 && this.currentIndex < this.visiblePanelCount - 1;
49247
49467
  },
49248
49468
  enumerable: false,
49249
49469
  configurable: true
@@ -49255,10 +49475,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49255
49475
  });
49256
49476
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRangeShowing", {
49257
49477
  /**
49258
- * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and panelCount is >= 2.
49478
+ * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and visiblePanelCount is >= 2.
49259
49479
  */
49260
49480
  get: function () {
49261
- return (this.showRangeInProgress && this.currentIndex >= 0 && this.panelCount > 1);
49481
+ return (this.showRangeInProgress && this.currentIndex >= 0 && this.visiblePanelCount > 1);
49262
49482
  },
49263
49483
  enumerable: false,
49264
49484
  configurable: true
@@ -49326,7 +49546,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49326
49546
  for (var i = this.panelCount; i < val; i++) {
49327
49547
  var panel = this.createNewPanel();
49328
49548
  this.panels.push(panel);
49329
- this.addTabFromToolbar(panel);
49330
49549
  if (this.renderMode == "list" && this.panelsState != "default") {
49331
49550
  if (this.panelsState === "expand") {
49332
49551
  panel.expand();
@@ -49347,11 +49566,19 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49347
49566
  this.reRunCondition();
49348
49567
  this.updateFooterActions();
49349
49568
  this.fireCallback(this.panelCountChangedCallback);
49350
- (removedPanels.length > 0) && this.removeTabFromToolbar(removedPanels);
49351
49569
  },
49352
49570
  enumerable: false,
49353
49571
  configurable: true
49354
49572
  });
49573
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "visiblePanelCount", {
49574
+ /**
49575
+ * Returns the number of visible panels in Dynamic Panel.
49576
+ * @see templateVisibleIf
49577
+ */
49578
+ get: function () { return this.visiblePanels.length; },
49579
+ enumerable: false,
49580
+ configurable: true
49581
+ });
49355
49582
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsState", {
49356
49583
  /**
49357
49584
  * Specifies whether users can expand and collapse panels. Applies if `renderMode` is `"list"` and the `templateTitle` property is specified.
@@ -49626,7 +49853,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49626
49853
  });
49627
49854
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasTitleOnLeftTop", {
49628
49855
  get: function () {
49629
- if (this.isRenderModeTab && !!this.panelCount)
49856
+ if (this.isRenderModeTab && this.visiblePanelCount > 0)
49630
49857
  return true;
49631
49858
  if (!this.hasTitle)
49632
49859
  return false;
@@ -49640,8 +49867,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49640
49867
  if (!this.isVisible)
49641
49868
  return 0;
49642
49869
  var startIndex = this.showQuestionNumbers == "onSurvey" ? value : 0;
49643
- for (var i = 0; i < this.panels.length; i++) {
49644
- var counter = this.setPanelVisibleIndex(this.panels[i], startIndex, this.showQuestionNumbers != "off");
49870
+ for (var i = 0; i < this.visiblePanels.length; i++) {
49871
+ var counter = this.setPanelVisibleIndex(this.visiblePanels[i], startIndex, this.showQuestionNumbers != "off");
49645
49872
  if (this.showQuestionNumbers == "onSurvey") {
49646
49873
  startIndex += counter;
49647
49874
  }
@@ -49674,7 +49901,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49674
49901
  get: function () {
49675
49902
  if (this.isDesignMode)
49676
49903
  return false;
49677
- if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList && this.currentIndex < this.panelCount - 1) {
49904
+ if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList && this.currentIndex < this.visiblePanelCount - 1) {
49678
49905
  return false;
49679
49906
  }
49680
49907
  return (this.allowAddPanel &&
@@ -49793,7 +50020,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49793
50020
  return true;
49794
50021
  };
49795
50022
  QuestionPanelDynamicModel.prototype.getProgressInfo = function () {
49796
- return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.panels, this.isRequired);
50023
+ return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.visiblePanels, this.isRequired);
49797
50024
  };
49798
50025
  QuestionPanelDynamicModel.prototype.isRowEmpty = function (val) {
49799
50026
  for (var prop in val) {
@@ -49909,10 +50136,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49909
50136
  * @see template
49910
50137
  */
49911
50138
  QuestionPanelDynamicModel.prototype.removePanel = function (value) {
49912
- var index = this.getPanelIndex(value);
49913
- if (index < 0 || index >= this.panelCount)
50139
+ var visIndex = this.getVisualPanelIndex(value);
50140
+ if (visIndex < 0 || visIndex >= this.visiblePanelCount)
50141
+ return;
50142
+ var panel = this.visiblePanels[visIndex];
50143
+ var index = this.panels.indexOf(panel);
50144
+ if (index < 0)
49914
50145
  return;
49915
- var panel = this.panels[index];
49916
50146
  if (this.survey && !this.survey.dynamicPanelRemoving(this, index, panel))
49917
50147
  return;
49918
50148
  this.panels.splice(index, 1);
@@ -49928,14 +50158,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49928
50158
  if (this.survey)
49929
50159
  this.survey.dynamicPanelRemoved(this, index, panel);
49930
50160
  this.isValueChangingInternally = false;
49931
- this.removeTabFromToolbar([panel]);
49932
50161
  };
49933
- QuestionPanelDynamicModel.prototype.getPanelIndex = function (val) {
50162
+ QuestionPanelDynamicModel.prototype.getVisualPanelIndex = function (val) {
49934
50163
  if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val))
49935
50164
  return val;
49936
- var items = this.items;
49937
- for (var i = 0; i < this.panels.length; i++) {
49938
- if (this.panels[i] === val || items[i] === val)
50165
+ var visPanels = this.visiblePanels;
50166
+ for (var i = 0; i < visPanels.length; i++) {
50167
+ if (visPanels[i] === val || visPanels[i].data === val)
49939
50168
  return i;
49940
50169
  }
49941
50170
  return -1;
@@ -50199,7 +50428,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50199
50428
  QuestionPanelDynamicModel.prototype.getIsAnswered = function () {
50200
50429
  if (!_super.prototype.getIsAnswered.call(this))
50201
50430
  return false;
50202
- var panels = this.panels;
50431
+ var panels = this.visiblePanels;
50203
50432
  for (var i = 0; i < panels.length; i++) {
50204
50433
  var visibleQuestions = [];
50205
50434
  panels[i].addQuestionsToList(visibleQuestions, true);
@@ -50237,8 +50466,9 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50237
50466
  };
50238
50467
  QuestionPanelDynamicModel.prototype.getAllErrors = function () {
50239
50468
  var result = _super.prototype.getAllErrors.call(this);
50240
- for (var i = 0; i < this.panels.length; i++) {
50241
- var questions = this.panels[i].questions;
50469
+ var panels = this.visiblePanels;
50470
+ for (var i = 0; i < panels.length; i++) {
50471
+ var questions = panels[i].questions;
50242
50472
  for (var j = 0; j < questions.length; j++) {
50243
50473
  var errors = questions[j].getAllErrors();
50244
50474
  if (errors && errors.length > 0) {
@@ -50284,7 +50514,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50284
50514
  };
50285
50515
  QuestionPanelDynamicModel.prototype.hasErrorInPanels = function (fireCallback, rec) {
50286
50516
  var res = false;
50287
- var panels = this.panels;
50517
+ var panels = this.visiblePanels;
50288
50518
  var keyValues = [];
50289
50519
  for (var i = 0; i < panels.length; i++) {
50290
50520
  this.setOnCompleteAsyncInPanel(panels[i]);
@@ -50367,6 +50597,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50367
50597
  return _this.getPanelActions(panel);
50368
50598
  };
50369
50599
  panel.footerToolbarCss = this.cssClasses.panelFooter;
50600
+ panel.registerPropertyChangedHandlers(["visible"], function () {
50601
+ if (panel.visible)
50602
+ _this.onPanelAdded(panel);
50603
+ else
50604
+ _this.onPanelRemoved(panel);
50605
+ _this.updateFooterActions();
50606
+ });
50370
50607
  return panel;
50371
50608
  };
50372
50609
  QuestionPanelDynamicModel.prototype.createAndSetupNewPanelObject = function () {
@@ -50477,6 +50714,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50477
50714
  var res = this.items.indexOf(item);
50478
50715
  return res > -1 ? res : this.items.length;
50479
50716
  };
50717
+ QuestionPanelDynamicModel.prototype.getVisibleItemIndex = function (item) {
50718
+ var visPanels = this.visiblePanels;
50719
+ for (var i = 0; i < visPanels.length; i++) {
50720
+ if (visPanels[i].data === item)
50721
+ return i;
50722
+ }
50723
+ return visPanels.length;
50724
+ };
50480
50725
  QuestionPanelDynamicModel.prototype.getPanelItemData = function (item) {
50481
50726
  var items = this.items;
50482
50727
  var index = items.indexOf(item);
@@ -50580,7 +50825,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50580
50825
  };
50581
50826
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "progressText", {
50582
50827
  get: function () {
50583
- var rangeMax = this.panelCount;
50828
+ var rangeMax = this.visiblePanelCount;
50584
50829
  return this.getLocalizationFormatString("panelDynamicProgressText", this.currentIndex + 1, rangeMax);
50585
50830
  },
50586
50831
  enumerable: false,
@@ -50588,7 +50833,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50588
50833
  });
50589
50834
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "progress", {
50590
50835
  get: function () {
50591
- return ((this.currentIndex + 1) / this.panelCount) * 100 + "%";
50836
+ return ((this.currentIndex + 1) / this.visiblePanelCount) * 100 + "%";
50592
50837
  },
50593
50838
  enumerable: false,
50594
50839
  configurable: true
@@ -50661,7 +50906,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50661
50906
  configurable: true
50662
50907
  });
50663
50908
  QuestionPanelDynamicModel.prototype.getShowNoEntriesPlaceholder = function () {
50664
- return !!this.cssClasses.noEntriesPlaceholder && !this.isDesignMode && this.panelCount === 0;
50909
+ return !!this.cssClasses.noEntriesPlaceholder && !this.isDesignMode && this.visiblePanelCount === 0;
50665
50910
  };
50666
50911
  QuestionPanelDynamicModel.prototype.needResponsiveWidth = function () {
50667
50912
  var panel = this.getPanel();
@@ -50721,7 +50966,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50721
50966
  var addBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50722
50967
  id: "sv-pd-add-btn",
50723
50968
  component: "sv-paneldynamic-add-btn",
50724
- visible: new _base__WEBPACK_IMPORTED_MODULE_12__["ComputedUpdater"](function () { return _this.canAddPanel; }),
50725
50969
  data: { question: this }
50726
50970
  });
50727
50971
  var prevBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
@@ -50746,8 +50990,9 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50746
50990
  var isMobile = _this.isMobile;
50747
50991
  var showNavigation = !isLegacyNavigation && !isRenderModeList;
50748
50992
  prevTextBtn.visible = showNavigation && _this.currentIndex > 0;
50749
- nextTextBtn.visible = showNavigation && _this.currentIndex < _this.panelCount - 1;
50993
+ nextTextBtn.visible = showNavigation && _this.currentIndex < _this.visiblePanelCount - 1;
50750
50994
  nextTextBtn.needSpace = isMobile && nextTextBtn.visible && prevTextBtn.visible;
50995
+ addBtn.visible = _this.canAddPanel;
50751
50996
  addBtn.needSpace = _this.isMobile && !nextTextBtn.visible && prevTextBtn.visible;
50752
50997
  progressText.visible = !_this.isRenderModeList && !isMobile;
50753
50998
  progressText.needSpace = !isLegacyNavigation && !_this.isMobile;
@@ -50788,9 +51033,9 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50788
51033
  QuestionPanelDynamicModel.prototype.updateTabToolbarItemsPressedState = function () {
50789
51034
  if (!this.isRenderModeTab)
50790
51035
  return;
50791
- if (this.currentIndex < 0 || this.currentIndex >= this.panels.length)
51036
+ if (this.currentIndex < 0 || this.currentIndex >= this.visiblePanelCount)
50792
51037
  return;
50793
- var panel = this.panels[this.currentIndex];
51038
+ var panel = this.visiblePanels[this.currentIndex];
50794
51039
  this.additionalTitleToolbar.renderedActions.forEach(function (action) { return action.pressed = action.id === panel.id; });
50795
51040
  };
50796
51041
  QuestionPanelDynamicModel.prototype.updateTabToolbar = function () {
@@ -50798,24 +51043,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50798
51043
  if (!this.isRenderModeTab)
50799
51044
  return;
50800
51045
  var items = [];
50801
- this.panels.forEach(function (panel) { return items.push(_this.createTabByPanel(panel)); });
51046
+ this.visiblePanels.forEach(function (panel) { return items.push(_this.createTabByPanel(panel)); });
50802
51047
  this.additionalTitleToolbar.setItems(items);
50803
51048
  };
50804
- QuestionPanelDynamicModel.prototype.addTabFromToolbar = function (panel) {
51049
+ QuestionPanelDynamicModel.prototype.addTabFromToolbar = function (panel, index) {
50805
51050
  if (!this.isRenderModeTab)
50806
51051
  return;
50807
51052
  var newItem = this.createTabByPanel(panel);
50808
- this.additionalTitleToolbar.actions.push(newItem);
51053
+ this.additionalTitleToolbar.actions.splice(index, 0, newItem);
50809
51054
  this.updateTabToolbarItemsPressedState();
50810
51055
  };
50811
- QuestionPanelDynamicModel.prototype.removeTabFromToolbar = function (panels) {
50812
- var _this = this;
51056
+ QuestionPanelDynamicModel.prototype.removeTabFromToolbar = function (panel) {
50813
51057
  if (!this.isRenderModeTab)
50814
51058
  return;
50815
- panels.forEach(function (panel) {
50816
- var removedItem = _this.additionalTitleToolbar.getActionById(panel.id);
50817
- _this.additionalTitleToolbar.actions.splice(_this.additionalTitleToolbar.actions.indexOf(removedItem), 1);
50818
- });
51059
+ var removedItem = this.additionalTitleToolbar.getActionById(panel.id);
51060
+ if (!removedItem)
51061
+ return;
51062
+ this.additionalTitleToolbar.actions.splice(this.additionalTitleToolbar.actions.indexOf(removedItem), 1);
50819
51063
  this.updateTabToolbarItemsPressedState();
50820
51064
  };
50821
51065
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "showLegacyNavigation", {
@@ -50903,6 +51147,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].addClass("paneldynamic",
50903
51147
  default: "default",
50904
51148
  choices: ["default", "top", "bottom", "left"],
50905
51149
  },
51150
+ {
51151
+ name: "templateVisibleIf:expression",
51152
+ category: "logic"
51153
+ },
50906
51154
  {
50907
51155
  name: "panelRemoveButtonLocation",
50908
51156
  default: "bottom",
@@ -51527,9 +51775,9 @@ var RenderedRatingItem = /** @class */ (function (_super) {
51527
51775
  }(_base__WEBPACK_IMPORTED_MODULE_7__["Base"]));
51528
51776
 
51529
51777
  /**
51530
- * A Model for a rating question.
51778
+ * A class that describes the Rating Scale question type.
51531
51779
  *
51532
- * [View Demo](https://surveyjs.io/form-library/examples/questiontype-rating/ (linkStyle))
51780
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
51533
51781
  */
51534
51782
  var QuestionRatingModel = /** @class */ (function (_super) {
51535
51783
  __extends(QuestionRatingModel, _super);
@@ -51994,10 +52242,35 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51994
52242
  QuestionRatingModel.prototype.onItemMouseOut = function (item) {
51995
52243
  this.renderedRateItems.forEach(function (item) { return item.highlight = "none"; });
51996
52244
  };
52245
+ Object.defineProperty(QuestionRatingModel.prototype, "itemSmallMode", {
52246
+ get: function () {
52247
+ return this.inMatrixMode && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].matrix.rateSize == "small";
52248
+ },
52249
+ enumerable: false,
52250
+ configurable: true
52251
+ });
51997
52252
  Object.defineProperty(QuestionRatingModel.prototype, "ratingRootCss", {
51998
52253
  get: function () {
51999
- return ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
52254
+ var baseClass = ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
52000
52255
  this.cssClasses.rootWrappable : this.cssClasses.root;
52256
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
52257
+ .append(baseClass)
52258
+ .append(this.cssClasses.itemSmall, this.itemSmallMode && this.rateType != "labels")
52259
+ .toString();
52260
+ },
52261
+ enumerable: false,
52262
+ configurable: true
52263
+ });
52264
+ Object.defineProperty(QuestionRatingModel.prototype, "itemStarIcon", {
52265
+ get: function () {
52266
+ return this.itemSmallMode ? "icon-rating-star-small" : "icon-rating-star";
52267
+ },
52268
+ enumerable: false,
52269
+ configurable: true
52270
+ });
52271
+ Object.defineProperty(QuestionRatingModel.prototype, "itemStarIconAlt", {
52272
+ get: function () {
52273
+ return this.itemStarIcon + "-2";
52001
52274
  },
52002
52275
  enumerable: false,
52003
52276
  configurable: true
@@ -52087,6 +52360,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
52087
52360
  var itemUnhighlightedClass = null;
52088
52361
  var itemScaleColoredClass = null;
52089
52362
  var itemRateColoredClass = null;
52363
+ var itemSmallClass = null;
52090
52364
  if (this.isStar) {
52091
52365
  itemClass = this.cssClasses.itemStar;
52092
52366
  itemSelectedClass = this.cssClasses.itemStarSelected;
@@ -52095,6 +52369,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
52095
52369
  itemitemOnErrorClass = this.cssClasses.itemStarOnError;
52096
52370
  itemHighlightedClass = this.cssClasses.itemStarHighlighted;
52097
52371
  itemUnhighlightedClass = this.cssClasses.itemStarUnhighlighted;
52372
+ itemSmallClass = this.cssClasses.itemStarSmall;
52098
52373
  }
52099
52374
  if (this.isSmiley) {
52100
52375
  itemClass = this.cssClasses.itemSmiley;
@@ -52105,6 +52380,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
52105
52380
  itemHighlightedClass = this.cssClasses.itemSmileyHighlighted;
52106
52381
  itemScaleColoredClass = this.cssClasses.itemSmileyScaleColored;
52107
52382
  itemRateColoredClass = this.cssClasses.itemSmileyRateColored;
52383
+ itemSmallClass = this.cssClasses.itemSmileySmall;
52108
52384
  }
52109
52385
  var hasFixedSize = !this.isStar &&
52110
52386
  !this.isSmiley &&
@@ -52123,6 +52399,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
52123
52399
  .append(itemRateColoredClass, this.rateColorMode == "scale" && isSelected)
52124
52400
  .append(itemUnhighlightedClass, isUnhighlighted)
52125
52401
  .append(itemitemOnErrorClass, this.errors.length > 0)
52402
+ .append(itemSmallClass, this.itemSmallMode)
52126
52403
  .append(this.cssClasses.itemFixedSize, hasFixedSize)
52127
52404
  .toString();
52128
52405
  };
@@ -52325,7 +52602,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
52325
52602
  name: "autoGenerate",
52326
52603
  category: "rateValues",
52327
52604
  default: true,
52328
- choices: [{ value: true, text: "Generate" }, { value: false, text: "Enter manually" }],
52605
+ choices: [true, false],
52329
52606
  visibleIndex: 4
52330
52607
  },
52331
52608
  {
@@ -53103,7 +53380,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
53103
53380
  }
53104
53381
  };
53105
53382
  _this.onChange = function (event) {
53106
- if (event.target === document.activeElement) {
53383
+ if (event.target === _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].environment.root.activeElement) {
53107
53384
  if (_this.isInputTextUpdate) {
53108
53385
  _this.updateValueOnEvent(event);
53109
53386
  }
@@ -55103,10 +55380,11 @@ __webpack_require__.r(__webpack_exports__);
55103
55380
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "List", function() { return List; });
55104
55381
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
55105
55382
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
55106
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
55107
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
55108
- /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
55109
- /* harmony import */ var _list_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./list-item */ "./src/react/components/list/list-item.tsx");
55383
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
55384
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
55385
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
55386
+ /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
55387
+ /* harmony import */ var _list_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./list-item */ "./src/react/components/list/list-item.tsx");
55110
55388
  var __extends = (undefined && undefined.__extends) || (function () {
55111
55389
  var extendStatics = function (d, b) {
55112
55390
  extendStatics = Object.setPrototypeOf ||
@@ -55127,6 +55405,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
55127
55405
 
55128
55406
 
55129
55407
 
55408
+
55130
55409
  var List = /** @class */ (function (_super) {
55131
55410
  __extends(List, _super);
55132
55411
  function List(props) {
@@ -55184,7 +55463,7 @@ var List = /** @class */ (function (_super) {
55184
55463
  return null;
55185
55464
  }
55186
55465
  return items.map(function (item, itemIndex) {
55187
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_list_item__WEBPACK_IMPORTED_MODULE_4__["ListItem"], { model: _this.model, item: item, key: "item" + itemIndex }));
55466
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_list_item__WEBPACK_IMPORTED_MODULE_5__["ListItem"], { model: _this.model, item: item, key: "item" + itemIndex }));
55188
55467
  });
55189
55468
  };
55190
55469
  List.prototype.searchElementContent = function () {
@@ -55193,7 +55472,8 @@ var List = /** @class */ (function (_super) {
55193
55472
  return null;
55194
55473
  else {
55195
55474
  var onChange = function (e) {
55196
- if (e.target === document.activeElement) {
55475
+ var root = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
55476
+ if (e.target === root.activeElement) {
55197
55477
  _this.model.filterString = e.target.value;
55198
55478
  }
55199
55479
  };
@@ -55202,10 +55482,10 @@ var List = /** @class */ (function (_super) {
55202
55482
  };
55203
55483
  var clearButton = this.model.showSearchClearButton && !!this.model.filterString ?
55204
55484
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: this.model.cssClasses.searchClearButtonIcon, onClick: function (event) { _this.model.onClickSearchClearButton(event); } },
55205
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-searchclear", size: "auto" })) : null;
55485
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { iconName: "icon-searchclear", size: "auto" })) : null;
55206
55486
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.filter },
55207
55487
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.filterIcon },
55208
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-search", size: "auto" })),
55488
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { iconName: "icon-search", size: "auto" })),
55209
55489
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "text", className: this.model.cssClasses.filterInput, "aria-label": this.model.filterStringPlaceholder, placeholder: this.model.filterStringPlaceholder, value: this.state.filterString, onKeyUp: onKeyUp, onChange: onChange }),
55210
55490
  clearButton));
55211
55491
  }
@@ -55216,9 +55496,9 @@ var List = /** @class */ (function (_super) {
55216
55496
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.emptyText, "aria-label": this.model.emptyMessage }, this.model.emptyMessage)));
55217
55497
  };
55218
55498
  return List;
55219
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
55499
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
55220
55500
 
55221
- _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-list", function (props) {
55501
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-list", function (props) {
55222
55502
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(List, props);
55223
55503
  });
55224
55504
 
@@ -55571,7 +55851,7 @@ var NotifierComponent = /** @class */ (function (_super) {
55571
55851
  if (!this.notifier.isDisplayed)
55572
55852
  return null;
55573
55853
  var style = { visibility: this.notifier.active ? "visible" : "hidden" };
55574
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.notifier.css, style: style },
55854
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.notifier.css, style: style, role: "alert", "aria-live": "polite" },
55575
55855
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, this.notifier.message),
55576
55856
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__["SurveyActionBar"], { model: this.notifier.actionBar })));
55577
55857
  };
@@ -56268,8 +56548,8 @@ var RatingItemStar = /** @class */ (function (_super) {
56268
56548
  var _this = this;
56269
56549
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
56270
56550
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, 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-describedby": this.question.ariaDescribedBy }),
56271
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName: "icon-rating-star", title: this.item.text }),
56272
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: "icon-rating-star-2", title: this.item.text })));
56551
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
56552
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
56273
56553
  };
56274
56554
  return RatingItemStar;
56275
56555
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
@@ -56837,7 +57117,8 @@ var TitleContent = /** @class */ (function (_super) {
56837
57117
  }
56838
57118
  var questionNumber = element.no;
56839
57119
  if (questionNumber) {
56840
- spans.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { "data-key": "q_num", key: "q_num", className: cssClasses.number || cssClasses.panel.number, style: { position: "static" }, "aria-hidden": true }, questionNumber));
57120
+ var panelNumber = !!cssClasses.panel ? cssClasses.panel.number : undefined;
57121
+ spans.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { "data-key": "q_num", key: "q_num", className: cssClasses.number || panelNumber, style: { position: "static" }, "aria-hidden": true }, questionNumber));
56841
57122
  spans.push(getSpaceSpan("num-sp"));
56842
57123
  }
56843
57124
  if (element.isRequireTextBeforeTitle) {
@@ -57133,8 +57414,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
57133
57414
  SurveyQuestionDropdownBase.prototype.renderInput = function (dropdownListModel) {
57134
57415
  var _this = this;
57135
57416
  var valueElement = this.renderValueElement(dropdownListModel);
57417
+ var root = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
57136
57418
  var onInputChange = function (e) {
57137
- if (e.target === document.activeElement) {
57419
+ if (e.target === root.activeElement) {
57138
57420
  dropdownListModel.inputStringRendered = e.target.value;
57139
57421
  }
57140
57422
  };
@@ -60710,6 +60992,7 @@ __webpack_require__.r(__webpack_exports__);
60710
60992
  /* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
60711
60993
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
60712
60994
  /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
60995
+ /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
60713
60996
  var __extends = (undefined && undefined.__extends) || (function () {
60714
60997
  var extendStatics = function (d, b) {
60715
60998
  extendStatics = Object.setPrototypeOf ||
@@ -60730,6 +61013,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
60730
61013
 
60731
61014
 
60732
61015
 
61016
+
60733
61017
  var SurveyQuestionFile = /** @class */ (function (_super) {
60734
61018
  __extends(SurveyQuestionFile, _super);
60735
61019
  function SurveyQuestionFile(props) {
@@ -60767,7 +61051,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
60767
61051
  var questionCss = this.question.cssClasses;
60768
61052
  var noFileChosen = null;
60769
61053
  var chooseFile = null;
60770
- chooseFile = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
61054
+ chooseFile = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_5__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
60771
61055
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.chooseButtonCaption),
60772
61056
  (!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.chooseButtonCaption, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null));
60773
61057
  if (this.question.isEmpty()) {
@@ -63337,7 +63621,8 @@ var TagboxFilterString = /** @class */ (function (_super) {
63337
63621
  }
63338
63622
  };
63339
63623
  TagboxFilterString.prototype.onChange = function (e) {
63340
- if (e.target === document.activeElement) {
63624
+ var root = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
63625
+ if (e.target === root.activeElement) {
63341
63626
  this.model.inputStringRendered = e.target.value;
63342
63627
  }
63343
63628
  };
@@ -63355,7 +63640,16 @@ var TagboxFilterString = /** @class */ (function (_super) {
63355
63640
  };
63356
63641
  TagboxFilterString.prototype.render = function () {
63357
63642
  var _this = this;
63358
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-label": this.question.placeholder, "aria-expanded": this.question.ariaExpanded ? "true" : "false", "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }));
63643
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hint },
63644
+ this.model.showHintPrefix ?
63645
+ (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
63646
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringPrefix))) : null,
63647
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffixWrapper },
63648
+ this.model.showHintString ?
63649
+ (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
63650
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
63651
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
63652
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-label": this.question.placeholder, "aria-expanded": this.question.ariaExpanded ? "true" : "false", "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
63359
63653
  };
63360
63654
  return TagboxFilterString;
63361
63655
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
@@ -63404,9 +63698,6 @@ var SurveyQuestionTagboxItem = /** @class */ (function (_super) {
63404
63698
  function SurveyQuestionTagboxItem(props) {
63405
63699
  return _super.call(this, props) || this;
63406
63700
  }
63407
- SurveyQuestionTagboxItem.prototype.getStateElement = function () {
63408
- return this.item;
63409
- };
63410
63701
  Object.defineProperty(SurveyQuestionTagboxItem.prototype, "question", {
63411
63702
  get: function () {
63412
63703
  return this.props.question;
@@ -63494,7 +63785,29 @@ var RendererFactory = /** @class */ (function () {
63494
63785
 
63495
63786
  "use strict";
63496
63787
  __webpack_require__.r(__webpack_exports__);
63497
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
63788
+ /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
63789
+ var document = global.document;
63790
+ var defaultEnvironment = (!!document ? {
63791
+ root: document,
63792
+ _rootElement: document.body,
63793
+ get rootElement() {
63794
+ var _a;
63795
+ return (_a = this._rootElement) !== null && _a !== void 0 ? _a : document.body;
63796
+ },
63797
+ set rootElement(rootElement) {
63798
+ this._rootElement = rootElement;
63799
+ },
63800
+ _popupMountContainer: document.body,
63801
+ get popupMountContainer() {
63802
+ var _a;
63803
+ return (_a = this._popupMountContainer) !== null && _a !== void 0 ? _a : document.body;
63804
+ },
63805
+ set popupMountContainer(popupMountContainer) {
63806
+ this._popupMountContainer = popupMountContainer;
63807
+ },
63808
+ svgMountContainer: document.head,
63809
+ stylesSheetsMountContainer: document.head,
63810
+ } : undefined);
63498
63811
  var columnWidthsByType = {
63499
63812
  "file": { minWidth: "240px" },
63500
63813
  "comment": { minWidth: "200px" }
@@ -63876,6 +64189,10 @@ var settings = {
63876
64189
  * - `"icon"` - Users can only use the choice item icon as a drag handle.
63877
64190
  */
63878
64191
  rankingDragHandleArea: "entireItem",
64192
+ /**
64193
+ * Specifies environment in which SurveyJS will exist
64194
+ */
64195
+ environment: defaultEnvironment,
63879
64196
  titleTags: {
63880
64197
  survey: "h3",
63881
64198
  page: "h4",
@@ -63963,12 +64280,17 @@ var settings = {
63963
64280
  * - `columnWidthsByType`: `Object`\
63964
64281
  * An object that specifies fixed and minimum column width based on the column type.\
63965
64282
  * Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
64283
+ *
64284
+ * - `rateSize`: `"small"` (default) | `"normal"`\
64285
+ * Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
63966
64286
  */
63967
64287
  matrix: {
63968
- columnWidthsByType: columnWidthsByType
64288
+ columnWidthsByType: columnWidthsByType,
64289
+ rateSize: "small",
63969
64290
  }
63970
64291
  };
63971
64292
 
64293
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
63972
64294
 
63973
64295
  /***/ }),
63974
64296
 
@@ -63991,6 +64313,10 @@ __webpack_require__.r(__webpack_exports__);
63991
64313
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "winterstoneThemeColors", function() { return winterstoneThemeColors; });
63992
64314
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StylesManager", function() { return StylesManager; });
63993
64315
  /* harmony import */ var _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultCss/defaultV2Css */ "./src/defaultCss/defaultV2Css.ts");
64316
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
64317
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
64318
+
64319
+
63994
64320
 
63995
64321
  var modernThemeColors = {
63996
64322
  "$main-color": "#1ab394",
@@ -64222,9 +64548,11 @@ var StylesManager = /** @class */ (function () {
64222
64548
  return themeMapper;
64223
64549
  };
64224
64550
  StylesManager.getIncludedThemeCss = function () {
64551
+ var rootElement = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.rootElement;
64225
64552
  var themeMapper = StylesManager.getAvailableThemes();
64226
- if (!!document && !!document.body) {
64227
- var styles_1 = getComputedStyle(document.body);
64553
+ var element = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isShadowDOM"])(rootElement) ? rootElement.host : rootElement;
64554
+ if (!!element) {
64555
+ var styles_1 = getComputedStyle(element);
64228
64556
  if (styles_1.length) {
64229
64557
  return themeMapper.filter(function (item) { return item.theme.variables && styles_1.getPropertyValue(item.theme.variables.themeMark); });
64230
64558
  }
@@ -64232,23 +64560,25 @@ var StylesManager = /** @class */ (function () {
64232
64560
  return [];
64233
64561
  };
64234
64562
  StylesManager.findSheet = function (styleSheetId) {
64235
- if (typeof document === "undefined")
64563
+ if (typeof _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment === "undefined")
64236
64564
  return null;
64237
- for (var i = 0; i < document.styleSheets.length; i++) {
64238
- if (!!document.styleSheets[i].ownerNode && document.styleSheets[i].ownerNode["id"] === styleSheetId) {
64239
- return document.styleSheets[i];
64565
+ var styleSheets = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root.styleSheets;
64566
+ for (var i = 0; i < styleSheets.length; i++) {
64567
+ if (!!styleSheets[i].ownerNode && styleSheets[i].ownerNode["id"] === styleSheetId) {
64568
+ return styleSheets[i];
64240
64569
  }
64241
64570
  }
64242
64571
  return null;
64243
64572
  };
64244
64573
  StylesManager.createSheet = function (styleSheetId) {
64574
+ var stylesSheetsMountContainer = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.stylesSheetsMountContainer;
64245
64575
  var style = document.createElement("style");
64246
64576
  style.id = styleSheetId;
64247
64577
  // Add a media (and/or media query) here if you'd like!
64248
64578
  // style.setAttribute("media", "screen")
64249
64579
  // style.setAttribute("media", "only screen and (max-width : 1024px)")
64250
64580
  style.appendChild(document.createTextNode(""));
64251
- document.head.appendChild(style);
64581
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["getElement"])(stylesSheetsMountContainer).appendChild(style);
64252
64582
  if (!!StylesManager.Logger) {
64253
64583
  StylesManager.Logger.log("style sheet " + styleSheetId + " created");
64254
64584
  }
@@ -64256,10 +64586,12 @@ var StylesManager = /** @class */ (function () {
64256
64586
  };
64257
64587
  StylesManager.applyTheme = function (themeName, themeSelector) {
64258
64588
  if (themeName === void 0) { themeName = "default"; }
64589
+ var rootElement = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.rootElement;
64590
+ var element = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isShadowDOM"])(rootElement) ? rootElement.host : rootElement;
64259
64591
  _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_0__["surveyCss"].currentType = themeName;
64260
64592
  if (StylesManager.Enabled) {
64261
64593
  if (themeName !== "bootstrap" && themeName !== "bootstrapmaterial") {
64262
- setCssVariables(StylesManager.ThemeColors[themeName], document.body);
64594
+ setCssVariables(StylesManager.ThemeColors[themeName], element);
64263
64595
  if (!!StylesManager.Logger) {
64264
64596
  StylesManager.Logger.log("apply theme " + themeName + " completed");
64265
64597
  }
@@ -64596,9 +64928,10 @@ var SurveyElement = /** @class */ (function (_super) {
64596
64928
  return info;
64597
64929
  };
64598
64930
  SurveyElement.ScrollElementToTop = function (elementId) {
64599
- if (!elementId || typeof document === "undefined")
64931
+ var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
64932
+ if (!elementId || typeof root === "undefined")
64600
64933
  return false;
64601
- var el = document.getElementById(elementId);
64934
+ var el = root.getElementById(elementId);
64602
64935
  if (!el || !el.scrollIntoView)
64603
64936
  return false;
64604
64937
  var elemTop = el.getBoundingClientRect().top;
@@ -64636,9 +64969,10 @@ var SurveyElement = /** @class */ (function (_super) {
64636
64969
  return res;
64637
64970
  };
64638
64971
  SurveyElement.focusElementCore = function (elementId) {
64639
- if (!document)
64972
+ var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
64973
+ if (!root)
64640
64974
  return false;
64641
- var el = document.getElementById(elementId);
64975
+ var el = root.getElementById(elementId);
64642
64976
  if (el && !el["disabled"]) {
64643
64977
  el.focus();
64644
64978
  return true;
@@ -65038,9 +65372,10 @@ var SurveyElement = /** @class */ (function (_super) {
65038
65372
  *
65039
65373
  * Use the following events of the [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) object to override CSS classes:
65040
65374
  *
65041
- * - [`onUpdatePageCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePageCssClasses)
65042
- * - [`onUpdatePanelCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePanelCssClasses)
65043
65375
  * - [`onUpdateQuestionCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdateQuestionCssClasses)
65376
+ * - [`onUpdatePanelCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePanelCssClasses)
65377
+ * - [`onUpdatePageCssClasses`](https://surveyjs.io/form-library/documentation/surveymodel#onUpdatePageCssClasses)
65378
+ * - [`onUpdateChoiceItemCss`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onUpdateChoiceItemCss)
65044
65379
  */
65045
65380
  get: function () {
65046
65381
  if (!this.survey)
@@ -65051,6 +65386,16 @@ var SurveyElement = /** @class */ (function (_super) {
65051
65386
  enumerable: false,
65052
65387
  configurable: true
65053
65388
  });
65389
+ Object.defineProperty(SurveyElement.prototype, "cssTitleNumber", {
65390
+ get: function () {
65391
+ var css = this.cssClasses;
65392
+ if (css.number)
65393
+ return css.number;
65394
+ return css.panel ? css.panel.number : undefined;
65395
+ },
65396
+ enumerable: false,
65397
+ configurable: true
65398
+ });
65054
65399
  SurveyElement.prototype.calcCssClasses = function (css) { return undefined; };
65055
65400
  SurveyElement.prototype.updateElementCssCore = function (cssClasses) { };
65056
65401
  Object.defineProperty(SurveyElement.prototype, "cssError", {
@@ -66111,23 +66456,33 @@ var SurveyModel = /** @class */ (function (_super) {
66111
66456
  */
66112
66457
  _this.onProcessTextValue = _this.addEvent();
66113
66458
  /**
66114
- * An event that is raised before rendering a question. Use it to override the default question CSS classes.
66459
+ * An event that is raised before rendering a question. Use it to override default question CSS classes.
66115
66460
  *
66116
66461
  * For information on event handler parameters, refer to descriptions within the interface.
66117
66462
  *
66118
- * [View Demo](https://surveyjs.io/form-library/examples/survey-cssclasses/ (linkStyle))
66463
+ * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
66464
+ * @see css
66119
66465
  */
66120
66466
  _this.onUpdateQuestionCssClasses = _this.addEvent();
66121
66467
  /**
66122
- * An event that is raised before rendering a panel. Use it to override the default panel CSS classes.
66468
+ * An event that is raised before rendering a panel. Use it to override default panel CSS classes.
66469
+ *
66470
+ * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
66471
+ * @see css
66123
66472
  */
66124
66473
  _this.onUpdatePanelCssClasses = _this.addEvent();
66125
66474
  /**
66126
- * An event that is raised before rendering a page. Use it to override the default page CSS classes.
66475
+ * An event that is raised before rendering a page. Use it to override default page CSS classes.
66476
+ *
66477
+ * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
66478
+ * @see css
66127
66479
  */
66128
66480
  _this.onUpdatePageCssClasses = _this.addEvent();
66129
66481
  /**
66130
- * An event that is raised before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
66482
+ * 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.
66483
+ *
66484
+ * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
66485
+ * @see css
66131
66486
  */
66132
66487
  _this.onUpdateChoiceItemCss = _this.addEvent();
66133
66488
  /**
@@ -66703,6 +67058,11 @@ var SurveyModel = /** @class */ (function (_super) {
66703
67058
  this.updateCompletedPageCss();
66704
67059
  };
66705
67060
  Object.defineProperty(SurveyModel.prototype, "css", {
67061
+ /**
67062
+ * Gets or sets an object in which keys are UI elements and values are CSS classes applied to them.
67063
+ *
67064
+ * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
67065
+ */
66706
67066
  get: function () {
66707
67067
  if (!this.cssValue) {
66708
67068
  this.cssValue = {};
@@ -69237,7 +69597,7 @@ var SurveyModel = /** @class */ (function (_super) {
69237
69597
  this.isCompleted = false;
69238
69598
  this.isCompletedBefore = false;
69239
69599
  this.isLoading = false;
69240
- this.canBeCompletedByTrigger = false;
69600
+ this.completedByTriggers = undefined;
69241
69601
  if (clearData) {
69242
69602
  this.data = null;
69243
69603
  this.variablesHash = {};
@@ -69483,7 +69843,7 @@ var SurveyModel = /** @class */ (function (_super) {
69483
69843
  });
69484
69844
  Object.defineProperty(SurveyModel.prototype, "hasCookie", {
69485
69845
  /**
69486
- * Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `completed` state if the function returns `true`.
69846
+ * Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `completedbefore` state if the function returns `true`.
69487
69847
  * @see cookieName
69488
69848
  * @see setCookie
69489
69849
  * @see deleteCookie
@@ -70282,8 +70642,8 @@ var SurveyModel = /** @class */ (function (_super) {
70282
70642
  this.stopTimer();
70283
70643
  this.isCompleted = true;
70284
70644
  this.clearUnusedValues();
70285
- this.setCookie();
70286
70645
  this.saveDataOnComplete(isCompleteOnTrigger);
70646
+ this.setCookie();
70287
70647
  return true;
70288
70648
  };
70289
70649
  SurveyModel.prototype.saveDataOnComplete = function (isCompleteOnTrigger) {
@@ -70477,14 +70837,31 @@ var SurveyModel = /** @class */ (function (_super) {
70477
70837
  SurveyModel.prototype.setCompleted = function () {
70478
70838
  this.doComplete(true);
70479
70839
  };
70480
- SurveyModel.prototype.canBeCompleted = function () {
70840
+ SurveyModel.prototype.canBeCompleted = function (trigger, isCompleted) {
70481
70841
  if (!_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].changeNavigationButtonsOnCompleteTrigger)
70482
70842
  return;
70483
- if (!this.canBeCompletedByTrigger) {
70484
- this.canBeCompletedByTrigger = true;
70843
+ var prevCanBeCompleted = this.canBeCompletedByTrigger;
70844
+ if (!this.completedByTriggers)
70845
+ this.completedByTriggers = {};
70846
+ if (isCompleted) {
70847
+ this.completedByTriggers[trigger.id] = true;
70848
+ }
70849
+ else {
70850
+ delete this.completedByTriggers[trigger.id];
70851
+ }
70852
+ if (prevCanBeCompleted !== this.canBeCompletedByTrigger) {
70485
70853
  this.updateButtonsVisibility();
70486
70854
  }
70487
70855
  };
70856
+ Object.defineProperty(SurveyModel.prototype, "canBeCompletedByTrigger", {
70857
+ get: function () {
70858
+ if (!this.completedByTriggers)
70859
+ return false;
70860
+ return Object.keys(this.completedByTriggers).length > 0;
70861
+ },
70862
+ enumerable: false,
70863
+ configurable: true
70864
+ });
70488
70865
  Object.defineProperty(SurveyModel.prototype, "processedCompletedHtml", {
70489
70866
  /**
70490
70867
  * Returns the HTML content for the complete page.
@@ -70699,8 +71076,9 @@ var SurveyModel = /** @class */ (function (_super) {
70699
71076
  if (this.onAfterRenderQuestionInput.isEmpty)
70700
71077
  return;
70701
71078
  var id = question.inputId;
70702
- if (!!id && htmlElement.id !== id && typeof document !== "undefined") {
70703
- var el = document.getElementById(id);
71079
+ var root = _settings__WEBPACK_IMPORTED_MODULE_14__["settings"].environment.root;
71080
+ if (!!id && htmlElement.id !== id && typeof root !== "undefined") {
71081
+ var el = root.getElementById(id);
70704
71082
  if (!!el) {
70705
71083
  htmlElement = el;
70706
71084
  }
@@ -70741,7 +71119,12 @@ var SurveyModel = /** @class */ (function (_super) {
70741
71119
  this.onChoicesLazyLoad.fire(this, options);
70742
71120
  };
70743
71121
  SurveyModel.prototype.getChoiceDisplayValue = function (options) {
70744
- this.onGetChoiceDisplayValue.fire(this, options);
71122
+ if (this.onGetChoiceDisplayValue.isEmpty) {
71123
+ options.setItems(null);
71124
+ }
71125
+ else {
71126
+ this.onGetChoiceDisplayValue.fire(this, options);
71127
+ }
70745
71128
  };
70746
71129
  SurveyModel.prototype.matrixBeforeRowAdded = function (options) {
70747
71130
  this.onMatrixBeforeRowAdded.fire(this, options);
@@ -71470,7 +71853,6 @@ var SurveyModel = /** @class */ (function (_super) {
71470
71853
  this.triggerValues = this.getFilteredValues();
71471
71854
  var properties = this.getFilteredProperties();
71472
71855
  var prevCanBeCompleted = this.canBeCompletedByTrigger;
71473
- this.canBeCompletedByTrigger = false;
71474
71856
  for (var i = 0; i < this.triggers.length; i++) {
71475
71857
  this.triggers[i].checkExpression(isOnNextPage, isOnComplete, this.triggerKeys, this.triggerValues, properties);
71476
71858
  }
@@ -71735,7 +72117,7 @@ var SurveyModel = /** @class */ (function (_super) {
71735
72117
  this.onQuestionsOnPageModeChanged("standard");
71736
72118
  _super.prototype.endLoadingFromJson.call(this);
71737
72119
  if (this.hasCookie) {
71738
- this.doComplete();
72120
+ this.isCompletedBefore = true;
71739
72121
  }
71740
72122
  this.doElementsOnLoad();
71741
72123
  this.isEndLoadingFromJson = "conditions";
@@ -73826,7 +74208,9 @@ __webpack_require__.r(__webpack_exports__);
73826
74208
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTOCListModel", function() { return createTOCListModel; });
73827
74209
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTocRootCss", function() { return getTocRootCss; });
73828
74210
  /* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
73829
- /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./list */ "./src/list.ts");
74211
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
74212
+ /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./list */ "./src/list.ts");
74213
+
73830
74214
 
73831
74215
 
73832
74216
  function tryNavigateToPage(survey, index) {
@@ -73853,10 +74237,11 @@ function createTOCListModel(survey) {
73853
74237
  !!document.activeElement.blur && document.activeElement.blur();
73854
74238
  }
73855
74239
  return tryNavigateToPage(survey, index);
73856
- }
74240
+ },
74241
+ visible: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return page.isVisible; })
73857
74242
  });
73858
74243
  });
73859
- var listModel = new _list__WEBPACK_IMPORTED_MODULE_1__["ListModel"](items, function (item) {
74244
+ var listModel = new _list__WEBPACK_IMPORTED_MODULE_2__["ListModel"](items, function (item) {
73860
74245
  if (!!item.action()) {
73861
74246
  listModel.selectedItem = item;
73862
74247
  }
@@ -73977,6 +74362,10 @@ __webpack_require__.r(__webpack_exports__);
73977
74362
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return SvgIconRegistry; });
73978
74363
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return SvgRegistry; });
73979
74364
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return SvgBundleViewModel; });
74365
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
74366
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
74367
+
74368
+
73980
74369
  var SvgIconData = /** @class */ (function () {
73981
74370
  function SvgIconData() {
73982
74371
  }
@@ -74033,12 +74422,12 @@ var SvgIconRegistry = /** @class */ (function () {
74033
74422
  };
74034
74423
  SvgIconRegistry.prototype.renderIcons = function () {
74035
74424
  var containerId = "sv-icon-holder-global-container";
74036
- if (!document.getElementById(containerId)) {
74425
+ if (!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root.getElementById(containerId)) {
74037
74426
  var iconsDiv = document.createElement("div");
74038
74427
  iconsDiv.id = containerId;
74039
74428
  iconsDiv.innerHTML = "<svg>" + this.iconsRenderedHtml() + "</svg>";
74040
74429
  iconsDiv.style.display = "none";
74041
- document.head.insertBefore(iconsDiv, document.head.firstChild);
74430
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.svgMountContainer).appendChild(iconsDiv);
74042
74431
  }
74043
74432
  };
74044
74433
  return SvgIconRegistry;
@@ -74349,6 +74738,7 @@ var Trigger = /** @class */ (function (_super) {
74349
74738
  __extends(Trigger, _super);
74350
74739
  function Trigger() {
74351
74740
  var _this = _super.call(this) || this;
74741
+ _this.idValue = (Trigger.idCounter++);
74352
74742
  _this.usedNames = [];
74353
74743
  _this.registerPropertyChangedHandlers(["operator", "value", "name"], function () {
74354
74744
  _this.oldPropertiesChanged();
@@ -74397,6 +74787,11 @@ var Trigger = /** @class */ (function (_super) {
74397
74787
  enumerable: false,
74398
74788
  configurable: true
74399
74789
  });
74790
+ Object.defineProperty(Trigger.prototype, "id", {
74791
+ get: function () { return this.idValue; },
74792
+ enumerable: false,
74793
+ configurable: true
74794
+ });
74400
74795
  Trigger.prototype.getType = function () {
74401
74796
  return "triggerbase";
74402
74797
  };
@@ -74576,6 +74971,7 @@ var Trigger = /** @class */ (function (_super) {
74576
74971
  enumerable: false,
74577
74972
  configurable: true
74578
74973
  });
74974
+ Trigger.idCounter = 1;
74579
74975
  Trigger.operatorsValue = null;
74580
74976
  return Trigger;
74581
74977
  }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
@@ -74676,9 +75072,12 @@ var SurveyTriggerComplete = /** @class */ (function (_super) {
74676
75072
  this.owner.setCompleted();
74677
75073
  }
74678
75074
  else {
74679
- this.owner.canBeCompleted();
75075
+ this.owner.canBeCompleted(this, true);
74680
75076
  }
74681
75077
  };
75078
+ SurveyTriggerComplete.prototype.onFailure = function () {
75079
+ this.owner.canBeCompleted(this, false);
75080
+ };
74682
75081
  return SurveyTriggerComplete;
74683
75082
  }(SurveyTrigger));
74684
75083
 
@@ -75411,7 +75810,7 @@ var TooltipManager = /** @class */ (function () {
75411
75810
  /*!****************************!*\
75412
75811
  !*** ./src/utils/utils.ts ***!
75413
75812
  \****************************/
75414
- /*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames */
75813
+ /*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames */
75415
75814
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
75416
75815
 
75417
75816
  "use strict";
@@ -75433,6 +75832,8 @@ __webpack_require__.r(__webpack_exports__);
75433
75832
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectIEBrowser", function() { return detectIEBrowser; });
75434
75833
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return loadFileFromBase64; });
75435
75834
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
75835
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isShadowDOM", function() { return isShadowDOM; });
75836
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return getElement; });
75436
75837
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementVisible", function() { return isElementVisible; });
75437
75838
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findScrollableParent", function() { return findScrollableParent; });
75438
75839
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollElementByChildId", function() { return scrollElementByChildId; });
@@ -75510,13 +75911,24 @@ function loadFileFromBase64(b64Data, fileName) {
75510
75911
  function isMobile() {
75511
75912
  return (typeof window !== "undefined" && typeof window.orientation !== "undefined");
75512
75913
  }
75914
+ var isShadowDOM = function (rootElement) {
75915
+ return !!rootElement && !!("host" in rootElement && rootElement.host);
75916
+ };
75917
+ var getElement = function (element) {
75918
+ var root = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root;
75919
+ return typeof element === "string" ? root.getElementById(element) : element;
75920
+ };
75513
75921
  function isElementVisible(element, threshold) {
75514
75922
  if (threshold === void 0) { threshold = 0; }
75515
- if (typeof document === "undefined") {
75923
+ if (typeof _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment === "undefined") {
75516
75924
  return false;
75517
75925
  }
75926
+ var root = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root;
75927
+ var clientHeight = isShadowDOM(root)
75928
+ ? root.host.clientHeight
75929
+ : root.documentElement.clientHeight;
75518
75930
  var elementRect = element.getBoundingClientRect();
75519
- var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
75931
+ var viewHeight = Math.max(clientHeight, window.innerHeight);
75520
75932
  var topWin = -threshold;
75521
75933
  var bottomWin = viewHeight + threshold;
75522
75934
  var topEl = elementRect.top;
@@ -75526,8 +75938,11 @@ function isElementVisible(element, threshold) {
75526
75938
  return maxTop <= minBottom;
75527
75939
  }
75528
75940
  function findScrollableParent(element) {
75941
+ var root = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root;
75529
75942
  if (!element) {
75530
- return document.documentElement;
75943
+ return isShadowDOM(root)
75944
+ ? root.host
75945
+ : root.documentElement;
75531
75946
  }
75532
75947
  if (element.scrollHeight > element.clientHeight &&
75533
75948
  (getComputedStyle(element).overflowY === "scroll" ||
@@ -75542,9 +75957,11 @@ function findScrollableParent(element) {
75542
75957
  return findScrollableParent(element.parentElement);
75543
75958
  }
75544
75959
  function scrollElementByChildId(id) {
75545
- if (!document)
75960
+ var environment = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment;
75961
+ if (!environment)
75546
75962
  return;
75547
- var el = document.getElementById(id);
75963
+ var root = environment.root;
75964
+ var el = root.getElementById(id);
75548
75965
  if (!el)
75549
75966
  return;
75550
75967
  var scrollableEl = findScrollableParent(el);
@@ -75717,7 +76134,7 @@ function mergeValues(src, dest) {
75717
76134
  return;
75718
76135
  for (var key in src) {
75719
76136
  var value = src[key];
75720
- if (value && typeof value === "object") {
76137
+ if (!Array.isArray(value) && value && typeof value === "object") {
75721
76138
  if (!dest[key] || typeof dest[key] !== "object")
75722
76139
  dest[key] = {};
75723
76140
  mergeValues(value, dest[key]);